# Changelog ## 0.55.10 ### Fixed — chat costs are final only when the response proves a settlement `blockrun_chat` on a wallet reported every paid call as a final cost (`cost_is_estimate: false`). The figure came from the SDK's spend counter, which adds the signed amount whenever a paid request comes back 2xx. That is not proof the payment settled. The gateway settles a stream after its headers are sent, and on its enterprise local-trust path it can serve a call whose settlement then fails. On 2026-11-12 four `zai/glm-5.3` calls from a wallet holding $0.001 were served and none settled, yet this server reported $0.104 as final. - A paid call is now final only when the response names its settlement transaction (`PAYMENT-RESPONSE` with a transaction, or `X-Payment-Receipt`, and no `X-Payment-Settled: false`). That transaction is returned as `settlement_tx`. - Without that proof, `cost_is_estimate` is `true` and the reply says the amount was signed but not confirmed as settled. Streamed calls carry no receipt, so this is the usual case for paid chat. - Budget caps and delegated agent limits still count the signed amount, so enforcement stays conservative. - A paid call that fails without a receipt is booked as a possible charge ("cannot tell whether the gateway settled it"), not "the charge stands". Either way, no other model is tried and you are told not to retry. - The gateway's in-band error frame (`model: "error"`, `[Error: …]` content) is now treated as a failure. Before, it came back as a successful reply with `served_model: "error"` and a final cost. - The native Claude path (`thinking`) uses the same rule. ## 0.55.9 ### Changed — Seedance synced audio defaults on for every input `blockrun_video`'s `generate_audio` description: the gateway now turns synced audio on by default for every Seedance input (text, image, first/last frame, reference image, video or audio, RealFace), not only text-to-video. `false` gives a silent clip. The price does not depend on it. ## 0.55.8 ### Fixed — Solana payments sign on the gateway's quoted blockhash Requires `@blockrun/llm` 3.26.5. When a Solana 402 quotes `extra.recentBlockhash`, the payment is now signed on that blockhash instead of one the SDK fetched itself. It is a `finalized` hash every facilitator verifier has already seen, and the Solana gateway applies its sandbox-create payment-window check only to payments signed on the hash it quoted. With no valid quote the payment is built exactly as before. ## 0.55.7 ### Fixed — `blockrun_modal` reserves the gateway's new sandbox prices The gateways now price a create by size as well as lifetime. The flat rate needs 300 seconds or less, at most 1 CPU and at most 1024 MB. Anything else pays the new hourly rates (CPU $0.25, T4 $4, L4 $4.50, A10G $5, A100 $7, H100 $9), never below the flat rate. The estimator, budget cap, confirm dialog, tool text and skill now use the same rule, so `{ gpu: "T4", cpu: 8, memory: 32768, timeout: 300 }` reserves $0.335 instead of $0.052. The skill's GPU example also no longer sends a custom image and `setup_commands`, which the gateway refuses. ## 0.55.6 ### Fixed — agents are no longer offered Exa's retired `tweet` category Exa retired the `tweet` search category and answers 400 "no longer supported", but the `blockrun_exa` tool description and the `exa-research` skill still listed it, so agents kept picking it. Those calls fail without a charge. Both now drop it and say Exa does not serve X/Twitter content. ## 0.55.5 ### Fixed — Grok Imagine Pro is reserved and booked at its new price The gateway repriced `xai/grok-imagine-image-pro` from $0.05 to $0.06 on 2026-11-05, because xAI retired the model behind it and Pro now requests Grok Imagine 2.0 at medium quality. This server still reserved and booked the old price, so on Base each call was booked $0.0105 below the $0.064 it settled and budget caps ran loose on that model. The price table and the tool description now say $0.06. ## 0.55.4 ### Fixed — native Claude calls are booked at the full max_tokens ceiling The gateway's x402 quote for `blockrun_chat` with `thinking` (the native `/v1/messages` path) now prices output at the full `max_tokens`, not half of it (blockrun.ai and sol.blockrun.ai, 2026-11-03). This server still booked half, so each native call was booked at about half of what it settled and budget caps ran loose on that path. It now books the full ceiling, re-verified against live quotes (at or above the quote, within +0.6%). ### Removed — `azure/sora-2` from `blockrun_video` Sora 2 was retired on 2026-11-02 and the gateways no longer serve it. `blockrun_video` no longer offers it as a model or suggests it as an alternative. A call that still names it is refused before any quote, with replacements named (`xai/grok-imagine-video-1.5`, `bytedance/seedance-2.0-fast`, `bytedance/seedance-2.0` for 4K); nothing is charged. ## 0.55.3 ### Fixed — native Claude calls are booked at what they settle `blockrun_chat` with `thinking` (the native `/v1/messages` path) books the gateway's x402 quote, which prices output at a fraction of `max_tokens` and settles it regardless of usage. The gateway raised that fraction from 0.1 to 0.5 on 2026-10-30, and this server kept booking 0.1, so a default opus call was booked at about a quarter of what it paid and budget caps ran roughly 4x loose on that path. It now books 0.5, re-verified against live quotes. `npm run verify:prices` now probes `/v1/messages` too, and fails if the ledger books below the live quote, so the next move of that fraction is caught. ## 0.55.2 ### Fixed — charges that may have settled are booked, never "try again" When the gateway's edge answers 502/504 (or a billed answer comes back unreadable), the origin may already have charged you. Three paths booked nothing and told you to retry, which could pay twice: - `blockrun_image` and `blockrun_music` on Solana: the async submit's error lost its status, so the precaution was dropped. The edge set is now the shared one (503 is the gateway's own answer on every rail). - `blockrun_speech` on the account rail: a billed 200 whose body would not parse is now booked and reported as "the charge stands". - `blockrun_speech` and `blockrun_music` on Base: an edge 502/504 on the signed request is now booked as a maybe, as on Solana and the account rail. A Solana video submit (paid on completion, so it cannot move money) is the exception and is never booked on an edge status. ### Fixed — Polymarket - An EOA withdrawal whose nonce was taken by another transaction from the same key no longer reports "✅ Withdrawal submitted": it says no pUSD was sent and releases the guard. A repriced (sped-up) transfer still succeeds, and success or revert both name the hash that actually mined. - `action:"fund"` signs exactly the amount it shows. `Math.floor(usd * 1e6)` signed $2.009999 for "$2.01"; input with more than 6 decimals is refused. ### Fixed — free models, messages, docs - `nvidia/nemotron-3.5-lightning-nim` and `nvidia/nemotron-3-ultra-550b-nim` are free on every rail and now reserve $0 (#204). - `blockrun_phone` without a body on a POST route is refused before anything is reserved, instead of approving up to $5, signing, and blaming the wallet balance. Only `voice/call/{call_id}` is a GET. - "Needs wallet mode" names where the API key came from (`BLOCKRUN_API_KEY`, `~/.blockrun/.api-key`, or both). - Wallet setup says where the key really is: the env var, every key file that still holds it, or the OS keychain only when no plaintext copy is left. - A Solana job that fails after an unknown settle no longer says both "No payment was taken" and "MAY have been charged". - The inline image preview's 15s deadline covers DNS resolution again. - README: search is web + news (the X source was removed); the `report` ledger books the observed fee, not the $0.002 reserve. ## 0.55.1 ### Security — the inline image preview no longer fetches private addresses With inline previews on (`inline: true` or `BLOCKRUN_INLINE_IMAGES`), the thumbnail fetch took the gateway's image URL verbatim and followed its redirects, so a malicious or compromised gateway could make your machine request localhost, cloud metadata (169.254.169.254) or the private network. It now goes through the same DNS-resolved, per-redirect-hop guard that `blockrun_image` already applied to your own reference-image URLs, now shared as `fetchPublicUrl`. Non-http(s) schemes are refused; `data:image` results from image2image routes still inline without a network request. Previews are off by default. Reported in #194. Both image downloads (your reference image, and the preview) now count bytes as the body streams and stop at the size cap. Before, the cap ran after the whole body was in memory, so a chunked response or a gzip/brotli bomb, whose Content-Length is the compressed size, could exhaust memory in the server. ## 0.55.0 ### Added — Arc as a third payment chain `blockrun_wallet action:"chain" chain:"arc"` pays on Circle's Arc (eip155:5042) through arc.blockrun.ai, from the same EVM key and address as Base, funded with USDC on Arc. Arc serves everything Base does. `status` shows the Base, Solana and Arc balances; the Arc balance is read from the Arc gateway, or from `ARC_RPC_URL` when set. Setup, the funding QR (EIP-681 on chain 5042), card top-up guidance and error text name Arc. Nothing selects Arc automatically: an install that never chose it stays on the chain it was on. Requires `@blockrun/llm` 3.25 (Arc's USDC signing domain landed in 3.16). ## 0.54.7 ### Fixed — Mistral Large 4 reserves its list price Mistral's launch promotion ended and the gateways moved `mistral/mistral-large-4` from $0.68/$2.09 to $1.36/$4.18. The price row follows, so an explicit call reserves the real rate instead of half of it. ## 0.54.6 ### Added — Gemini 4 Argon price row `google/gemini-4-argon` (live 2026-10-20 on Base and Solana) reserves its own $2/$10 per 1M instead of the $5/$30 default. That is Google's rate through 2026-11-30; it moves to $4/$20 on 2026-12-01. Argon has no long-context tier. It is priced only: no routing tier or mode includes it. ## 0.54.5 ### Added — DeepSeek V4.1 Flash `deepseek/deepseek-v4.1-flash` ($0.14/$0.28, the same model and price as `deepseek-chat`) has a price row and sits right after `deepseek-chat` in the fast and cheap tiers. Base and Solana both serve it. ### Fixed — the chat, free, image and video tables match the live catalogue (2026-10-20) - 33 live paid chat ids that had no price row now reserve their own rate instead of the $5/$30 default (gpt-6.1-sol, gpt-5.6-*-pro, mistral-large-4, glm-5.3/-flash, qwen3.8-max/-flash, gemini-3.6/3.8-flash, hy4-preview, mimo-v2.5 and others). `tencent/hy3` is dropped. gpt-6.1-sol's >272K long-context step is priced. - The 17 hidden NVIDIA ids that the gateways serve at $0 now reserve $0, so an exhausted budget no longer refuses a free call. - `nvidia/deepseek-v4-pro` and `nvidia/deepseek-v4-flash` leave the free set: the gateways retired both and answer 400. Bare `deepseek-v4-pro` reserves the paid `deepseek/deepseek-v4-pro` rate. - The free tier was re-probed on both chains: `nemotron-3-super-120b` joins; `north-mini-code` and `laguna-xs-2.1` leave it. - Images: `gpt-image-2.5-flare`/`-sunburst` and `grok-imagine-image-2.0` are added; `grok-imagine-image-pro` drops to $0.05. Video: `grok-imagine-video-1.5` is added. ## 0.54.4 ### Fixed — a Solana video settle whose outcome is unknown is waited out, never "no charge" (#177) When a finished video's payment settle times out, sol.blockrun.ai answers 402 `Payment settlement outcome unknown` with `Retry-After` and holds the job; other polls get `settlement in progress on a concurrent poll`. The client ignored `Retry-After`, spent its three re-signs about 15s into a 90s hold, and reported "no charge was made" while that payment could still land. - Held answers honour `Retry-After` and re-sign with a fresh blockhash without spending the re-sign budget; the call deadline still bounds them. - Once a payment's outcome is open, every exit (deadline, a 500 poll answer, an unreadable challenge, a refused fresh settle) books the quote and says the job MAY have been charged, instead of booking nothing. - A completion 402 whose challenge cannot be read falls back to payment-signed polling instead of aborting the finished job. - Music and image (paid at submit), the Base rail and the account rail are unchanged. ## 0.54.3 ### Changed — Solana media polls prove the wallet instead of paying (#176) On the Solana wallet rail, a pending video job used to need a fresh SPL payment signature on every poll (~20s apart): a payment is a transaction pinned to a ~60-90s blockhash, and it was the only proof of who was asking. sol.blockrun.ai now also accepts an ownership proof: an ed25519 signature by the submitting wallet over `blockrun-poll:v1:::`, sent as `x-poll-wallet` / `x-poll-timestamp` / `x-poll-signature`. It signs a text message, not a transaction, so nothing it carries can move money. - **video**: pending polls send only the proof. The finished job answers 402 with `status: "completed"`; the client signs **one** payment from that challenge, pinned to the submit's amount, recipient and fee payer, and the existing payment-signed path settles it. - **music / image**: paid at submit, so their polls never sign a payment. - **fallback**: a refused proof (video 400 `Invalid job id`, audio/image 404 `Job not found`) or any 402 that is not the completion challenge switches the job once to payment-signed polling, and says so on stderr. - An unpaid completion challenge is not a result: the poll classifier decides on each answer's own `status`, so a later bodiless 2xx keeps polling instead of booking the quote with no video. - The Base rail and the account (API key) rail are unchanged. `bs58` is now a declared dependency. ### Changed — the `decide` skill now teaches Decisions; OpenJev is retired BlockRun replaced OpenJev (its self-hosted NLI judgment model) with an OpenAI Decisions-compatible endpoint served by `gpt-6-luna` on 2026-10-07. The skill taught `api.blockrun.ai/v1/decide` with the `state` / `noul` / `criteria` shape and explained OpenJev's normalised scores, none of which describe what answers now. `skills/decide` now covers `POST https://api.blockrun.ai/v1/decisions`: `input` + `questions` as an array, `predicate` / `choice` (`choices`) / `score` (`levels`), and image input. It is served only there, free for any registered key. There is no x402 rail: the x402 floor is above what a Decisions call costs, so the paid route was never deployed (gateway #804). The example response is a live call. The old `/v1/decide` shape is still accepted there and is named as legacy. Still a skill, not a tool, for the reason 0.52.0 gave. `skills/blockrun` and the marketplace entry point at the new path. ## 0.54.2 ### Fixed — a withdrawal that may have moved money is never signed twice **A retry that resolved the earlier withdrawal went on to sign another.** The `pendingWithdraw` guard cleared itself when the earlier transfer turned out settled (relayer `STATE_MINED`/`STATE_CONFIRMED`, or an EOA receipt) and the same `confirm:true` call then signed a fresh transfer on top of it. Resolving the earlier withdrawal now ENDS the call: the outcome is reported, nothing new is signed, and another withdrawal takes a separate call made after the balances have been checked. The same holds for a failed batch and for an expired relayer deadline, which is now reported as "may or may not have executed" rather than treated as safe. **The EOA (sigType 0) rail expired a plain transaction after five minutes.** A Polygon transaction has no deadline; one that sits in the mempool can be mined at any later time. The guard used to block for 300s and then clear, after which a retry signed a second transfer with the next nonce, so both could land. The transfer is now signed locally first, and its hash, nonce and signed bytes are written to the state file before the broadcast. Only a receipt resolves it. Until a receipt exists, a retry re-broadcasts those same bytes, so the transfer can execute at most once, and no new transaction is signed. An advanced account nonce plus an RPC that does not know the hash is not read as "dropped". The guard is released before a receipt only when the node rejects the bytes outright (insufficient funds, underpriced, intrinsic gas, invalid sender) and the RPC does not know the hash. "nonce too low" and "already known" keep the guard. **The relayer withdrawal is recorded before the submit, not only in its error handler.** A process killed mid-POST runs no catch block, and the batch it posted stays executable until its deadline. A definite 4xx still releases the guard. **HTTP 408 no longer counts as a definite rejection.** `isDefiniteRejection` treated every 4xx as proof that nothing was accepted. A 408 means a proxy gave up waiting, and the order or batch behind it may have landed. It is now an unknown outcome on the CLOB submit, the relayer batch and fund alike, so the session reservation is kept. `test/polymarket-withdraw-eoa.test.ts` and `test/polymarket-definite-rejection.test.ts` are new. The withdraw and relayer tests pin the new lifecycle. Each fix was checked by reverting it and watching its tests fail. ## 0.54.1 ### Fixed — `blockrun_search` is one flat price, and the tool said otherwise The gateway repriced `/v1/search` to a flat $0.08 per call on 2026-09-29 (blockrun `SEARCH_PRICE_PER_CALL_USD`: xAI never sees `max_results`, so the count never drove cost). This server kept reserving and advertising `$0.025 × max_results`: the default call reserved $0.2645 against a $0.081 charge (3×), a 50-source call $1.3145 (16×), and the description told every agent search was "expensive by default" and to ask for fewer sources. Live 402 quotes, 2026-10-06: Base `amount` 81000 and Solana 80000 at `max_results` 1, 10 and 50 alike. The reserve is now `withTxFee($0.08)` = $0.082 at any size, never below the charge; `test/search-cost.test.ts` pins it flat. Tool description, `skills/search`, `skills/blockrun`, `skills/surf` and the README price row now say $0.08 flat; the full/research schema-token rows moved with the shorter description (14,018 / 2,727). ## 0.54.0 ### Fixed — seedance-2.5 takes reference clips; the clip ceiling is per model The gateway turned on reference video/audio for seedance-2.5 on 2026-09-26 (enterprise#297): its registry entry now carries `supportsReferenceMedia: true` and "reference video/audio clips up to 30s each (billed per reference second)". `blockrun_video` still refused `reference_videos` / `reference_audios` on 2.5 by name. It now forwards them, with the same limits as the 2.0 family: 1-3 clips of each type, audio only beside a reference image or video, never with frame seeds, up to 30 reference images. The reserve priced every clip at a flat 15.2s. The provider's ceiling is per model, and the gateway quotes each clip at its model's ceiling (`REFERENCE_CEILING_SECONDS`): 15.2s on seedance-2.0 / 2.0-fast / 2.0-mini, 30.2s on 2.5. A 2.5 clip would have reserved half its price on the one rail where the reserve is the only budget control. One reference video now puts a 5s 720p 2.5 render at ~$11.07 (~7x its ~$1.58 plain price). 1.5-pro still takes no clips, and the estimator now throws instead of borrowing another model's ceiling for it. Rail rules are unchanged: both wallet gateways (`blockrun.ai`, `sol.blockrun.ai`) still refuse every reference field with a 400 before quoting, so reference media stays account-rail only, 2.5 included. ### Added — price rows for the new chat models `blockrun_chat` now prices gpt-6-sol, gpt-6-luna, gpt-5.1, claude-opus-5.5, claude-sonnet-5.5, grok-4.6 and grok-4.7 from the live `/v1/models` (#163). On the native Anthropic path the row is the ledger, so opus/sonnet-5.5 previously booked nothing. gpt-5.6-sol is repriced from $5/$30 to $4/$20 per million tokens (cut 2026-08-21). ### Fixed — huge prompts reserve at the long-context price Past a model's `pricing.long_context` threshold the gateway reprices the whole request, but the chat estimate reserved at base rates, so a huge prompt under-reserved (gpt-6-astra over 272K tokens reserved $10/$50 against a $20/$75 quote). The estimate and the account ledger now use the highest long-context step the prompt reaches, copied from the live `/v1/models` (#165). `verify:prices` fails when a live step would settle above the reserve. ### Fixed — retired tencent/hy3 dropped from the cheap tier Hy3 retired on 2026-09-24 and the gateway redirects it to qwen3.7-flash, which is already in the cheap chain (#164). ## 0.53.1 ### Fixed — seedance-2.5 first-and-last-frame is refused by name on Solana 0.53.0 advertised `last_frame_url` on seedance-2.5 on every rail. `sol.blockrun.ai` is a separate deploy that has not added 2.5 to its first-and-last-frame list: it answers `400 "does not support first-and-last-frame video"` before quoting, while `blockrun.ai` quotes the same body (unsigned probes, 2026-09-29; 2.0, 2.0-fast, 2.0-mini and 1.5-pro quote on both). No payment was ever at risk, but the caller got "the endpoint did not return a quote". The tool now refuses that one combination on the Solana wallet rail, names Base and the account rail as the places that serve it, and lists the models that work on Solana. The parameter description and `docs/seedance-capabilities.md` say the same. The output controls (`output_format`, `bitrate_mode`, `watermark`, `return_last_frame`) were probed on both gateways as well. Both validate them in their request schemas, so they are not silently dropped on Solana. ## 0.53.0 ### Added — Seedance reference media, 2.5 first/last frame, output controls `blockrun_video` gains the Seedance capabilities the gateway already serves. Full matrix, per rail and per model, in [docs/seedance-capabilities.md](docs/seedance-capabilities.md). - **Reference media — account rail only (`BLOCKRUN_API_KEY`).** `reference_image_urls` (up to 9 on seedance-2.0 / 2.0-fast / 2.0-mini, up to 30 on 2.5), `reference_videos` and `reference_audios` (1-3 each, 2.0 family only; audio needs an image or video beside it). The Base and Solana gateways refuse reference media with a 400 before quoting, so the tool refuses it on those rails first, naming the rail that serves it. No payment is taken. References and frame seeds (`image_url`, `last_frame_url`, `real_face_asset_id`) are mutually exclusive. - **Reference clips are expensive, and the reserve says so.** The gateway bills per reference second, and the caller sends a URL, never a duration, so every clip is reserved at the model's 15.2s ceiling. One clip makes a 5s 720p render cost about 4x (seedance-2.0-mini ~$0.40 to ~$1.61). A 4K job on seedance-2.0 with three videos and three audios reserves ~$130.88. The spend confirmation now lists the reference clips, so the price makes sense. Reference images carry no surcharge. - **First-and-last-frame on seedance-2.5** (`last_frame_url` with `image_url`), joining 1.5-pro and the 2.0 family. - **Output controls:** `bitrate_mode` (2.x), `output_format` mp4/mov (2.5), `return_last_frame`, `watermark` and `safety_identifier` (Seedance), and `seed` / `camera_fixed` (1.5-pro). A control declared for the wrong model is refused by name before payment. - Every in-memory guard now runs before the SSRF DNS resolution, so a request the tool will refuse anyway costs no lookups. ### Fixed - **Guard order.** With references present, the conflict with frame seeds is answered before the `last_frame_url` / RealFace guards. Before, a reference request carrying `last_frame_url` was told to add `image_url`, and only on the resubmit that seeds and references never mix. - **A Solana image give-up named the wrong place to check.** Since 0.52.2 the Solana image path can end in a settled-at-submit give-up, and the message was written for the account rail: "the account is charged", "check user.blockrun.ai/dashboard/activity". That dashboard has no record of an on-chain transfer. The message now names the Solana wallet and `blockrun_wallet action:"report"`. ## 0.52.3 ### Fixed — 0.52.2's Solana image fix cut the paid submit off at 30s 0.52.2 moved `blockrun_image` on the Solana wallet rail onto the async helper so a long render is polled instead of lost. It kept the helper's 30s submit timeout, which is sized for video's 3-20s enqueue. The image route holds the paid POST for up to ~30s and only then answers `202 { id, poll_url }` — so the client aborted at the moment the job id was due, after the transfer had settled. The fix did not reach the case it was written for, and a render that finished inline just past 30s (which 0.52.1 delivered) was now lost as well. The image submit now waits 95s, the account rail's timeout for the same 30s window. ### Fixed — an edge 5xx on a Solana video submit no longer books a phantom charge 0.52.2 kept the payment tracker armed on any 502/503/504 at a Solana async submit, because on image and music the submit settles the transfer. Video settles on the poll that observes `completed`, so its submit cannot have moved money — yet the full estimate was booked against the budget and the tool said the charge might stand. Each caller now declares whether its submit can settle (`submitMaySettle`, default true); video declares false. ## 0.52.2 ### Fixed — a paid image could be lost on the Solana wallet rail `blockrun_image` on Solana sent one POST and never polled. Past the gateway's ~30s inline window the route answers `202 { id, poll_url }` instead of the image, so the tool returned "No image URL in response" — **and the charge stood**, because Solana settles at submit and cannot settle after a long render (a signed transaction expires with its blockhash). The user paid and got nothing. Observed live on 2026-09-29: `google/nano-banana-pro` at 4096x4096 booked $0.1575 and returned no image. The same defect was fixed on the account rail in #140; the Solana wallet rail was never moved across. It now uses `solanaPaidAsyncPost` — the helper video and music already use, which handles the inline 200 and the 202 alike and re-signs each poll with a fresh blockhash. ### Fixed — an edge 5xx on a Solana submit is no longer reported as free `solanaPaidAsyncPost` marked the payment tracker answered as soon as the submit response arrived, including a 502/503/504 from the edge. On this rail the submit *is* the paid request, so an origin that never answered may still have settled it — and the tool told the user "temporary API issue, try again" on a charge that already stood. An edge status is no longer treated as the origin's verdict; the tracker stays armed and the tool books it as a precaution. Applies to video and music as well. All notable changes to BlockRun MCP will be documented in this file. ## 0.52.1 **JSON mode kept half its promise on Claude.** `response_format: "json_object"` says "no markdown fences" and "works across all providers". On the native `claude-*` path it injected the instruction and never stripped the fence Claude adds anyway, so `JSON.parse(response)` threw on the leading backtick — on exactly the models most likely to be asked for JSON. ### Fixes - **`fix(chat)` — `json_object` unwraps a fenced reply on the native path.** Only a reply that IS one fenced block is unwrapped; prose round a fence is the model ignoring the instruction and is returned as-is rather than trimmed into JSON that was never the whole answer. `structuredContent.native` keeps the fence as upstream evidence, and thinking blocks are untouched — the compat path would have done the strip for free at the cost of the native thinking channel. Pinned by six cases in `test/chat-anthropic-json-fence.test.ts`, including the verbatim haiku-4.5 reproduction. Reported by a sibling session reading the gateway's `stripJsonFence` call sites, neither of which is on `/v1/messages`. ## 0.52.0 **A judgment endpoint as a skill, not a tool.** BlockRun now serves `POST api.blockrun.ai/v1/decide` — typed yes/no, labelled-choice and scored-rung judgments over a text or JSON state, served by OpenJev, free behind a registered key. The obvious move was a `blockrun_decide` tool. It was not made: every caller of this server is already a frontier model and a better one-off judge than a 4B NLI cross-encoder, the default install is a wallet with no key, and a tool taxes every user's context on every turn for an experiment few run. The endpoint earns its place when someone wants one fixed ruler over many items, or is prototyping a judgment they will later run from a pipeline without a model — and that is a `curl` recipe, which is what a skill is for. ### Skills - **`feat(skills)` — `decide`.** The seventeenth skill: the request shape, the three question types and their limits (1–64 questions, 2–255 criteria), the response, an eval loop over the user's own labelled rows, and the errors. Two things it says because every surface has to: the `confidence` on a choice is a share of the agreement found, not the probability the answer is correct (equal-weak and equal-strong support are indistinguishable once the scores are normalised), and OpenJev is not Jev — unaffiliated, MIT, no published comparison and none invented. It also tells the agent to export the key in the shell rather than write `~/.blockrun/.api-key`, because that file moves every paid tool to account billing at the next start. - **`docs` — the router skill points a fixed-ruler question at `decide`**, and the README, CONTRIBUTING and setup skill count seventeen. Nothing in `src/` changed: the tool count, the schema cost and every price table are as they were in 0.51.1. ## 0.51.1 **Round four, second half.** 0.51.0 shipped with seven of round four's ten finders still unread — they had stalled — and this is what they found once they finished, plus a regression hunt over 0.51.0's own fixes. Forty-six findings survived two verifiers each: two P0, five P1, and three of the P1s were introduced by 0.51.0. That is the pattern every round has produced, and it is why the rounds continue. ### The money paths - **Two more ways the URL parser and the price classifier disagreed** (P0). The parser strips trailing control-or-space from the whole URL — and the slug is its tail on every rail — so `phone/numbers/buy ` (an ordinary tokenisation slip) reserved $0.012 and bought the $5.001 route. And for https the parser reads a literal `\` as `/`, so `sandbox\create` priced as a $0.003 op, skipped the gpu/timeout normalisation, and the gateway served a $192 sandbox. Both guards share the cut now. - **0.51.0's settled-then-failed evidence was reading a shared counter** (P1). The SDK's spend counter is per client, `getClient()` was a cached singleton per rail, and tool calls run concurrently — so a concurrent call's settlement landed inside a failing call's window and was booked to it as "the charge stands", then booked again by the call that paid. Every path tool builds its own client, as chat always has. - **An edge status is a maybe on every rail** (P1). 0.51.0 read every numeric status as the gateway's verdict, which undid, for the media tools alone, the rule chat and the path tools apply to the same status: 408/502/504/52x say only that the origin did not answer in time and may still be settling. A `blockrun_speech` answered 504 by the edge while TTS finished and billed at the origin read "failed — try again", i.e. pay twice. One shared set now, and the tracker remembers that a paid request LEFT even after a response settled it. - **0.51.0's placeholder claim could delete a peer's freshly published key** (P1). The claim renamed whatever was at the session file's name after a read that saw it empty; a peer that claimed the same placeholder and linked its key in the gap had it renamed aside and deleted. The aside is inspected and a key found there is adopted. - **A DNS failure on the native claude-* path booked the quote and forbade a retry** (P1). The Anthropic SDK nests undici's errno two causes deep; the classifier read one. The chain is walked; a connect timeout is never-connected too. An idle stall before the stream connects is a maybe, not "settled"; partial text survives on the native path; and the Solana frame path refuses a stream that ended with no frames instead of returning a paid, empty success. - **Only the POST of a signed Polymarket order can be unknown.** The SDK's helpers read the network before they sign, and a relay 502 on any of those reads was wrapped as a phantom "possibly live" order that never released. The creds retry never re-submits an unknown outcome; the reservation is taken before the spend dialog so two waiting confirms cannot overshoot the session cap; the EOA withdraw gets the double-send guard the relayer path had; a throw from the relayer's poll is "may still land"; an unreadable state file is a refusal, not an empty state; and every definite refusal says nothing was placed, so the order card re-arms on it. - **The Linux keychain fix locked out fresh installs with no secrets service** (a regression of 0.51.0). secret-tool prints a D-Bus or no-provider message and exits 1 on hosts that have the binary and nothing behind it; that read as a fault, and every paid tool refused to mint. A keychain that does not exist is absent; a locked one is still an error. - `blockrun_image` and `blockrun_realface` say when the charge stands (a settled 2xx with no URL / no asset id, a temp file that would not write); the account rail's unreadable settled body is the same typed error the wallet rails throw; `BASE_RPC_URL` is honoured on the Base balance read. ### The release machinery `publish.yml` runs on `main` only — a `workflow_dispatch` from a bumped branch would have shipped it as `latest`, tagged at an unmerged commit. The tag/release step is no longer gated on the tag being absent, so a re-run after `gh release create` failed can actually create the release (the very failure that hit 0.51.0's first run). The MCP-registry lookup gets the npm lookup's none/unknown split. `brand-sync` refreshes an already-open fallback PR instead of going red. `verify:prices` tallies a probe that throws as unreachable (bounded by 30s) instead of exiting with the under-reserve code, and `version-gate.mjs` realpaths its `isMain` check so a symlinked checkout cannot fail open. ### Saying the true thing "Timeout = no charge, retry" was wrong on Solana music and every account-rail media job; the setup and debug skills told the user to back up only `.session` when the funded key on a new install is `.solana-session`; spend-confirmation.md said Polymarket is not behind the dialog; four docs said native claude-* is Base-only when only `thinking` is; the gentech skill said music, speech and realface need Base; CONTRIBUTING's async pattern said timeouts never charge. All corrected, and the music/video tool descriptions say which rails bill at submit. ## 0.51.0 **Round four went at round three.** 0.50.0's changelog said the general sweep was spent and the surfaces no sweep had opened were where the money was. Round three opened them — it is the fifty-nine hundred lines behind this release, nine commits that replaced every hand-copied `paidRequestInFlight` boolean with one per-call tracker, made every chat path stream and classify its failure by what the wire said, sealed `BLOCKRUN_BUDGET_LIMIT` as a ceiling the session cannot raise, and closed four ways a funded key could be lost. Round four then audited round three with the same adversarial loop, and found the pattern the loop has found every time: a fix that reaches one rail and not its siblings, a comment that states a contract one branch does not honour, and a fix whose own shape is the next bug. Fourteen findings survived two verifiers each — one P0, three P1 — and every one of them is in this release with the test that pins it. ### The money paths - **A settled chat call is booked at what the rail bills, on every rail.** The account rail books exact usage at the model's rate — no fee, no floor — instead of the gate reserve that ran 3–50x high and tripped `BLOCKRUN_BUDGET_LIMIT` at a fraction of real spend; a settled `x-blockrun-cost-usd`, zero included, wins when present. The wallet rails read the SDK's counter and, where the counter cannot see (a payment signed and sent, no verdict back), book the reserve as a precaution and stop the routing loop instead of paying a second model under the same reservation. Before this, five typo'd model ids exhausted a delegated cap at $0 real spend on the account rail, and a 524 after the gateway settled read as "temporary API issue, try again" on the native claude-* path — with the SDK retrying the settled request twice more, each retry a fresh x402 payment. - **Solana chat streams.** The default chain ran every paid chat through the SDK's non-streaming path with a 60s abort, so a generation over a minute was cancelled client-side after the SPL payment was sent. The native claude-* path streams too (`maxRetries: 0`): the SDK refused non-streaming thinking budgets above ~21k tokens with an error that blamed the caller. - **One in-flight tracker, per call, on every rail** (`utils/in-flight.ts`). 0.50.0's copies were wrong in five different ways — cleared in a `.finally` that runs before the catch, set on Base only, module-global so one call's outstanding payment booked a phantom charge against another call's failure, armed before the unpaid quote probe. And round four found the tracker's own shape: a helper that inspects the response and THROWS on it leaves the tracker armed with an answer in hand, so `blockrun_image` on the account rail booked a whole render for a `not_charged` job whose upstream text read "aborted due to timeout" and told the user the charge may have gone through. The verdict now comes off the error — a status, a typed job verdict, the gateway's own uncharged marker — never its prose. The rail-parity matrix gained the cell. - **Settled-at-submit routes are billed on every escape.** `sol.blockrun.ai` settles the audio route optimistically at POST (the 202 says `settled_optimistic`); the helper assumed payment-on-completion for every route and said "No payment was taken" for a failed track the gateway had already charged. Round three typed the failed-job, poll-error and deadline exits; round four found the reactive re-sign path still throwing "No charge was made" — every post-submit throw on that model is now a certain charge. Music's Solana submit timeout is the 95s the route needs, not the 30s video default that aborted every track slower than 30s after the money had moved. - **The seven path tools book a payment the origin never answered.** They did `formatError(extractErrorMessage(err))` and nothing else, so a call whose payment left and whose origin never answered booked $0 and read "try again in a few minutes". The rule is narrower than chat's on purpose — the search route's bare 500 is pre-settle, and booking it would invent $0.26 of phantom spend per Grok blip. And a throw AFTER the SDK counted the settlement (a non-JSON 200: no status, no transport words) now books the counted amount as a certain charge instead of "none". - **`BLOCKRUN_BUDGET_LIMIT` is a ceiling the session cannot raise.** It seeded the same mutable cap that `blockrun_wallet action:"budget"` writes, so the agent it constrained could clear or raise it in one free tool call — and the denial text at the cap pointed it at exactly that tool. `set` clamps to it, `clear` restores it, `delegate` clamps the child cap to it, and every reply says when and why it clamped. A revoked agent keeps its ledger — revoke + delegate was still a refill, and round four found the last form of it: a call that settled while its id was revoked landed on the global ledger only, and the next delegate carried a ledger that had forgotten it. - **Unknown is never a plain error on Polymarket.** A submit that threw with no 4xx behind it (dropped socket, relay 502/504) released the reservation and rendered as a plain error, steering the agent into a second real order while the session cap saw one. The notional stays booked as unconfirmed, the message says what to check, the balance-cache retry never re-submits on top of a possibly-live order, and the order card keeps its lock across Re-quote. `fund` arms a `pendingFund` guard for the 300s a lost EIP-3009 authorization stays executable, so a retry cannot double-send; its $0.01 gateway fee is reserved and booked like any paid call — round four found the ledger had never been handed to the tool, so that booking existed only in the unit test. A bare `confirm:true` on a market order is held to the worst fill of the last preview, and `BLOCKRUN_CONFIRM_SPEND=on` finally asks the human before buy/sell/fund/withdraw sign — a $0.004 rpc call got the dialog while a $25 bet did not. - **Three pre-payment guards for paid mistakes.** `blockrun_modal` trims `gpu` the way the gateway prices it — `" H100 "` quoted $8.001 against a $0.102 reserve, and $192 against $2.40 at 24h, past the cap and the confirm dialog — and refuses a tier the gateway would 400. `blockrun_search` refuses the X/Twitter source the gateway removed on 2026-07-05 and this tool advertised for two months. `blockrun_markets` refuses a `?` in `path`, which bypassed every params-based check. And `hasPathTraversal` decodes per segment: one malformed `%` after a `#` blinded the whole-string decode, and `%2e%2e/phone/numbers/buy#%` priced as a $0.003 modal op and POSTed the $5.001 number purchase. ### The keys - **A `secret-tool` exit 1 is read by stderr.** libsecret returns 1 for a miss and for a fault alike; only the fault prints why. Round three's tri-state keychain read was macOS-only, so on Linux a locked collection, a missing D-Bus session or a dismissed unlock prompt all read as "absent" — and under `BLOCKRUN_KEYCHAIN=strict` both provisioners minted over the funded wallet the process merely could not open. A silent exit 1 is a miss; one that said something is an error, with the tool's reason in the detail. - **The legacy `wallet.key` ranks below the keychain.** Strict mode retires `.session` and never `wallet.key`, so a stale legacy file from an older install outranked the keychain the moment `.session` was gone, and its key was stored over the funded one with `-U`. `.session` stays the rotation seam; the legacy file is consulted only after the keychain says "absent". - **An env key is a signer override, not a wallet this machine owns.** It is never mirrored into the keychain and never retires the file — one run with a different key in the environment used to leave the funded wallet, also the Polymarket deposit signer, in no store at all. `BASE_CHAIN_WALLET_KEY`, the SDK's own spelling, is honoured by the gates that read only `BLOCKRUN_WALLET_KEY`. - **Two servers on a fresh machine could both mint.** Claude Code, Cursor and Desktop are commonly all installed `-s user`; the last writer won on disk and USDC sent to the loser's address was unrecoverable once that process exited. The mint is published exclusively and the loser adopts the winner's key; an empty placeholder is claimed, not overwritten. - **A locked keychain never routes a Base user to Solana.** The chain selector's probes collapsed a read error into "absent" and memoised it for the process. "Unknown" is never memoised and never a Solana signal; the Base path fails loudly with its unlock message. - **The onramp's $0 quote is enforced**, not commented: the code signed whatever the 402 said, on the path that runs when something has already gone wrong. A keychain replacement of a DIFFERENT key is announced on stderr with the address being replaced, so a rotation nobody meant is visible the run it happens. ### Saying the true thing - **`served_model`, `finish_reason` and `truncated_output` ride on every chat reply**, and partial text survives a mid-stream failure. The free tier was re-swept with a realistic prompt: six of eleven routed ids answered as another model on both chains, so the tier keeps the five that echo their own name. `anthropic/claude-opus-4` — hidden from every listing, billed $15/$75 on the account rail — has a price row instead of reserving the $5/$30 default. - **`blockrun_speech` says when the charge stands** — a settled 200 whose body is unusable, on all three rails — the step video and music got in round three. `blockrun_realface` reads the status off the Solana helper's error instead of a regex that turned any "402" in a quote fault into "out of funds" plus a top-up page, and `action:"list"` asks the active chain's gateway with the active chain's address instead of minting an EVM key on a Solana install. `blockrun_image` polls the 202 the account rail hands back for any render past its 30s window instead of reporting "No image URL", and drops the `quality` parameter the gateway 400s for every listed model — the zod default of `"standard"` was failing every Base generate. - **`formatError` knows the rail.** An account-rail 402 says "out of credit", never "run setup"; a 5xx or transport failure after the payment left says the charge MAY stand instead of "try again in a few minutes"; the Base-only replay-nonce reading of "Payment was rejected" is a shared hedge, so a 30-second Exa blip stops telling a $50 wallet to top up. - **`action:"status"` reports this session's spend and cap next to the balance**, and `action:"report"` lists revoked agents with their kept spend. Polymarket `setup` no longer prints "🎯 Ready to trade" two lines under "❌ Region: BLOCKED", and the relayer SDK's progress lines go to stderr instead of the JSON-RPC channel. ### The release machinery `publish.yml` refuses a `package.json` below npm latest (npm publish does not compare semver; a typo'd `0.5.1` would have become `latest` and downgraded every `npx` user) — and only npm's own E404 is "none": a registry failure is "unknown" and refused, because that is the one input where the two differ and the downgrade goes through. The tag/release step is gated on the tag being absent, so a job that went red after the npm publish can be repaired by a re-run. `brand-sync` goes red when it cannot land a drift — a green run behind a 26-day-stale README was the exact failure it promised could not happen. `verify:prices` exits 2 when it could not look and reads the account rail's public pricing sheet as a third catalogue. The live Polymarket e2e scripts require `--confirm` before signing anything; every one installs the redacted exit handler. The test suite pins `HOME` and every rail-selecting variable for every file — ten mocked-handler suites were running their Base assertions on the account rail on any machine with `~/.blockrun/.api-key` — and a `node_modules` symlink that pointed at itself is no longer tracked. Context cost re-measured: 13.0K tokens for the full profile, `--profile trading` 58% less. ## 0.50.0 **Three audit rounds, each aimed at the one before it.** 0.49.0's thirty-seven fixes were written by six agents working in parallel, and this round went looking for what that costs. It found the shape immediately: each agent had hardened the rail it was looking at. The quote guard landed on video and image but not music and speech. The in-flight booking landed on Base and the account rail but not Solana, the default chain. Music's Solana call passed no `onQuote` at all, so the guard hook fired against nobody while the transfer was signed. Every one of those was a money path and every one passed CI. Thirty findings survived adversarial verification, and **not one was a P0 or a P1** — 0.49.0's own list had one of each. The read at the time was that the general search was spent, so the next change was not a fix but a table. That read was half right, and the half it got wrong is worth stating plainly. The general SWEEP was spent: another pass over the same files would have returned docs and cosmetics. What was not spent was the surfaces no sweep had opened. Round 3 went at the four the critic named and found a path that destroys a funded wallet key: an empty `~/.blockrun/.session` made the keychain gate and the loader behind it disagree, and the disagreement minted a new wallet over the funded one. Round 4 went at the surfaces still unread — the CI and publish workflows, `verify-prices`, the Apps UI, the protocol entry — and at the class that produced four of round 3's five findings: a comment stating a contract the code does not honour on some branch, platform or early return. Comments cannot fail a test, so nothing had ever checked them. The durable output of all three rounds is the same shape: where an assumption was load-bearing and lived only in prose, it is now a test. `rail-parity`, `axios-scope`, `scripts-redaction`, `scripts-spend-gate`, `doc-file-refs`. **The rail-parity matrix.** `test/rail-parity.test.ts` states, per paid tool and per rail, which treatments a paid call needs: a quote checked before signing, a re-reservation at the real price, in-flight booking, honest give-up wording, and the right ledger figure. A cell is a claim about the source, so adding a rail-specific guard without filling in its siblings turns the file red. It also pins the division that is deliberate — the seven tools whose 402 the SDK owns must NOT grow a quote guard, because they cannot see the quote — and fails when a paid tool is missing from the table altogether. It found four more gaps on its first run. ### The money paths - **A strict-keychain wallet could be moved off its funded chain by reading its own status.** 0.49.0's own P0 fix stored the new Solana key and deleted the session file, which is exactly what `getChain()` keys on — so the continuity pin was never written and the next start moved a funded Base user onto an empty Solana wallet. The pin is now written off the provisioning fact rather than re-derived from caches the mint just invalidated. - **Two concurrent callers minted two Solana wallets.** The cache was assigned after the await, and 0.49.0 made that reachable from two entry points at once, so one caller could be handed a funding QR for an address whose key was thrown away. Single-flighted — and the rejection is deliberately not cached, or unlocking a keychain and retrying would stay broken until restart. - **The order card could submit the same order twice.** The stale-amount guard re-enabled an armed Place button mid-submit, and its catch treated every transport failure as "nothing happened". Both now distinguish "we know nothing was signed" from "we do not know", which is the difference between a retry and a duplicate bet. - **The previewed worst fill is now enforced across the confirm**, not just inside one call: `max_fill_price` refuses a book that moved against the quote before anything is signed, and the card carries its own displayed figure. - **A chat call the account rail billed and then dropped booked $0** and read as a free failure, whose obvious next step is to pay for it again. - **An empty `~/.blockrun/.session` overwrote a funded key in the keychain.** The gate that decides whether to consult the keychain asked `existsSync`; the loaders on the far side of it trim the file and treat whitespace as no key. A zero-byte session file therefore read as present to the gate and absent to the loader, so the keychain was skipped, a new wallet was minted, and the mirror-back overwrote the entry that still held the funded key. `saveWallet` is a plain non-atomic write, so an interrupted one is enough to produce that file. Both rails now ask whether the file HOLDS a key, which is what `getChain()` already asked, twice, with comments saying why. - **`blockrun_music`, `blockrun_speech` and `blockrun_realface` signed whatever the 402 quoted**, with no sanity check and no re-reservation. **Giving up on Solana booked nothing** in video and music, and **speech, image and realface had no in-flight tracking at all**, so an abort after the gateway settled left a real charge unbooked. - **The ledger booked the reserve, not the charge.** `tx-fee.ts` has said since 0.40.1 that the gate and the ledger are different numbers, and one file honoured it. On Solana, where the gateway charges no transaction fee, an agent capped at $1.00 making only `blockrun_rpc` calls was cut off after 250 of them having actually spent $0.50 — and `action:"report"` said $1.00. - **A per-agent cap could refill itself.** `delegate` wrote `spent: 0` unconditionally, and `delegate` is a tool the model can call. A limit is the operator's to raise; spend already happened and is not theirs to erase. - **The Polymarket approval prompt never said what it was worth**: the default grants an unlimited pUSD allowance to four spenders. It says so now, before the signature, and names `POLYMARKET_BOUNDED_APPROVALS`. - **The relayer's double-send guard armed on failures that signed nothing** — credential derivation happens before the batch exists — and its 4xx detector never saw a CLOB `ApiError`'s status, so definite refusals looked ambiguous and wedged the user behind a deadline for a transfer that was never made. ### Saying the true thing - **"Your wallet needs funding" no longer appears on messages that say nothing was charged.** The uncharged markers gated one keyword clause, so a bare 402 or the word "balance" still earned the footer — including on this repo's own unreadable-quote refusal, which told a wallet holding $1,000 to top up. - **Account-rail errors are classified at all.** The status boundary excluded a following dot, which is what keeps `$402.50` from reading as a status — and also what made every `BlockRun account API error: 502.` fall through silently while the identical wallet-rail message got guidance. - **A locked keychain is not a missing wallet**, and telling that user to run setup invites a second one. - **`blockrun_video` and `blockrun_realface`** stopped offering a card top-up for a wallet that is not paying on the account rail, and the wallet card stopped offering card top-up on Solana, where it is not available. ### Around the edges The model catalogue cache is keyed by rail and chain (the two gateways do not serve the same one), `blockrun_models` is annotated as reaching the network because it does, the video poll timeout matches the gateway route's own 60s limit, `SOLANA_RPC_HEADERS` is honoured again so a private RPC works, a settled Solana response whose body will not parse still books the charge, and the MCP registry publisher is pinned and checksum-verified instead of curled from `releases/latest` into the job that holds the npm token. `keychainDelete` now answers the same on both backends: it documents "gone, including was never there", and only macOS honoured that, so a Linux miss reported the key as still in the keychain when it was not. Two comments were retired for saying things the code no longer does. `l1-auth-1271.ts` still opened by describing the ERC-7739 wrapped L1 signature as the workaround in force and closed by telling a future maintainer to delete the module once the upstream issue is fixed. The wrap was the wrong diagnosis -- the CLOB answers "Invalid L1 Request headers", both call sites derive as a plain EOA -- and the module now holds `deriveApiCreds`, so following that instruction would remove credential derivation and stop all trading. And the argument that `applyClobProxyOnce`'s process-wide `axios.defaults` mutation is safe (every axios importer is a Polymarket one, everything else uses fetch) lived only in a comment, which cannot fail; `test/axios-scope.test.ts` now fails the day a non-Polymarket module imports axios and would start routing through an operator's `POLYMARKET_CLOB_PROXY` unasked. **The live e2e scripts printed the wallet address they promised to hide.** Three of the four say in their own header that wallet addresses and transaction ids are never printed, and each implemented it with a different regex. The one in the two scripts that actually move money matched 64-hex only, which is a transaction hash; a 40-hex address went through untouched, and the withdrawal path really does interpolate a bridge response carrying an address into its error text. Worse, only the `isError` branch was ever redacted — a thrown exception printed the raw message and stack. There is now one redaction, covering every exit path, and a test that fails if a script grows its own regex again. `scripts/` is also in the typecheck now: these files import from `src` and were checked by nothing, so a signature change surfaced when someone ran them against a funded wallet. **`scripts/smoke-speech.ts` charged the wallet for being run.** No flag, no prompt, `limit: null` so nothing capped it, under a header advertising "real $0.001 speak" while the run ends with a $0.0525 sound effect. It now refuses without `--confirm`, states the real total, and carries its own budget cap. A static test holds the line for the next script like it: the check is deliberately not behavioural, since a test that proved the gate by running the script would charge the wallet on the day the gate broke. **The release automation could publish wrong numbers without failing.** Four scripts nobody had audited, each able to produce confident output from a failure. `measure-tool-schema.mjs` ignored JSON-RPC errors, so a server that answered `tools/list` with an error was measured as zero tokens across zero tools and printed as a real figure at exit 0 — with `--svg` that reached the context-cost cards as "0.0K tokens" and a literal "NaN% less". It also decoded the child's stdout per chunk, so an em dash split across a 16KB pipe boundary became a replacement character and quietly changed the count, which the in-process test could never catch because it measures through `InMemoryTransport`. `stamp-server-json.mjs` stamped nothing when no package entry matched, left the template's `0.0.0-template` in place (valid semver, so validation passes) and printed a success line claiming it had stamped — pointing every registry consumer at an npm version that does not exist. And `changelog-section.mjs` compared a realpath'd module URL against a non-realpath'd `argv[1]`, so from any checkout reached through a symlink it exited 0 with empty stdout, which in `publish.yml` skips the fallback and publishes a release with an empty body. All four now fail instead. **The brand-number sync wrote unvalidated remote JSON into the README.** Values fetched from blockrun.ai were rendered with `String(value)` and interpolated into `src="…"` and `alt="…"` with no escaping, then committed and pushed to the default branch weekly by an unattended bot with `contents: write`. A value carrying a quote or an angle bracket closed the attribute and injected markup into every consuming repo. Rendered values are now checked at the point of use — a number or a short plain label, nothing else — and escaped on top of that. Its `--check` also no longer prints the stale markers it found and then declares everything up to date. Two documentation claims that nothing was watching: the README said "same 20 tools either way" two lines below a marker rendering 19, and `docs/mcp-schema-overhead.md` kept a second copy of the profile-cost table that no test pinned. Both are now covered, along with the profile list itself, which was hardcoded in two places and would have left a newly added profile measured by neither. **CONTRIBUTING told new contributors to call the SDK directly.** Step 1 of "Adding a new MCP tool" was "copy `src/tools/surf.ts`", a file deleted with the tool in 0.49.0, and the payment section documented `client.getWithPaymentRaw` / `requestWithPaymentRaw` as the way to make a paid call. There are three payment rails and the SDK knows two: on the account rail it degrades to a plain Bearer fetch and discards the `x-blockrun-cost-usd` header, so a tool written from those instructions cannot report what it cost and books the wrong ledger figure. `src/utils/raw-call.ts` exists precisely so no tool picks a rail for itself, and every rail-parity bug this project has shipped came from one doing so. The steps now name files that exist and the helper that handles all three rails. `test/doc-file-refs.test.ts` fails when a doc names a repo path that is not there, and asserts that every path-based tool really does route through `raw-call`. ## 0.49.0 **The error says whether money moved.** Issue #132 reported `blockrun_markets` and `blockrun_price` failing with `API error after payment: 502 / Request failed` while the wallet balance never changed. The balance was right and the words were wrong, and the words were wrong on three layers at once. The gateway had said exactly what happened — `Predexon 500: An unexpected error occurred (payment NOT charged)` — but `@blockrun/llm` kept only the top-level `error` string when it sanitized the body, so the cause and the settlement status never reached this server. That is fixed in `@blockrun/llm` 3.15.1 (PR #39), which carries the gateway's message through as `detail`; this release depends on it and reads the new field, because our own extractor only ever looked at `message` and `hint` and would have dropped it a second time. The formatter's "not charged" branch, which already existed, finally receives the string it was written for. **Sports is degraded upstream, and the tool now says so.** All four Predexon `sports/*` routes have returned an upstream 500 on every call since 2026-08-04. The gateway marks them degraded, withdrew them from discovery, and releases the payment nonce on upstream failure, so a call costs nothing and returns nothing. This server still advertised them as live. The description, the prediction-markets skill and the crypto-data and surf skills now say the routes are degraded and point at `markets/search` with `{ q: "NBA" }` or `polymarket/events` with `{ search: "NBA" }` instead; a `sports/*` 5xx renders the outage, the date, and whether money moved rather than "temporary API issue, try again". The routes stay callable, because the gateway is the authority on whether Predexon has recovered. An earlier draft of this release steered users to the canonical `markets` route with a `league` filter. That route, `outcomes/:predexon_id` and `matching-markets` were removed upstream on 2026-08-04 — they answer 404 "Unknown Predexon endpoint" before payment — and no live `/v1/pm` route accepts `league` at all, so the headline remedy would have failed on first use across eight surfaces. Every one of them now names the two routes that quote a 402 today (probed unauthenticated, both gateways), and the dead routes are gone from the tool description and the prediction-markets skill. **"Nothing was charged" now needs the gateway's word for it.** The sports formatter asserted no charge from a 5xx status range alone. Only the gateway's upstream-failure branch releases the payment nonce, and only that branch writes "(payment NOT charged)" into the body; its catch-all 500 deliberately does not release, because settlement ran in the same try, and a 504 after settlement carries no body at all. So the sentence is now gated on that evidence — "not charged", "no charge was made", "no payment was made", or the 502's "Upstream provider error" — and any other labelled 5xx on a sports path keeps the outage explanation and the steer but says to check `blockrun_wallet action:"report"` instead, the same hedge a post-payment 501 already gets. Today every wallet-rail sports failure comes from the release branch, so the wording changes for nobody; it would have been wrong on exactly the day Predexon recovers and a settle-side error follows. **Surf is gone, and so is `blockrun_surf`.** The gateway has answered every `/v1/surf/*` path with HTTP 410 `endpoint_retired` since 2026-09-06 (`retired_on` in the body; `sol.blockrun.ai` 404s; `/api/openapi` lists no Surf route). No 402 is ever issued, so no payment could have been made — but the tool still reserved $0.0095 and, with `BLOCKRUN_CONFIRM_SPEND=on`, asked the user to approve a charge for a route that cannot succeed, while the SDK reduced the gateway's dated, reasoned notice to `API error: 410 — API request failed`. This release first made the tool answer with the retirement before any reservation, and then removed it: a tool that can only return an error is not worth the schema every agent carries on every turn, and the published brand artifact has said 19 tools since the delisting. The server now ships **19 tools**, the `trading` profile 8 and `research` 5. Former Surf questions route to `blockrun_price`, `blockrun_defi`, `blockrun_markets`, `blockrun_dex` and `blockrun_rpc`; the `surf` skill is now a map from each former endpoint to its replacement, and says plainly what has none yet (on-chain SQL, cross-chain wallet labels, CEX books, social mindshare). README, the crypto-data, gentech, rpc, blockrun and debug skills stop selling 83 endpoints at $0.0095. A config that still names the tool gets an unknown-tool error from its MCP client; nothing can be charged either way. **Prices say base plus fee, once, everywhere.** `blockrun_markets`, `blockrun_exa` and `blockrun_defi` hand-typed a "charged" figure in their descriptions that was the reserve ($0.002 fee), not the charge; the live `payment-required` header decodes to base + $0.001 on Base and base alone on Solana, and README disagreed with itself about which it was quoting. `blockrun_rpc` went the other way and quoted the bare $0.002 base while its own reserve and confirm dialog show $0.004. Every description and README row now states the base and says the gateway adds its flat network fee ($0.001 today; $0.002 reserved; the 402 header carries the exact amount). The reserve constants are untouched — they are the conservative gate and were right. **The registry manifest told Solana users to put a bs58 key in the EVM slot.** `server.template.json`, stamped into the MCP registry's `server.json` at publish, described `BLOCKRUN_WALLET_KEY` as "hex for Base, bs58 for Solana". The code reads Solana keys only from `SOLANA_WALLET_KEY`; a bs58 key in `BLOCKRUN_WALLET_KEY` selects Base and dies in viem's hex parser on the first paid call. The manifest now describes `BLOCKRUN_WALLET_KEY` as the 0x-hex EVM key and Polymarket signer, and lists `SOLANA_WALLET_KEY` and `BLOCKRUN_API_KEY` alongside it. **Equity quotes are not served, and the tool no longer sells them.** Since 2026-09-05 the gateway answers every `stocks/{market}/price` and `history` call (and the `usstock` alias) with a pre-payment 501: "We do not currently serve equity prices." This server's description, README and two skills still promised paid stock quotes, and on the default Solana chain the Base-only guard fired first and told the user to switch chains to pay for a route that cannot succeed. Paid stock calls now return the gateway's own answer before the wallet is consulted: withdrawn on 2026-09-05, nothing charged, the ticker catalog is still free, and who to contact for equity coverage. `formatError` also stops labelling any 501 a transient outage; it claims "nothing was charged" only when the 501 arrived before payment. **Pay what you were told, or nothing.** `npm run verify:prices` caught a third layer while this release was being cut: the Solana gateway is a separate deployment that can lag Base, and it does not know `azure/sora-2` — it quotes "Seedance 2.0 Pro video generation (5s)" at $1.135 in Sora's place, 2.7x the published rate, for a different model. The only check on the gateway's price was the budget cap, which would have let that through on any wallet holding $2. `blockrun_video` (both rails) and `blockrun_image` (Solana) now compare the 402 against the estimate the model was shown and refuse, unsigned, anything more than 1.5x above it; the message names the quoted amount, what the gateway labelled it, and how to proceed. The Solana helper hands callers the decoded 402 so they can judge what was quoted, not just how much. The price verifier classifies a Solana quote for a different product as a gateway bug to report rather than an estimator gap to paper over. ### From the audit With #132 fixed, the whole server went through a ten-angle audit, each finding argued against by an adversarial verifier before it counted. Thirty-seven survived; every one is fixed below, ordered by what it would have cost. **A strict-mode Solana wallet could be destroyed by reading its own status.** `ensureBothWallets` — reached by the default `blockrun_wallet` action and by `action:"chain"` — provisioned the Solana side through the SDK's file-only loader. Under `BLOCKRUN_KEYCHAIN=strict` the `.solana-session` file is retired once the key is in the keychain, so that loader saw an empty slate and minted a new keypair; the next key resolution then mirrored the new key over the funded one with `-U` and deleted the file. The funded key was in neither store. The Solana path now has the same shape as the EVM path (`ensureSolanaWallet`: env, then file, then keychain via a read that keeps "absent" and "failed" apart), refuses to mint when the keychain could not be read, and no longer memoises a miss — a wallet provisioned later is visible without a restart. Two more wallet facts came out of the same reading: a fresh install (where Solana is the default) died in the SDK constructor with "Private key required" on every status, setup, QR and deposit call before it ever reached the one action that creates wallets — `getWalletInfo` now provisions, and the client factory names the remedy; and the status screen read the Solana balance from the client's own key rather than the address it was displaying, so it could print one wallet's address beside another's balance — the balance is now queried by address, and an unreachable RPC reads as "unavailable", not $0. **Polymarket's money paths got a round of audit hardening.** A market order is now signed at the worst fill the preview showed — the dry-run walks the live book and prints `worst fill ≤ X` (buy) / `≥ X` (sell), and that X becomes the order's limit, so a book that thins between preview and confirm can only fill less, never worse; estimated sell proceeds are the walked total, not size × best bid. `withdraw` validates `to_address` with a strict checksum before any I/O and labels the destination honestly — "your agent wallet" only when it is, otherwise a loud CUSTOM warning — and a bridge error is reported as the bridge, not as CLOB geoblock advice (redeem got the same scoping). A relayer submit whose response is lost now leaves the signed withdrawal tracked with anti-retry guidance instead of inviting a double-send, and a signer rotation no longer inherits the old vault's `deployed:true`, so setup deploys the new vault instead of telling you to bridge funds into an address with no code. `fund` gains an optional `POLYMARKET_MAX_FUND_USD` per-call cap (unset = unchanged), and the order card refuses to place an edited amount until you re-quote. **A job that is already paid for is never abandoned, and never called free.** The account rail bills an async video or music job the moment the gateway accepts it, and until now every failure after that point lost the thread: a dropped poll or a stalled upstream fell out of `apiKeyAsyncPost` as a bare error, `isTimeoutError` matched the text, and the tool said "please try again" — advice that submits and bills a second job — while the local ledger booked nothing, because `finally` released the reservation and no one recorded the charge. Both rails now poll through transient disconnects and proxy statuses inside the existing deadline, as the Solana helper already did; and every give-up after a successful submit is a `BilledJobError` that carries the settled cost and the job id, which `blockrun_video` and `blockrun_music` book against the cap and report with the dashboard link and no retry advice. A submit that never answers says the job *may* have been billed — no charge was observed, so none is asserted, and none is denied. On the Base rail, a poll aborted while carrying the payment header can still settle server-side; the tools now say so and book conservatively instead of promising "no payment was taken", and `blockrun_music` books a completed poll before validating its payload, the fix `blockrun_video` received in 0.39.1. `blockrun_realface` books a settled 2xx before checking for `asset_id`. **`blockrun_phone` now refuses paths outside `phone/*` and `voice/*` before reserving budget.** Every other passthrough tool concatenates onto a fixed prefix; phone's prefix was `/v1/` itself, so no traversal was needed — `path:"modal/sandbox/create"` with an H100 body ran at phone's $0.012 unknown reserve, clearing any budget cap and showing the confirm dialog a number 16,000× too small. The route the gateway will serve (decoded, lower-cased, query dropped) is what gets classified, so encoded, cased, and query-suffixed spellings of in-namespace routes still pass and no spelling of an out-of-namespace one does. **The chat price table said it held every model priced above the $5/$30 default; two flagships had been sitting above it for weeks.** `openai/gpt-6-astra` and `anthropic/claude-fable-5.1` ($10/$50 on both gateways) now have rows, and `npm run verify:prices` sweeps the live catalogue so the eighth cannot go unnoticed — it also fails when a row reads below the live rate, when a "free" model starts costing, and when an Anthropic row over-books the native ledger, which is how `claude-sonnet-5` drops to its real $2/$10 after a 1.5x over-count. A chat call that settled and then stalled mid-stream now says so on every path, without the "needs funding" advice the routing loop's own note used to earn from the formatter. `thinking.budget_tokens` is reserved only for Claude, as the schema always promised. The native ledger reads the gateway's dashed echoes (`claude-fable-5-1`) as their catalogue key instead of prefix-matching a sibling's rate. "Free" is a set, not a vendor: `cohere/north-mini-code` and `poolside/laguna-xs-2.1` reserve $0. And a 5xx the gateway marks "(payment NOT charged)" finally says, in the tool's voice, that nothing was charged (#132). **The tests can no longer spend, and the guards can no longer skip.** `image-cost.test.ts` said the paid client was mocked, and it was — but `blockrun_image` decides its rail from the account key before it ever asks for that client, so on a developer machine set up for account mode the suite left the mocks and posted to the gateway with the real key. The rail is now pinned to a temp `HOME` with no key before the tool loads, and the shared fetch helper is a trap, so an escape fails for the right reason. The confirm-spend guard keyed on `reserveBudget` and skipped any file without one — the one offender it could not see was a tool that pays and never reserves; it now reads the payment surfaces off the imports and holds every one of them to reserve *and* confirm, and `blockrun_image` finally has its own row in the decline table. `blockrun_price`'s equity pre-flight is proved at the handler, not as a string: before the chain guard, the budget gate and the confirm dialog. Two smaller honesty fixes ride along: a `BLOCKRUN_BUDGET_LIMIT` that does not parse (`5,00`, `0`, `5 USD`) now says on stderr that the cap is OFF instead of silently running unlimited, and the image-edit confirm dialog names the real path of every local file about to leave the machine — a symlink is shown as its target. **The startup key scanner no longer tells a user who followed the docs to rotate their wallet.** `BLOCKRUN_WALLET_KEY` / `SOLANA_WALLET_KEY` under `mcpServers.*.env` is the documented override — on Claude Code it is the only way to set it — yet every launch printed the "treat this key as compromised" banner. That location now gets a short note (the file is plaintext and synced; prefer `~/.blockrun/.session` or the OS keychain), the banner is reserved for a key somewhere it was never meant to be, a raw key hiding in `args` is finally caught, and the Cursor and Windsurf config files the README documents are scanned too. Around it, four smaller honesty fixes: an unknown `--profile` says so instead of quietly loading all 20 tools (and whitespace/case no longer count as a typo); the update notice stops recommending a `claude mcp add` that refuses an existing name; `blockrun_dex` validates the token address before it goes into the URL path; and `skills install --help` exits 0. CI now runs the full suite on Node 20.19 as well as 22, which `engines` has claimed since the badge went up. Also shipping, landed on `main` since 0.48.0: - **`blockrun_image` reads the settled cost on the account rail** instead of an estimate that was high by the transaction fee the rail does not charge, and stops labelling an exact figure "estimated" (#140). - **OpenClaw is verified** end-to-end on 2026.8.2 with the published `npx` package, with install notes on spend confirmation per chat surface; the `deepseek/deepseek-v4-pro` rate follows the gateway's repricing (#131). - Brand numbers refreshed from the canonical snapshot (#141). Two adversarial passes (a fresh-context Claude subagent and Codex) reviewed the change; every finding was addressed, including the two that mattered: a post-payment 501 must not claim nothing was charged, and the sports matcher must use the same labelled-status rule as `formatError` so an incidental "501 items" in a 4xx body is not sold as the outage. ## 0.48.0 **A key can live in a file, not just an environment variable.** Write it to `~/.blockrun/.api-key` and account mode picks it up — same directory the wallet already uses, and for the same reason that file exists: a stdio MCP server is launched by its client, and several clients make setting an environment variable awkward or impossible. `BLOCKRUN_API_KEY` still wins when both are present, mirroring how `BLOCKRUN_WALLET_KEY` outranks `~/.blockrun/.session` — an explicitly exported key is a deliberate override and must not be shadowed by whatever is left on disk from an earlier account. An empty or unreadable file falls through to wallet mode rather than taking the server down; a malformed one still fails loudly, and now names which source it came from. Also: a 429 from the account API surfaces its `Retry-After` instead of burying it in the response body. It is the one part of a rate-limit response a caller can act on, and an agent told only "rate limited" retries immediately and is refused again. Both were carried over from **@KillerQueen-Z's PR #136**, which implemented account-key support in parallel and had these two details the shipped implementation did not. That PR is closed as superseded — 0.46.0 and 0.47.0 had already landed the same feature, and it could no longer merge — but the ideas were the better ones and are here with credit. Tests 458 → 462. ## 0.47.0 **Account mode stops guessing.** 0.46.0 shipped API-key billing with one honest limitation: it could not tell you what a call cost or how much credit was left, so it printed a local estimate with a `~` and a dashboard link. The account API gained both signals today, and this release consumes them. `blockrun_wallet action:"status"` now reads the real balance from `GET /v1/credits`: ``` Account: acme (ungated) Spent to date: $4.5239 (invoiced account — no prepaid ceiling) ``` A prepaid account shows `Credit remaining: $12.50 of $50.00 granted`; a blocked one says so, and why, *before* you spend a call discovering it. A read failure degrades to the session figure rather than failing the whole status call. **Per-call costs are now the settled amount, not an estimate**, everywhere the account API reports one: `search`, `exa`, `surf`, `markets`, `rpc`, `defi`, `phone`, `modal`, `music`, `speech`, `video`, `realface`. That is not cosmetic — `BLOCKRUN_BUDGET_LIMIT` and the per-agent `delegate` caps book what they are told, and they were booking an estimate that ran high by exactly the transaction fee this rail does not charge. A 19-character speech render now books $0.000998 where it used to book $0.0031. `blockrun_chat` keeps its estimate, because chat settles after the response by design and holding the answer until the money landed would be a worse trade; anything still estimated prints a `~` and says so. Getting there meant routing account calls around the SDK. On that rail there is no 402 to perform — no quote, nothing to sign, no retry-after-payment — so `requestWithPaymentRaw` degrades to a fetch with a Bearer header, which `utils/api-key-call.ts` already does, and does better: it reads the response instead of discarding it. `utils/raw-call.ts` is now the single place that picks a rail, so eight path-based tools stopped choosing one for themselves. Wallet calls still go through the SDK, where the 402 dance is real work worth not reimplementing. **Two traps worth naming, because both read as success.** `Number("")` is `0`, not `NaN`. A present-but-empty cost header parsed with a bare `Number()` would book $0 against a genuinely billed call — the exact confusion the header exists to remove, reintroduced in the reader. Empty, malformed and negative all read as absent; an explicit `0.000000` is preserved, because a charge that really settled at zero is not the same as no charge settling at all. `remaining_usd ?? 0` would tell a paying customer in good standing that they are broke. An invoiced account legitimately has no prepaid ceiling, so `remaining` is null and the correct thing to show is spend-to-date. Two independent clients hit this within a day of the endpoint shipping. `blocked_reason` is a code, not a message, so it is mapped to a remedy here — `ACCOUNT_SUSPENDED` must not advise topping up, which would not lift it. An unrecognised code degrades to naming the code rather than reading as "not blocked", which would send an agent on to a call the proxy has already refused. Tests 449 → 458. ## 0.46.0 **An API key is now a way to pay, and Solana is the chain you start on.** Until now there was exactly one way to use this server: hold a wallet, fund it with USDC, sign every call. That is the right default and it stays the default — but it rules out every team that cannot hand a private key to an agent. So `BLOCKRUN_API_KEY=brk_live_…` is a second rail: sign in at [user.blockrun.ai](https://user.blockrun.ai), mint a key, add credit, and the same 20 tools bill an account instead of a wallet — post-paid at exact usage, with no per-call minimum and no per-call transaction fee. No wallet is created, read, or stored in that mode. It is not a chat-only shortcut. `api.blockrun.ai` vendors the gateway's routes, so a key reaches the whole tool surface: chat, images, video, music, speech, search, Exa, Surf, prediction markets, DefiLlama, RPC. Verified against the live service, then reconciled against the account ledger — music billed $0.1575 against a $0.1595 estimate, speech $0.001050 against $0.0031, each high by exactly the $0.002 transaction fee the account rail does not charge. Costs displayed in this mode are therefore labelled estimates and point at `/dashboard/activity`, because the account API returns no per-call price and there is nothing this process could read back. Polymarket trading, wallet balances and top-ups, and `blockrun_realface action:"list"` genuinely need a keypair; they now say so in a sentence instead of failing with an SDK error. Two defects found while wiring it, both of which would have cost real money. `client.getSpending()` **throws** on the account rail, and `blockrun_chat` called it three times per call outside its try block — unguarded, setting a key would not have degraded chat, it would have broken every call before the request was sent. And every client factory called `getOrCreateWalletKey()` eagerly, which *mints*: writes `~/.blockrun/.session`, mirrors the key into the OS keychain, announces a new wallet. Someone paying by invoice would have had a keypair created and stored for them on their first call. Credentials now resolve inside the branch that needs them, and a test asserts nothing appears under `~/.blockrun`. **Solana is now the default chain for a fresh install** — but only for a genuinely fresh one. `getChain()` gained a step ahead of the fallback: an existing Base wallet keeps Base. Without it this release would have been a silent destructive migration, moving every Base-only user with no `.chain` file onto an empty wallet, their next paid call failing on a zero balance with nothing on screen connecting the two. That is the same class of bug `.chain-auto` exists to prevent, arriving from the opposite direction. **Five "Base-only" refusals are gone, because they were stale rather than protective.** Unpaid 402 probes against `sol.blockrun.ai` cost nothing — the quote arrives before any signature — and they settle it: music, speech, sound-effects, RealFace and Portrait enrolment, and native `/v1/messages` are all served there, and have been for a while. `blockrun_music`, `blockrun_speech` and `blockrun_realface` were sending funded Solana users to switch chains for no reason. Only `blockrun_defi` (404) and `blockrun_modal` (503, unconfigured) are real gaps, and both now route through `baseOnlyMessage()`, which is inert on the account rail — so an API key reaches them anyway. Also fixed: async job poll URLs resolve through `resolveGatewayUrl()` instead of string concatenation. A job is billed at submit, and the old `BLOCKRUN_API.replace(/\/api$/, "") + poll_url` would have sent every account-mode poll to the wallet gateway, unauthenticated, for a result that could then never be collected. And `/v1/audio/voices` needs a Bearer token on the account rail — 401 without one, where both wallet gateways serve it open — so `action:"voices"` was silently degrading to the built-in alias list, a fallback that looks exactly like success. README, skills and the configuration table updated throughout: a comparison of the two rails, the signup and top-up walkthrough, a capability matrix, and Solana ahead of Base. The absolute "no API keys" claims become "no API key **required**" — the differentiator survives, and it is now true. Tests 431 → 449. ## 0.45.1 **The context number gets its own card instead of being the second of nineteen badges.** 0.45.0 published the figure but buried it — a shields badge in a row with `MIT License`, `TypeScript 5` and `Node ≥20.19`, which are table stakes, next to the one number nothing else in the ecosystem publishes. It now sits directly under the install command as a card: the figure large, a reference unit that makes it mean something (6% of a 200K context window), the `--profile trading` alternative at −57%, and the line that matters — *every turn, whether or not you call a tool*. The card is generated by `npm run brand:card`, never drawn by hand, so it cannot outlive the number it states; `test/schema-tokens.test.ts` checks both the light and dark variants against a live measurement and fails the build if either drifts. Light and dark ship as separate SVGs behind ``, because an SVG cannot restyle itself from the host page. ## 0.45.0 **Every tool schema got smaller, and the README now tells you by how much.** Installing an MCP server spends your context on every turn — the client loads each tool's schema into the model's prompt and re-sends it for the whole session, whether or not you ever call the tools. Package managers have shown install size for thirty years; almost no MCP server shows this. Now ours does: a `🧮 12.9K Context Tokens` badge, and a table of what each profile costs at the point where you are already choosing one. `--profile trading` is **57% less context** than the default for the same trading workflow — already true, never stated. The harness that produces the number ships too: `npm run measure:schema`, and `-- ` points it at any other stdio MCP server, so the claim is checkable by anyone against anyone. `test/schema-tokens.test.ts` fails the build when the README disagrees with the live server, asserting the published figure rather than a raw count so wording edits do not break CI but a real regression does. Alongside it, 300 of those tokens are simply gone. The SDK's zod→JSON-Schema conversion stamps `"$schema": "http://json-schema.org/draft-07/schema#"` onto every tool's `inputSchema` — 15 tokens each, on all 20 tools, that no code path in the reference SDK ever reads and that its bundled validator never receives. It is not our string and the SDK exposes no way to suppress it, so `stripJsonSchemaDialect()` wraps the `tools/list` handler through the public `setRequestHandler`. It is never load-bearing: if a future SDK stops routing that way the wrapper stops matching and the header simply returns. Honest about the rest: 54% of what remains is tool *descriptions*, not schemas, and that work is not done. Numbers are `o200k_base`, a proxy — Claude's tokenizer is not public and runs higher on JSON — so every figure published is a slight under-count, never an over-count. ## 0.44.0 **Two MCP Apps: a Polymarket order card and a wallet panel.** Hosts that implement the MCP Apps extension — Claude Desktop, claude.ai, VS Code, Cursor, ChatGPT — now render `blockrun_polymarket_read` previews and `blockrun_wallet` results as interactive cards instead of text. The order card shows the question, outcome, side, best quote in cents, estimated shares, notional, a per-order cap meter and the session ledger; the amount is editable and re-quotes through the read-only tool; *Place order* is a two-click arm/confirm that asks the host to call `blockrun_polymarket` with `confirm:true`, so the host's own consent prompt and every server cap still apply, and the result (order id, status, tx) lands back in the card and in the model's context. The wallet panel shows both chains, switches the active one, copies an address, shows an EIP-681 / Solana Pay QR, opens the explorer, and mints the card on-ramp link. Hosts without the extension — Claude Code, Codex, Gemini CLI, Windsurf — ignore `_meta.ui` and see exactly the text they saw before. Bundles are single-file HTML built from `apps/` into `ui/`, shipped in the tarball, registered only for profiles that expose the tool, and pinned by `test/apps.test.ts`. Rendered and screenshotted in the MCPJam inspector against the published server; `docs/mcp-apps.md` has the host table and the money-path explanation. **A bare `token_id` now resolves to its market.** `resolveToken` returned only the id, so the card could not name the market and the closed / accepting-orders guard never ran on that path. Gamma indexes markets by CLOB token id; the preview asks it best-effort (4 s, spread-safe `{}` on failure) and fills question, outcome, conditionId, closed and acceptingOrders. The preview payload also carries bestQuote, minSize, maxBetUsd and the session ledger so nothing downstream has to parse prose. ## 0.43.0 **Every paid tool now asks before it spends.** Spend confirmation via MCP elicitation (`BLOCKRUN_CONFIRM_SPEND=on`) shipped in 0.25.0 wired into `blockrun_image` alone; the other thirteen paid tools — chat, video, music, speech, realface, search, exa, markets, surf, defi, rpc, modal, phone — reserved budget and signed the x402 payment without a word. Each now pauses at its budget gate with the estimated charge, before the first request leaves the machine. A decline sends nothing, charges nothing, and releases the reservation; free paths (`chat mode:"free"`, crypto `price`, free `phone` and `realface` actions) never prompt, and `blockrun_polymarket` keeps its own per-order `confirm:true`. Still off by default, still fails open on clients that cannot render a dialog — the README now says which can (Claude Code, Cursor, VS Code) and which cannot, and `docs/spend-confirmation.md` says when to use it and when to use budgets instead. `test/confirm-spend-coverage.test.ts` makes the coverage a guarantee rather than a habit: every tool that reserves budget must confirm, and with a declining client every one of them must leave `budget.spent` at zero and the network untouched. That second check caught the first draft of this change, which had placed nine of the confirms outside their `try` and leaked the reservation on decline. **`blockrun-mcp skills list | install`.** The skills have shipped inside the npm tarball for months with no way to use them short of cloning the repo or the Claude Code plugin marketplace. `npx -y @blockrun/mcp@latest skills install` copies them into `./.claude/skills`; `--global` targets `~/.claude/skills`, `--to ~/.codex/skills` any other directory, `--only a,b` a subset, and `--force` refreshes copies after an upgrade while leaving the user's other files in those directories alone. It never deletes. **Three skills for the agent that runs the install, not the tool calls.** `blockrun-setup` (the nvm/Homebrew `-e PATH="$PATH"` rule first, one command per client, prove it with the free `blockrun_wallet` call, back up the key), `blockrun-debug` (symptom → cause → fix for every Troubleshooting row, plus the three things never to do: retry a 402, delete `~/.blockrun/.session`, or suggest a Polymarket withdraw), and `blockrun-upgrade` (npx caches by spec, so `@latest` restarts upgrade and a bare spec never does; how to prove the version, what changed, how to roll back). Each was written against a baseline run without it: the unaided agent reached for `nvm alias default` instead of the PATH passthrough, described the key as keychain-only, and refreshed copied skills with `npm pack` and `tar`. `BLOCKRUN_BUDGET_LIMIT`, which the server has honoured since 0.2x, finally appears in the README configuration table alongside the two confirm variables. ## 0.42.0 **`blockrun_video` now pays on Solana as well as Base.** The Solana route uses the gateway's payment-on-completion async flow: the job POST is issued once, idempotent poll GETs tolerate transient disconnects, and their SVM transaction is re-signed with a fresh blockhash every 20s so a slow Seedance 2.5 render can settle at the end of a true 15-minute total budget (quote + submit + polling, every request clamped to what is left). A gateway re-challenge is pinned to the original amount, recipient and fee payer, and a payment signature is never sent to a poll URL off the gateway's origin. A settle-failure 402 is read from its `PAYMENT-RESPONSE` reason: a funding problem surfaces as one, while the gateway's documented stale-blockhash re-sign path is bounded and, if exhausted, reports the still-claimable job id instead of "out of funds". A poll answer carrying a settlement receipt is booked before its body is validated, so a truncated payload cannot erase a real charge from the ledger. **`BLOCKRUN_KEYCHAIN=strict` broke Solana image payments.** `blockrun_image` on Solana (and the new video route) loaded the wallet through the SDK's file-only loader, which cannot see a key that strict mode has moved into the OS keychain, so a funded wallet was reported as missing. Both now resolve the key the same way `blockrun_wallet` does. ## 0.41.1 **`BLOCKRUN_KEYCHAIN=strict` could mint a new wallet and orphan your funded one.** 0.41.0 shipped `keychainLoad()` returning `null` for two different facts: the keychain has no entry, and the keychain could not be read. Under `strict` the plaintext file is already gone, so the caller took a transient read failure — a locked keychain, an ACL denial, a timeout — as "no wallet here" and fell through to `getOrCreateWallet()`, which does what its name says. The funded wallet was still sitting in the keychain; the MCP just started signing with a fresh empty one. `keychain.ts` names this exact scenario as the worst possible failure in a comment at the read site, and then nothing acted on it. Reads now return a discriminated `found` / `absent` / `error`. Only `absent` may create a wallet. An `error` with no file left stops with an actionable message naming the keychain fault and pointing at `BLOCKRUN_WALLET_KEY` — a loud failure is recoverable, a silently substituted wallet is not. `auto` mode was never exposed: the file it keeps is found first. **The music poll deadline is now real code rather than an assertion about constants.** The `0.40.x` guard asserted `auth - margin < submit + budget + timeout + auth`, which contains `auth` on both sides and is therefore true for every input — it verified nothing. The deadline calculation moved into `pollDeadline()` and the test now exercises it: the poll budget binds at today's constants, the authorization takes over above the 445s crossover, and a poll attempted at the deadline is refused rather than issued. ## 0.41.0 **The wallet key can now live in the OS keychain instead of a plaintext file.** `~/.blockrun/.session` is mode `0600`, which stops other UNIX users and nothing else — a malicious postinstall script, a backup agent syncing `$HOME` to iCloud, or a log collector that slurps dotfiles all read it as easily as we do. That is the same class of leak `utils/key-leak-scanner.ts` already exists to catch after the hosted-MCP flow put keys in `~/.claude.json`. On macOS and on Linux boxes with `secret-tool`, the key now moves behind an OS-mediated API: mirror newly-resolved keys into it, and read from it once the plaintext file is gone. Windows and keychain-less Linux are unchanged, and the MCP stays pure JS — no native dependency, no loss of `npx` portability. Storage is controlled by `BLOCKRUN_KEYCHAIN`. The default, `auto`, **keeps the plaintext file**: the CLI, the SDK and a long tail of scripts read `~/.blockrun/.session` directly, so deleting it by default would break tools this package does not own. `strict` opts into actually retiring the file, and `off` disables the keychain entirely. `BLOCKRUN_WALLET_KEY` still outranks both stores, matching the SDK's own precedence — and so does the key file whenever it exists. Both rules defend the same thing: replacing `~/.blockrun/.session` is how a wallet gets rotated or restored from a backup, so a stale keychain entry from a previous wallet must never shadow it. Reading the keychain ahead of a file still sitting on disk would have signed every payment with a wallet the user believed they had replaced, and in `auto` mode it bought nothing anyway — the plaintext file is right there for the same attacker to read. The keychain becomes the authoritative store exactly when the file is gone, which is what `strict` is for. Two things the read-back guard protects against. `security` exits 0 on a write to a locked keychain that then reads back empty, so `strict` verifies the stored key byte-for-byte before unlinking anything — a wrong answer here destroys the only copy of a key holding real USDC. And the secret never touches `argv` on either platform (`security -i` on macOS, stdin on `secret-tool`), because `ps` is world-readable; the `-w` stdin-prompt alternative was avoided on its own merits, and is also reported to truncate at 128 bytes (a figure inherited from Circle's CLI, not reproduced here — nothing in this implementation depends on it). `getChain()` gained a matching last-resort branch. Its Solana autodetect keys off a non-empty `.solana-session`, which `strict` deletes — so hardening a Solana wallet would otherwise have flipped the user to Base and met them with "Base-only" refusals from a wallet they never funded. Keychain technique adapted from Circle's CLI (Apache-2.0); the implementation here is our own. ## 0.40.3 **Slow Seedance 2.5 jobs now finish instead of timing out at 5 minutes.** The client-side polling budget was 300s, but production 30s clips measured 479s, 400s and 275s — so two of three failed on a hard cap that had nothing to do with the gateway, which had already moved to async submit plus short polling requests. The budget is now 540s. Nothing about pricing or settlement changed; the jobs were completing upstream all along, and the client was hanging up on them. **The 9-minute budget can no longer outlive the payment authorization it runs under.** The obvious version of that fix is off by one loop iteration. The signed EIP-3009 authorization dies at `startedAt + 600s`, and a 540s budget looks like it leaves a minute of margin — but the deadline check only bounds when a poll may *start*. The loop then adds a 5s interval sleep and a 90s poll timeout, so a poll entered at 539.9s stayed in flight until 635s: 35 seconds *past* `validBefore`, not 60 seconds inside it. That tail is not cosmetic. Settlement happens server-side on the poll the gateway answers `"completed"`, so a poll outliving its authorization fails settlement for a video that actually rendered — the same failure `blockrun_music` shipped once and was fixed by raising its window to 600s. Worse, the client books local spend the moment it observes `"completed"` without checking that settlement succeeded, so the expired tail could record a ledger charge for USDC that never moved: the mirror image of the bug that booking order was introduced to fix. Lowering the budget would have defeated the point — staying inside 600s unclamped requires 445s, which fails the 479s job the change exists to support. Instead the loop clamps its last poll to the budget that is actually left (`pollTimeoutFor`), which pins worst-case wall time at exactly 540s and makes the 60s margin real. The authorization window is now a named constant used where the payload is signed, rather than a `600` literal restated in the test, and the clamp is covered by a swept property test: a poll started at any reachable instant finishes on or before the deadline. ## 0.40.2 A housekeeping release. One correction users can actually see, and three fixes to the machinery that was quietly wrong underneath it. **The documentation was misleading Solana users.** `blockrun_modal` and `blockrun_defi` both settle on Base only — they carry the same `getChain() !== "base"` guard as music, speech and video, and the live dual-chain sweep confirms why: on sol.blockrun.ai every modal route answers 503 and defillama/protocols answers 404. But the README's Base-only list never named them, so a Solana user read that list, concluded those two worked on their chain, hit the guard, and had no way to know it was expected. Behaviour was always right; only the list was wrong. **The release pipeline's registry guard was reading the wrong number.** `registry.modelcontextprotocol.io/v0/servers?search=...` paginates at 30 rows with `isLatest=false` on every one, so the old `.find(isLatest) || a[a.length-1]` resolved the last row of page one — 0.32.8, frozen since July — and called it the current registry version. That was wrong on every run and visible on almost none: a real release has a genuinely new version, so the comparison came out true for the wrong reason and published correctly anyway. It only bites when `package.json` changes without a version bump, where it fires into a guaranteed `400 cannot publish duplicate version`. Fixed with the `&version=latest` parameter, which returns exactly one row. **Two dependency advisories closed in our own tree.** `fast-uri` 3.1.2 → 3.1.5 (three host-confusion advisories) and `ip-address` 10.2.0 → 10.5.0 (three SSRF and trust-boundary bypasses), both arriving through the MCP SDK and both pinned inside the range their parent declared. Worth being precise about who this helped: a fresh `npm install @blockrun/mcp@0.40.1` already resolved both to the patched versions, because npm picks the newest match for `^3.0.1` and `^10.2.0` at install time. The stale copies lived only in this repo's `package-lock.json`, which is what CI installs from — so CI had been running its tests against vulnerable versions while every user was fine. Also worth stating plainly: the `ip-address` advisories concern SSRF, and this server ships an SSRF guard, but the two never touched. `src/utils/ssrf.ts` has no imports at all; the private/loopback/link-local checks are pure Node and were never built on the vulnerable parser. **`VERSION` had drifted eight minors** behind `package.json` (0.32.6 vs 0.40.1). Nothing in the repo reads it — publish.yml takes the version from `package.json` — but external release tooling computes the next version from it, and off 0.32.6 that proposes a number already published. No tool changes, no pricing changes, no API changes. 20 tools, unchanged. ## 0.40.1 An audit release: no new features, eleven confirmed defects fixed, nearly all of them found by probing the live gateway rather than by reading the code. Seven touch money directly. Provenance is worth stating plainly, because it is the argument for auditing in rounds. Two came in with 0.40.0. Six were older — one of them a guard that had been inverted since 0.33, under a comment mandating the opposite order. And three were introduced by THIS AUDIT's own first round and caught by its second, including a $0 budget reservation and an incomplete version of the very fix below it. Every fix here was re-attacked before it shipped. **Budget gate** - **`fix(budget)` — chat reserved against two hardcoded constants, both wrong.** `$5/M input` and `4 chars/token` produced a reserve that live 402 quotes beat on a 100k-character prompt: gpt-5.4-pro by 9.90x ($1.460020 charged against $0.147480 reserved), gpt-5.2-pro 6.96x, o1 4.93x, claude-fable-5 3.30x, and claude-opus-5 — the DEFAULT primary of `mode:"powerful"` — 1.65x. `mode:"fast"` was 2.46x short because 0.40.0 documented gemini-3.5-flash's 3x reprice without moving the estimator off the cheap heuristic. Reserves now come from a real per-model table (the named model, or the tier's most EXPENSIVE member, since the loop can fall through to any of them) at the gateway's own ~2.08 chars/token. Cushion is 1.12–1.20x across 18 probed cases. - **`fix(budget)` — a settled call that then failed was never booked.** x402 settles on the 200, before the body is read, and every paid path streams — so a mid-stream failure left the USDC gone, `budget.spent` unmoved, and the reservation released: the ledger showed a free call. The routing loop then tried the next model and settled a SECOND payment under the same single reservation. Settled spend is now booked on the throw path, and the loop stops once anything has settled (free models settle $0, so `mode:"free"` still falls through as designed). - **`fix(budget)` — native Claude calls were booked at Anthropic's list price.** The ledger multiplied response tokens by $15/$75 for opus, while the gateway resells opus at $5/$25 and settles the QUOTE (which prices output at 10% of max_tokens, floors at $0.001, and adds the transaction fee). A default claude-opus-5 call settles $0.003660 and was booked as $0.03 — an 8x over-count, so a budget cap tripped at an eighth of its allowance. - **`fix(budget)` — a prototype key reserved $0.** `CHAT_PRICE_PER_MTOKEN[model] ?? DEFAULT` let `Object.prototype` members through (`model:"constructor"` resolves to a function, which survives `??`), producing NaN and then a $0 reservation the gate approves unconditionally. The same fail-open the modal GPU table already documents — reintroduced by the fix above and caught by this audit's own regression pass. **Security** - **`fix(security)` — an expensive route could be bought at the cheap tier's reserve.** `phone/numbers/buy` (fetch deletes the tab) and `phone/numbers/%62uy` (the gateway decodes it) both reach the $5.001 buy route while the classifier matched neither and reserved $0.012 — 417x short, which clears every budget cap. `blockrun_modal` was worse: it never used the shared helper at all, so `sandbox/create` reserved $0.003 against a $192.00 non-refundable 24h H100 create. `normalizeClassifyPath` now decodes once and deletes tab/LF/CR, mirroring `hasPathTraversal`, which has done both since 0.33 — the same asymmetry, in the same file, for two releases. **Correctness** - **`fix(video)` — grok honours `resolution`, and lost its margin.** xai/grok-imagine-video now prices 480p ($0.05/sec, default) and 720p ($0.07/sec) and rejects anything higher, but the handler forwarded resolution only for Seedance — so a caller asking for 720p silently got 480p and paid for 480p. The same probes show grok no longer carries the 5% margin (Sora still does), so the two per-second models needed separate formulas; forwarding the parameter without splitting the rate would have under-reserved 720p by 1.33x. - **`fix(wallet)` — the first-run chain pin overrode `SOLANA_WALLET_KEY`.** `ensureBothWallets()` preserved the active chain through `setChain()`, i.e. an explicit `~/.blockrun/.chain`, which outranks everything — so a clean install wrote `.chain=base`, and an operator who later set `SOLANA_WALLET_KEY` stayed on Base with no way to discover why. The pin moved to its own `.chain-auto` file, ranked below the env var and above session autodetect, and `setChain()` now deletes it. **Found by this audit's own second pass** (each fix was re-attacked; two of the three were defects in the round-one fixes themselves) - **`fix(security)` — the control-char strip ran AFTER the decode, in both path helpers.** Each transformation is right alone, which is why every test passed; nesting one inside the other defeats both. A tab SPLITTING a percent-escape makes `decodeURIComponent` throw, the catch falls back to the raw string, and the later strip leaves the escape uninterpreted: `phone/numbers/%62uy` classified as the $0.012 unknown while the gateway quotes $5.001, and `sandbox/%63reate` as $0.003 against $192.001. Worse, `hasPathTraversal` had the same inversion — since 0.33, under a doc comment mandating the opposite order — so `%2e%2e/phone/numbers/buy` escaped the tool's namespace entirely and reached the $5 phone route on `blockrun_surf`'s $0.0095 reserve, defeating profile scoping too. - **`fix(budget)` — vendor-less model ids reserved the default.** The gateway serves `gpt-5.4-pro` and `openai/gpt-5.4-pro` at the identical price (and bare `gpt-oss-120b` free), but the tables key on the prefixed form only, so a bare id fell to $5/$30: 5.16x short on gpt-5.4-pro. The mirror case made a bare free id reserve like a paid one and silenced its truncation warning. - **`fix(speech)` — the 60s timeout was shorter than the model's own ceiling.** `bytedance/seed-audio-1.0` can emit 120 seconds of audio, so a long render was aborted after its payment signature had been sent — losing the clip, and with it any record of a settlement that did go through. Raised to 180s, and the timeout message now says a charge may stand. - **`fix(wallet)` — existing installs are told when their stored preference is overriding `SOLANA_WALLET_KEY`.** Deleting a pre-0.40.1 `.chain` automatically is not safe: nothing distinguishes the machine-written file from a real `action:"chain"` choice — that is exactly the information the old behaviour destroyed. So `blockrun_wallet` now says so, with the one command that fixes it. **Tooling** - `npm run verify:prices` gains a row per routing tier plus the five above-default models; it had probed only `balanced`/gpt-5.6-terra for four releases, which is why none of the above was visible. Its Solana check no longer conflates "dearer than Base" with "not covered by the reserve" — only the latter blocks a release, so the gate stops crying wolf over the deliberate cross-chain price difference. ## 0.40.0 Catalog sync against the live `GET /v1/models` (2026-08-12, 91 models on both chains). The July snapshot had drifted: two free-tier models died by aliasing (one of them still routed in `mode:"cheap"`), and the gateway had shipped a new Seedance SKU, a new TTS provider, and nine new chat models. - **feat(chat) — catalog and tiers resynced.** `anthropic/claude-opus-5` now leads powerful/reasoning/coding (live-probed); `qwen/qwen3.7-flash` ($0.03/$0.13 — the cheapest paid model in the catalogue) and `tencent/hy3` join cheap; `openai/gpt-5.6-luna` (cut to $0.2/$1.2) and `google/gemini-3.5-flash-lite` join fast. Documented new arrivals: the gpt-5.6-`*-pro` reasoning trio (terra-pro at $1/$6 is deliberately HALF the standard Terra rate — gateway registry, not a pricing bug), gpt-5.5-pro, chat-latest, gemini-3.6-flash, qwen3.7-plus, xiaomi/mimo-v2.5-pro. Prices refreshed throughout (terra $2/$12; glm-5 RAISED to $1/$3.2 — Z.AI raised its list, so it leaves the cheap tier; gemini-3.5-flash $1.5/$9). - **fix(free) — dead aliases removed from the routing loop.** `nvidia/deepseek-v4-flash` (which also sat in `cheap[]`) and `nvidia/seed-oss-36b` now answer as `nvidia/gpt-oss-120b` on BOTH chains (probed 2026-08-12 with a realistic prompt): routing to them was a slower spelling of free[0], billed as a model the caller did not choose. Removed. `nemotron-3-nano-omni-30b-a3b-reasoning` no longer aliases on Base (0.97s, serves itself) and is promoted into `free[]`; `mistral-nemotron` demoted below step-3.7-flash (24.9s on sol vs the 1.7-12s healthy band). - **feat(video) — `bytedance/seedance-2.0-mini`** ($3.5/M tokens ≈ $0.080/sec at 720p, 4-15s, 5s default, 480p/720p only; supports RealFace and first/last-frame). Estimator pinned against the live 402 at all three probed tiers — each quote sits exactly the known $0.001 fee gap under the reserve. - **feat(speech) — `bytedance/seed-audio-1.0`**, prompt-directed audio (describe the voice/emotion/staging in the input text; the `voice` param is ignored). Billed per estimated output second: $0.003/sec, CJK-aware chars→seconds (0.105s Latin / 0.225s CJK per char), 120s cap, and NO 5% margin on top — the per-second rate is final retail. Mirrors the gateway's `estimateSpeechSeconds` exactly; verified against the live 402 and pinned by `test/speech-cost.test.ts`. - **fix(music) — `minimax/music-2.5` removed from the enum.** The gateway delisted it on purpose: same price as 2.5+, but upstream rejects `is_instrumental` on it (MiniMax error 2013) and this tool defaults `instrumental:true`, so every default call to it would 400. Pinned old callers are remapped to 2.5+ server-side. - Known and external, NOT fixed here: the sol gateway still serves pre-2026-08-07 prices for the gpt-5.6 tiers (the cut IS in blockrun-sol's repo — deployment lag), and its repo has not taken the DeepSeek cut or the Z.AI glm-5 raise, so deepseek-chat/reasoner are DEARER on sol than Base (a direction the pricing policy defines as a bug) and glm-5 sells below COGS there. `verify:prices` fails its Solana direction gate on exactly this until sol ships; every MCP reserve still covers the sol charge (we reserve the Base figure and the chat gate is deliberately conservative), so the budget gate is safe meanwhile. ## 0.39.1 Closes the three money-path holes 0.38.1 documented as "known and unfixed" — all in `blockrun_video`, all pre-existing, all now pinned by `test/video-money-path.test.ts`. - **`fix(budget)` — an unreadable 402 amount aborts BEFORE signing.** When the quote's `amount` failed to parse (missing, non-numeric, non-positive), the old path skipped the re-reserve, signed a payment authorization for the raw unvalidated value, and booked only the estimate — the last remaining way past the budget cap. Now: fail closed with "no charge was made", nothing signed, reservation fully released. Never sign what you could not read. - **`fix(ssrf)` — `image_url` / `last_frame_url` get the guard `blockrun_image` already had.** Scheme check (zod's `.url()` accepts `file://` et al.) plus resolved-host check via `isBlockedFetchHostResolved` — resolved, not literal, so wildcard-DNS names like `127.0.0.1.nip.io` are caught. This process never fetches these URLs (the gateway's fetcher does), so the guard is defense-in-depth plus a saved round trip: a private/metadata address was previously forwarded, quoted, and paid for before failing server-side. - **`fix(budget)` — a malformed "completed" poll can no longer un-book a real charge.** Settlement happens server-side on the first poll the gateway answers with `status:"completed"` — the USDC is gone the moment the client observes it. The old path validated the payload first: a completed body with no clip URL threw, the catch returned an error, and `finally` released the reservation — a real charge the ledger never saw, silently raising the cap by the lost amount. The spend is now booked at the instant "completed" is observed, before any payload validation; the caller still gets the error. The first draft of this fix double-booked the happy path (poll site AND the old tail call) — caught by the new test's exactly-once assertion, which is why it asserts on the ledger, not on the error text. 309 tests pass. ## 0.39.0 The Seedance capability tables, re-derived from token360's OWN published parameter schema (GET /v1/models/{id} → parameter_schema) — a source nobody had ever read; every table in every repo predated knowing it existed. Sibling of blockrun PR #353 and blockrun-sol PR #133, which land the same truth in the gateways, so client and server can no longer disagree. - **`fix(video)` — per-model resolution sets tightened to the schema.** 0.38.1 (yesterday) tightened toward the gateway's tables; live probing shows those tables were themselves wrong, in both directions: | model | 0.38.1 allowed | schema truth | |---|---|---| | 1.5-pro | 360p-1K | **480p / 720p / 1080p** | | 2.0-fast | 360p-1K | **480p / 720p** | | 2.0 | t2v narrow · i2v 360p-1K+4K | **480p / 720p / 1080p / 4K, both modes** | | 2.5 | 360p-720p | **480p / 720p** | The t2v/i2v split is gone — the schema is per-model, everything it lists passes in both modes, and 540p/1K hard-reject upstream even image-conditioned (the pay-then-lose path the 0.38.1 guard half-closed). A few off-schema values do pass upstream validation (2.0-fast 1080p, 1.5-pro 540p) and stay blocked anyway: "passes validation" is not "renders" — 1.5-pro historically echoed 2K/4K, billed the requested tier, and rendered 720p. - **`fix(video)` — `360p`/`540p`/`1K` leave the resolution enum, `9:21` leaves the aspect-ratio enum.** No Seedance model lists any of them, and 9:21 is rejected upstream for the whole family. Probed at $0: token360 validates duration → resolution → ratio → other params, so a deliberately invalid LATER parameter (ratio "9:99"; output_format "avi" when testing ratios) guarantees rejection after the parameter under test is judged, and a failed submit never creates a task or bills. RESOLUTION_TOKEN_FACTOR drops the same tiers — the estimator throws on anything missing, so a stale entry is a loud failure, not a silent 720p-baseline reserve. - **`fix(video)` — the resolution guard's advice now names the real ceiling.** 2.0-fast is told 720p is its ceiling (0.38.1 wrongly offered it 1080p/1K — the exact bill-high-render-low trap shape). - **`test(video)` — the t2v/i2v split test became the no-split test**, and the factor-coverage test iterates the trimmed enum. verify:prices drops the 2.0@360p tracking probe (inexpressible from this client now) and keeps 2.5@1080p: the gateway still quotes $3.55 for a render token360 refuses — the defect blockrun PR #353 fixes — so that probe reports the moment the fleet is consistent. Breaking (deliberately — hence a minor bump, not a patch): a stale caller sending `resolution:"360p"` or `aspect_ratio:"9:21"` now gets a zod enum error instead of a paid round trip or an upstream 400. For Sora/Grok callers, removed `resolution` values were accepted no-ops; `9:21` was NOT a no-op on Sora — it selected portrait orientation — and `9:16` is the exact replacement. One removed value did produce billed output before this release — seedance-2.0 image-conditioned 360p passed every layer — but it is exactly the off-schema shape that can silently downscale while billing the requested tier, which is why the schema is the line. The `aspect_ratio` description also stops claiming Sora/Grok both ignore it: the handler forwards it for every model, SORA uses it to pick portrait vs landscape, and Grok is the one that truly ignores it (the gateway never forwards it to xAI). 303 tests pass; live gate: 0 under-reserving. Also shipping in 0.39.0 (landed on main as #97, recorded here because releases are cut from this file): the price sweep now probes BOTH gateways — Base charges base + $0.001, Solana base + $0.000, and a Solana price DEARER than Base fails the gate since an agent can switch chains mid-session; `blockrun_defi`/`blockrun_modal` gained the Base-only chain guard six other tools already had; eleven skills' flat prices were re-read off the live 402; and dFlow left the catalog (all three routes 404 at the gateway). The dual-gateway sweep also gives the 2.5@1080p fleet-consistency probe its other half for free: Solana already 400s it (blockrun-sol#130's cap) while Base still quotes it — one line of output now shows the split until blockrun#353 deploys. ## 0.38.1 Review pass over 0.38.0. The model addition held up; the guards and the tests around it did not. - **`fix(video)` — the 4K guard lied to Sora and Grok, and rejected instead of ignoring.** Both bill per second and never read `resolution` — the schema says so ("Ignored by xAI/Sora"). 0.38.0's guard rejected them anyway, with *"is billed for 4K but downscales"*, which is false for a per-second model, and steered the caller to a 2-6x more expensive Seedance. `resolution` is now **dropped from the body** for those two rather than rejected, which is what "ignored" has to mean: forwarding it earned a gateway 400. - **`fix(video)` — per-model, per-mode resolution windows replace two ad-hoc rules.** The old pair (global 4K rule + a 2.5 special case) got the order wrong — 2.5 + 4K hit the 4K branch first and advised *"drop to 1080p"*, which the very next line also rejects — and missed `seedance-2.0`'s text-to-video window entirely: 360p / 540p / 1K are rejected upstream in t2v but fine with a seed image. `SEEDANCE_RESOLUTIONS` now mirrors the gateway's own three branches, keyed on whether the call is image-conditioned. Live-probed: 2.0 t2v @360p is a gateway 400, and the guard now catches it before the round trip. - **`fix(video)` — the estimator throws instead of guessing.** `?? 0.05` priced any model missing from the rate tables as grok — a 6x under-reserve for a Seedance, delivered silently, which is the one direction this repo treats as a release blocker. Same for `?? 1` on an unlisted resolution (a 9x under-reserve at 4K). Both now throw. Lookups are `Object.hasOwn`-guarded: a plain object literal resolves `"constructor"` to a function, which survives `!== undefined`, makes the arithmetic `NaN`, and `withTxFee` turns that into a **$0 reservation the budget gate always allows** — the same fail-open that reached production once via the modal GPU table. - **`test(video)` — the headline feature was untested and silently revertible.** The test named *"seedance-2.5 accepts 30s"* passed **31**, which the window rejects, and asserted a regex that could not match under any implementation. Proven by mutation: cutting 2.5 back to 4-15s left all 9 tests green. Six mutations are now caught (the 30s window, 4K on 2.0, a reintroduced image discount, the duration floor, the 1080p factor, re-forwarding `resolution` to Sora) — verified by running each one. Three other assertions were vacuous the same way, including one written *in this review* whose price regex matched the budget limit rather than the estimate. The suite now proves acceptance, not just rejection: a sentinel `fetch` mock catches anything that reaches the network, and a tiny budget makes the gate report the number it was asked to reserve. - **`fix(docs)` — prices in the tool description mixed two conventions.** 0.38.0 converted Seedance to the charged rate and left Sora and Grok quoting the *base* ($0.10 and $0.05/sec, "$0.40/clip") in the same bullet list, next to a test pinning both at $0.421001 — the base-as-price confusion the 0.38.0 entry claims to have eliminated. Both now quote the charge, as does README's range. `blockrun_realface` and its README row now say RealFace assets do **not** work with 2.5, which nothing said before. - **`fix(changelog)` — 0.38.0's `2K` rationale was wrong.** It said no SKU honors 2K and it "bills anyway". The gateway 400s 2K for every model before quoting, so it was never billable. Corrected in place. - **`fix(video)` — the 2.5 720p ceiling is now PROVEN, and the gateway is wrong about it.** 0.38.0 blocked 1080p/1K on 2.5 from a registry comment, with no probe behind it — a guess that could have deleted a real capability. Settled by a paid probe: 1080p and 1K were submitted at **both** t2v and i2v, and token360 refused all four (*"the parameter resolution specified in the request is not valid for model dreamina-seedance-2-5"*). It cost **$0.00** — nothing settles on a failed submit, only on a completed poll. The gateway does NOT enforce this. `checkUnsupportedVideoInput`'s `is20` regex never matches `2.5`, so it falls to a permissive fallback and quotes **$3.551218** for a 1080p render upstream will reject — a 402 signed against a doomed request, surfaced as a 500 the error path calls *"temporary — try again in a few minutes"*. Any non-MCP caller can still hit this. Reported, not fixed here; it belongs in the gateway. - **`test(prices)` — the sweep now probes combinations the guards REFUSE, and prints the cushion.** A guard is a claim about the gateway; the only thing that checks it is a probe. `seedance-2.5 @1080p` is pinned precisely because it still quotes — the day it returns `no 402`, the gateway defect above is fixed. Separately, all 13 video probes printed `✓ exact` while over-reserving by exactly $0.001 — the local `TRANSACTION_FEE_USD` (0.002) against the gateway's current 0.001. That gap **is** the entire safety margin, and the fee has moved twice; it is now printed rather than swallowed by the tolerance. **Known and unfixed:** an unparseable 402 `amount` skips the re-reserve, pays the raw quote, and books only the estimate — the last remaining way past the cap (pre-existing). `image_url` / `last_frame_url` get no SSRF guard here though `blockrun_image` applies one (pre-existing). And a malformed *completed* poll throws after the gateway has settled, releasing the reservation without booking the spend (pre-existing). ## 0.38.0 Seedance 2.5 lands on the gateway, so `blockrun_video` offers it — and probing its price for the first time showed that every video estimate in this server, Seedance or not, reserved less than the gateway charges. - **`feat(video)` — `bytedance/seedance-2.5`.** Long-form Seedance: **4-30s** against 2.0's 15s ceiling, multilingual, ~$0.315/sec. It is deliberately NOT presented as an upgrade over 2.0, because it isn't one — it trades resolution for length. 2.5 caps at **720p** where 2.0 renders true 4K, and it supports neither RealFace nor first-and-last-frame interpolation. Both models stay listed and the tool description says which to reach for. The capability flags are conservative on purpose, and enforced client-side: `real_face_asset_id`, `last_frame_url` and any resolution above 720p are rejected before the 402 rather than after payment. That asymmetry is the whole point — token360 bills the tier it was ASKED for even when it silently downscales, so a wrong "yes" here is a charge for output you didn't get. Upstream also defaults 2.5's `duration` to `-1` ("model picks the length"), which a prepay gateway can never forward; the MCP always states 5s unless the caller asks otherwise. - **`fix(video)` — every video model under-reserved, by the margin and the fee.** The per-second table held the BASE price. The gateway charges base × 1.05 (margin) + the flat transaction fee, so the budget gate reserved short on all nine model/duration combinations — $0.021 on a 30s clip, and 9× short had anyone requested 4K, which the estimate did not model at all. This is the fourth time in this repo that reading a base as a price has cost money, and the first time on the most expensive route it has. `estimateVideoCost()` now mirrors the gateway's own formula — duration × tokens/sec × resolution factor × per-1M rate × margin, then `withTxFee()` — and takes `resolution`, so 1080p (~2.25×) and 4K (~9×) are priced up front instead of only at the 402. Live-verified against the gateway: 13 video probes, 0 under-reserving. - **`fix(video)` — Seedance repriced; the image-to-video discount never existed.** token360 cut its per-1M rates (1.5-pro 4.32→3.108, 2.0-fast 11.2→7.252, 2.0 14→9.9715) and this table never followed, so the base was *also* 30-40% high — two errors in opposite directions, which is exactly why neither showed up as an obviously wrong bill. Per-second, at 720p: **1.5-pro $0.070** (was $0.092), **2.0-fast $0.165** (was $0.238), **2.0 $0.227** (was $0.298), **2.5 $0.315**. Separately, the "image-to-video tier" ($0.140/$0.183 per second) is not a thing upstream — only *video*-to-video is discounted. Image jobs were gated at ~60% of their real cost. One rate per model now, matching the registry. - **`fix(video)` — duration and resolution windows are enforced client-side.** The schema advertised 1-60s for every model and the description claimed a 10s Seedance ceiling; the real windows are 1.5-pro 4-12s, 2.0/2.0-fast 4-15s, 2.5 4-30s, sora-2 exactly 4/8/12, grok 1-15s. All are now checked before the request, with a message naming the model that *can* do it. `2K` left the resolution enum: no Seedance SKU renders it, and the gateway 400s it for every model *before* quoting — so it was never billable, only a guaranteed round trip. (An earlier draft of this entry said it "bills anyway"; a live probe says otherwise, and the fee-shaped claim was wrong in the direction that flatters the change.) - **`test(prices)` — video joined `npm run verify:prices`.** Video was the last paid estimator the live-402 probe did not cover, which is how a 30-40% stale rate table and a missing margin both survived in the single most expensive call this server can make. Thirteen probes now pin all three pricing axes (model, duration, resolution). Probing stays free — no payment is attached. `test/video-models.test.ts` pins the same figures as literals *read off the live 402*, not recomputed from the estimator's own constants; a test that re-derived the formula would have passed while all nine models under-reserved. ## 0.37.1 Makes every skill in this repo actually installable, and adds the entry-point skill that says which of the twenty tools answers a given question. - **`feat(skills)` — all thirteen skills are registered.** Nine of them (`crypto-data`, `surf`, `rpc`, `search`, `image-prompting`, `phone`, `modal`, `gentech-blockrun` and the new core skill) sat on disk while `.claude-plugin/marketplace.json` listed only four, so `/plugin marketplace add` could not reach them. No decision was ever taken to withhold them: entries had been added alongside the skill that prompted them, and the rest were never backfilled. Now 13 on disk, 13 registered, no orphans. Verified by installing rather than by reading the JSON — `claude plugin marketplace add` against the checkout, then `install` plus `plugin details` on `blockrun`, `search`, `rpc`, `signal-to-trade-demo` and `gentech-blockrun`. Each reports `Skills (1)`. That also settles a standing question about the layout: a plugin directory with `SKILL.md` at its root and no `.claude-plugin/plugin.json` does register its skill, which is what every entry here has always relied on. - **`feat(skills)` — new `skills/blockrun` core skill.** The entry point the repo lacked: tool routing, how the wallet works, and how to get a first call working for free. Wallet, budget and x402 mechanics live in `rules/wallet-and-payment.md` so `SKILL.md` stays small enough to load on every match — measured at ~405 always-on tokens against ~3.1k on invoke. It deliberately carries no price table, and says why: every flat per-call price published in this repo's other skills is one retired `$0.002` transaction fee too high, because each was a typed copy. It points at `blockrun_models`, the `402` itself and `llms.txt` instead. - **`fix(skills)` — seven claims in the new skill corrected against `src/`.** Found by reviewing it against the code rather than the marketing copy. The worst two were the same failure the skill itself warns about: `routing: "free"` is not a parameter — `blockrun_chat` takes `mode`. Because the tool declares a raw zod shape, the SDK strips the unknown key rather than erroring, `mode` falls through to `"balanced"`, and the paragraph headed "Free, no wallet, no key" made a paid frontier call. And "six open-weight chat models" is eight; that count and the RPC chain count are now `br:` markers fed by `brand-numbers.json` and enforced by `sync-brand-numbers --check` in CI, because an unmarked number is invisible to that check — which is precisely how the prices drifted. Also: `blockrun_polymarket_read` was missing entirely, so "what are my positions?" routed to the money-moving tool rather than the free read-only one; `blockrun_realface` was listed in the frontmatter but had no row, so it was advertised and unroutable; `action:"deposit"` is the Coinbase card onramp (`launchTopUp`, Base only), not "deposit details", which is why the funding steps hand-rolled `POST /api/v1/onramp/token` instead of calling the tool that does it; `api_key="not-needed-for-free-models"` appears nowhere in this repo or in either SDK and was dropped; and the free tier does not truncate *silently* — `freeTierTruncationNote()` reports the dropped fraction through the MCP, so only the direct HTTP path is silent. Tool coverage is now 20/20 against the names registered in `src/`, in both the frontmatter and the routing table, with no orphans in either direction. Known and not fixed here, each wanting its own pass: the flat prices in the other eleven skills are still a fee high, and `skills/prediction-markets` still advertises dFlow, whose three paths have returned upstream 404 since 2026-08-04. A partial sweep would leave those files half-right, which is the failure mode that produced the drift in the first place. ## 0.37.0 Takes the two Polymarket SDK majors that had been sitting unreviewed, so the CLOB module and Franklin's port of it share one baseline again. - **`chore(deps)` — `@polymarket/clob-client-v2` 1.0.8 → 1.1.0.** `postOrder` gained `waitForResolvedTrades`: when an order matches, the client now back-fills the settlement transaction hashes of its fills, and the return type tightens from `Promise` to `Promise`. `orders.ts` already read `transactionsHashes` and `tradeIDs` off the response, so this makes an existing display path more often correct rather than changing it — `filled` and the `tx:` line now resolve on matched orders instead of only when the server happened to include them. Verified against the shipped bundle rather than the release notes, because no test here places an order: an unmatched order returns untouched with zero polls and zero added latency (the resting-limit path is unaffected); a response that already carries hashes short-circuits; `FAILED` trades are filtered out, so a failed fill can never be reported as a settlement hash; and the worst case — `getTrades` failing persistently — was measured end to end at **30.1 s** (`RESOLVE_TRADES_TIMEOUT_MS`, 250 ms poll), after which it degrades and returns the placed order rather than throwing. The added latency lands only on matched orders, and it is bounded. - **`chore(deps)` — `@polymarket/builder-signing-sdk` 0.0.8 → 1.0.0, with an override.** 1.0.0 is a pure CJS→ESM port: every non-import change in the bundle is `exports.X` → `export` boilerplate, the HMAC signing logic is untouched, and it drops `tslib` plus a stale `@types/node ^18` that should never have been a runtime dependency. It needs an `overrides` entry because `@polymarket/builder-relayer-client` still pins `^0.0.8`, and a caret on `0.0.x` is patch-only under npm semver — so without it npm installs a second copy, and both `BuilderConfig` declarations carry a private `ensureValid`, which TypeScript compares nominally. Collapsing to one copy is safe for a specific reason worth recording: relayer-client **never requires the signing SDK at runtime**. It is a type-only dependency, consumed by duck-typing (`builderConfig.generateBuilderHeaders()`, `.isValid()`), with no `instanceof` check anywhere in its bundle, and nothing else in the tree requires it either. The CJS/ESM seam was then exercised for real: a 1.0.0 `BuilderConfig` handed to the CJS `RelayClient` produced correct `POLY_BUILDER_*` headers across the boundary. Note that npm `overrides` do not propagate to consumers, so an installed `@blockrun/mcp` gets both copies on disk. That is harmless for the same reason — nothing loads the nested one. Neither upgrade adds a transitive dependency: clob-client-v2's dependency set is identical between the two versions, and builder-signing-sdk's is strictly smaller. 282 tests, typecheck, build and brand-numbers `--check` green, plus an MCP stdio smoke (20 tools listed) and the CLI load smoke without `sharp` — which CI now runs on every pull request rather than only here, since a broken module graph is exactly the class of failure 0.32.3 shipped. ## 0.36.0 Live-probes the three pre-payment rules 0.33.0 shipped on inference rather than evidence. Two were wrong, and both cost users real money. The paid-call queue that shipped alongside them is removed: measured, it protected nothing and cost 2.68x on concurrent calls. - **`fix(markets)` — `markets/listings` is blocked again; it is retired upstream.** Verified against the live gateway: the route settles a payment and THEN returns **410 Gone**. 0.33.0 unblocked it because blockrun's own registry still lists, prices, and advertises it — but the gateway only proxies, and Predexon has retired it. Registry presence is not evidence that a route serves. #81 had this right and the 0.33.0 change was the regression. - **`fix(markets)` — `window` is no longer treated as a smart-money cohort filter.** Verified: no params 400s, `{ window: "7d" }` alone **also** 400s, and `{ min_trades: "100" }` alone succeeds (window then defaults to `all_time`). `window` scopes the time range; it does not define the cohort. 0.33.0 counted it as a filter and passed a guaranteed paid 400 straight through. The check now requires a smart-wallet criterion and says why when only `window` is present. - **`fix(markets)` — the candlestick interval whitelist is gone.** Verified on one market: omitting `interval` succeeds, `1440` succeeds, `1h` 422s, and `60` returns a paid **400**. Which integer intervals a market can serve is data-dependent, so a client-side numeric whitelist both blocks valid calls and still lets paid failures through. Only the shape is checkable client-side: non-numeric is rejected, integers pass. - **`perf` — the process-global paid-call queue is removed.** 0.33.0 serialized every paid data call on the reasoning that "concurrent authorizations from one wallet can race at the settlement layer". Measured, that protects nothing: Base mints a fresh random 32-byte nonce per payment (`x402.ts:235`), so two concurrent authorizations can never collide; the real Solana collision is handled inside `@blockrun/llm` by making each payment distinct — the dependency floor is raised to `^3.8.4` here, because `^3.6.1` admitted seven published versions with no distinctness at all and the lockfile pinned the oldest of them. Its check-and-add is synchronous on the common path (the exhausted-nonce branch does await, which is unreachable below 65 identical payments per blockhash), so it is concurrency-safe without a caller queue. The tools that *did* have a concurrency bug (`chat`'s settled-cost delta) were never in the queue — they use a fresh non-cached client instead. Cost of keeping it, measured on 4 concurrent `markets/search` calls: **+4025ms (2.68x)**, with the unserialized arm returning 4/4 clean. Closes #89. Tool description and the `prediction-markets` skill corrected to match. 282 tests, typecheck, build, brand-numbers `--check` and the CLI load smoke green; `verify:prices` reports 0 under-reserving routes. ## 0.35.0 `bytedance/seedream-5-pro` in the image tool, with a min-dimension price tier. - **`feat(image)` — `bytedance/seedream-5-pro` (Seedream 5.0 Pro) in `blockrun_image`.** Eight upstream sizes: $0.045 base covers 1024x1024, 1280x720 and 2048x1024 — the cheapest widescreen/banner option in the catalog — and $0.09 covers the four large formats up to 2848x1600. Generate only; the gateway rejects it for edits (and rejects unlisted sizes) before any payment is created. All three boundary sizes are pinned by new `verify:prices` probes. - **`fix(image)` — large-size tiers can now key on the smaller dimension.** Seedream's tier boundary is min(w,h) > 1024, probed live across all eight catalog sizes: 2048x1024 bills base while 2048x2048 bills $0.09. The previous max(w,h)-only rule could not express that — either it over-billed 2048x1024 at 2x or under-reserved 2048x2048 past the budget cap. Per-model `LARGE_SIZE_MIN_DIM_MODELS` picks the axis. ## 0.34.0 `google/nano-banana-2` in the image tool. - **`feat(image)` — `google/nano-banana-2` (Gemini 3.1 Flash) in `blockrun_image`.** Pro-level quality at Flash speed: $0.09 catalog base, 1024x1024 only (the gateway rejects any other size before payment is created, so a wrong size costs $0), supported for both generate and edit. Priced against the live 402 quote and pinned by a new `verify:prices` probe. The edit-rejection message is now derived from `EDIT_MODELS` instead of hand-listing models, so the next model addition cannot leave it stale. - **`docs` — model listed in the README tool table and the `image-prompting` skill's decision table.** ## 0.33.0 A 20th tool, MCP safety annotations that describe effect instead of price, and pre-payment request validation (#81). - **`feat(polymarket)` — `blockrun_polymarket_read`, a read-only companion tool.** `positions`, `orders`, and a live CLOB `preview` that builds real order economics from the book but has no `confirm` input and cannot sign or submit. `blockrun_polymarket` keeps every action for compatibility, but mixing reads with real-money writes forced that whole tool to be marked destructive; clients enforcing annotations can now inspect a position or price an order without approving a funds-affecting call. Trading profile goes to 9 tools, the default surface to 20. - **`feat` — every tool carries an MCP safety annotation, assigned by effect.** `destructiveHint` means "irreversible update" and is only meaningful when `readOnlyHint` is false; it says nothing about money, and MCP has no cost hint. Paid data queries (`markets`, `search`, `exa`, `surf`, `defi`, `price`) are therefore read-only — marking them destructive because they settle $0.0095 made annotation-honoring clients demand approval for a plain lookup. Spend control stays where it belongs, in the budget ledger. Two tools got *stricter*: `rpc` (`eth_sendRawTransaction` can broadcast) and `modal` (executes arbitrary code) are now destructive alongside `phone` and `polymarket`. A test fails if a new tool ships unannotated — under the spec that silently defaults to destructive. - **`feat(markets)` — request contracts validated before the x402 payment is created.** A guaranteed-4xx call now costs $0 instead of a settled fee: Gamma-only params (`active`, `closed`, `order`, `ascending`) on `polymarket/markets{,/keyset}`, a non-integer candlestick `interval` (`60`, not `1h`), `polymarket/orderbooks` without a valid millisecond range, and an unfiltered smart-money call. Deliberately narrow: rules are pinned to the gateway's own route/param registry, and unknown paths pass through, so a new Predexon route is never blocked by a stale client. - **`fix` — paid data calls from one wallet are serialized.** Concurrent x402 authorizations can race at the settlement layer and get one otherwise-funded call rejected. Covers the fast paid-data tools (`markets`, `surf`, `exa`, `search`, `rpc`, `defi`, paid `price`); the 60–180s media tools stay concurrent on purpose, since queueing a 5ms price lookup behind a video render trades a rare failure for a guaranteed one. Waiters give up after a bounded wait so one hung call can't wedge every paid tool until restart. - **`fix(errors)` — a validation bug no longer reads as an outage, and an outage no longer reads as an empty wallet.** A post-402 failure carrying a 4xx is an actionable client error, not a transient blip, so it loses the "try again in a few minutes" advice. A 5xx now has to look like an HTTP status to count — LLM errors are full of incidental 5xx-shaped numbers ("max_tokens 512 is above the limit"), and retry guidance there hides a real bug. Conversely, a post-payment failure with no parseable status is still an upstream failure, so it stops falling through to "your wallet needs funding". - **`fix(polymarket)` — market buys are priced against real book depth.** An empty ask book is rejected instead of producing a preview the CLOB can't execute; a FOK buy the book cannot fill is rejected before signing; and the minimum-share check now runs on the estimated fill for market orders, not just limits, with the minimum spend quoted at the live best ask. - **`docs`** — packaged `signal-to-trade-demo` skill plus a Stanford runbook, and `docs/` no longer ships in the npm tarball. ## 0.32.9 Closes the external-review backlog: all 8 findings from the Kimi K3 review (#72) and both unabsorbed pieces of @KillerQueen-Z's #59/#66 (#71). - **`fix(polymarket)` — the withdraw retry double-spend window is closed (#72.1).** The relayer SDK's `wait()` polls 200s and returns `undefined` for BOTH an on-chain failure and a timeout, while the signed batch stays executable until its 300s deadline — and our error text said "re-run", an instruction that could double-send a partial withdrawal. Now: `sendWalletBatch` asks the relayer which case it is and says so (a failure is retry-safe; a pending batch gets "Do NOT retry" + the remaining window); every withdrawal batch is tracked in the state file while in flight, and `action:"withdraw"` refuses to sign a second transfer until the previous one resolves or its deadline passes (unreachable relayer counts as pending — the conservative side). Per-operation guidance replaces the hardcoded "re-run setup" advice everywhere (#72.5). - **`feat(polymarket)` — withdrawals sweep legacy USDC.e (#71).** Withdrawable balance is now pUSD + USDC.e; any shortfall beyond the pUSD on hand is wrapped through the collateral onramp first (`wrap(asset, to, amount)` signature verified against the onramp's Sourcify exact-match source). Sweep design from #59/#66, with the wrap preview in the dry-run and the post-wrap balance re-read before bridging. - **`fix(polymarket)` — `amount_usd` parsing no longer truncates through float noise.** `BigInt(Math.floor(usd * 1e6))` sent $19.989999 for a $19.99 request; amounts now round to the exact micro-dollar and over-precision / non-positive values are rejected. (The #66 draft's absolute 1e-7 tolerance sat below the float-noise floor and rejected honest amounts like $1234.56; 0.01 micro separates noise from genuine violations.) - **`fix(polymarket)` — redeem refuses to guess the adapter (#72.3).** A missing `neg_risk` field now falls back to the order book and errors out if both sources are silent, instead of silently treating "missing" as "standard market" — the wrong adapter is the no-op redeem class. The confirm path also now refuses unresolved markets up front (#72.6) instead of submitting a batch that reverts on-chain. - **`fix(polymarket)` — setup verifies the deploy landed at the DERIVED address (#72.4)** by reading contract code on-chain (3×750ms) before recording `deployed:true`, so a relayer factory/salt divergence can never point approvals and funding at a nonexistent wallet. - **`fix(polymarket)` — ClobClient cache key includes the deposit wallet (#72.2)**, so a wallet change within the process lifetime can't keep building orders against the old `funderAddress`. - **`fix(polymarket)` — `roundToTick` absorbs float-division noise (#72.7).** `0.58/0.001 = 579.9999…` floored a buy to 0.579 (one tick under the stated limit); on-grid prices now survive unchanged, off-grid still rounds conservatively by side. - **`fix` — creds/state writes are atomic (#72.8)** (tmp + rename), so a crash mid-write can't corrupt the credentials or deposit-wallet mapping that reads then silently swallow to null. - **Bounded e2e scripts from #66 are in-tree (#71)**: `npm run e2e:polymarket:{readonly,approvals,approve,withdraw,live}` — readonly and approvals verified live against the local wallet today. - 250 tests (17 new: batch-state disambiguation, double-spend guard lifecycle, sweep preview + calldata pinning, amount parsing, tick rounding), typecheck, build green. ## 0.32.8 Paid chat calls now stream. A non-streaming request to a slow reasoning model (Kimi K3 with a large prompt generates for minutes) moves ZERO bytes between "request accepted" and "body ready", so the edge in front of the gateway kills the idle connection at ~100s and returns 524 — AFTER the x402 payment settled. Charged, nothing delivered. Observed live 2026-07-21, twice. - **`fix(chat)` — paid EVM paths use SSE streaming and assemble server-side.** All three paid call shapes (explicit model, multi-turn `messages`, paid routing tiers) switch to the SDK's `chatCompletionStream` and concatenate deltas; bytes flow from the first chunk (reasoning models emit keepalive chunks while thinking), so the idle timer never fires. Verified live: a 125s kimi-k3 generation that 524'd on the old path completes. The free NVIDIA tier keeps the non-streaming client whose short timeout its deadline loop depends on; Solana clients have no streaming API and keep the old path (capability-checked, not assumed). - **Empty answer + `finish_reason:"length"` is now an explicit error.** Reasoning tokens count toward `max_tokens`; a hard task with a small budget can burn the whole budget thinking and emit zero visible text (measured: kimi-k3, 8000 max_tokens, 0 chars). That surfaced as a silent empty reply — indistinguishable from success. It now throws with the cause and the fix (raise `max_tokens`). - Guards that keep the stream honest: a non-SSE response (a route that ignores `stream:true`) is parsed as a plain JSON completion instead of yielding ""; an in-band `error` event throws instead of returning partial text; a stream with no data for 120s aborts with a stall error (the SDK clears its fetch timeout once headers arrive, so this idle guard is the only backstop). - x402 accounting is unchanged: the SDK's streaming method runs the same payment flow and increments the same spend counter the budget ledger reads. - 234 tests (11 new pinning SSE assembly, fallbacks, stall, and the reasoning-exhaustion diagnosis), typecheck, build green. Server-side half (settle-on-success / refund on 5xx at the gateway) is tracked separately. ## 0.32.7 Setup's approval report now shows the post-transaction chain state, not the pre-transaction snapshot. Found live: a `setup confirm:true` that successfully granted 4 approvals returned every one of them as `granted:false`. - **`fix(polymarket)` — setup re-reads approvals after the batch lands.** Both modes (deposit-wallet batch and per-tx EOA) built their report from the approvals snapshot taken BEFORE signing, then flipped `approvalsPending` to false without a single re-read. So the response contradicted itself (`approvalsPending:false` + `granted:false`), and the inverse failure — a batch tx that lands but leaves an approval missing — was reported as success. Same 0.32.6 principle, applied to setup: a transaction landing proves it was mined, not that it did anything. `verifyApprovalsLanded` re-reads on-chain (3 attempts, 750ms, matching redeem's post-transaction reads) and only a fresh read showing every approval granted counts; an empty read can never fake success, and `approvalsDone` is persisted only after verification. When the tx landed but the chain doesn't confirm, the report says so explicitly (`approvalsUnverified:true` + a ⚠️ line) instead of ✅. - `structured` now carries `approvalsTxHash` (deposit-wallet) / `approvalTxHashes` (EOA), so callers can link the batch without parsing text. - 223 tests, typecheck and build green. ## 0.32.6 Redeem now proves the position was actually consumed, not just that a transaction landed. Verification logic from @KillerQueen-Z's #66, integrated with the payout check already on `main` rather than replacing it. - **`fix(polymarket)` — a redeem is only proven by answering TWO questions.** `main` verified the pUSD delta ("did I get paid") and never checked the ERC-1155 balances ("did my tokens burn"). Those are independent: the wrong-collateral no-op that started this whole class burns nothing, reverts nothing, and returns a transaction hash. Both are now checked, and the three outcomes are distinct in `structured.status`: - `redeemed` — tokens burned, payout observed - `no_effect_detected` — we checked, and nothing we held was consumed - `confirmed_but_unverified` — the tx landed but the RPC read failed after 3 attempts, so we cannot say either way Collapsing the last two is what made the original bug invisible; they need different actions from the caller, so they are different statuses. - **Post-transaction reads retry (3 attempts, 750ms).** A receipt can land before every public RPC reflects it, and telling a user "your tokens did not burn" off a lagging node is a false alarm on a money operation. - **`fix(polymarket)` — one `assertTransactionSucceeded` helper.** viem resolves `waitForTransactionReceipt` for reverted transactions too, so awaiting it proves the tx was MINED, not that it did anything. The check was open-coded in three places with three different error strings, and withdraw's copy was missing entirely until 0.32.3 — a reverted pUSD transfer printed "✅ Withdrawal submitted". Now one helper the next money path cannot forget. - 217 tests, typecheck, build and `verify:prices` (28/28) green. ## 0.32.5 - **`fix(polymarket)` — reads and writes no longer share one RPC list.** There was a single `POLYGON_RPC_URLS`, and entry 0 doubled as the sole un-fallbacked transport for every SIGNING wallet client (withdraw, redeem, relayer, setup). So reordering what read like a read-only fallback list silently changed which endpoint broadcasts every money transaction — a write-path change disguised as a comment tweak, and one nobody would review as such. 0.32.4 documented the hazard; this fixes it. `POLYGON_READ_RPC_URLS` keeps its `fallback()` chain; `POLYGON_WRITE_RPC_URL` is a single endpoint, overridable with `POLYMARKET_WRITE_RPC_URL`. The write default is **publicnode, not 1rpc** — 1rpc answers once and then returns `-32001 "usage limit"` (measured 2026-07-21), which is the last thing you want broadcasting a withdrawal. And the write side is deliberately a single endpoint rather than a fallback chain: viem's `fallback()` would re-send a signed transaction to the next provider on a timeout, and a transaction the first provider actually mined must not be broadcast twice. Failing loudly on one endpoint is correct; silently retrying a money movement is not. Credit to @KillerQueen-Z, who proposed splitting these in #66. - 211 tests, typecheck, build and `verify:prices` (28/28) green. ## 0.32.4 The second half of the 0.32.3 audit: the structural gap behind five of its pricing bugs, plus the remaining "reported as fact, never verified" defects. - **`fix(verify-prices)` — the gate now covers PARAMETERIZED routes.** Every pricing defect the audit found was on a route whose price depends on an *argument*, and `verify:prices` covered the flat routes exactly (20/20) and none of those. That was the single structural finding behind five separate bugs. It now probes image sizes per model, exa per-URL counts, and chat with a 100k-character prompt — **28 routes, 0 under-reserving**. Probes may declare `allowOver` where a conservative reserve is the design (chat cannot know which model a tier settles on), but under-reserving still fails the release. - **`fix(image)` — a 2048 render was billed at the 4096 price.** The large-size tier was a single `>1024` rule for every model. Probed live, `nano-banana-pro` charges **$0.107001 at both 1024 and 2048** and only steps to **$0.159500 at 4096** — so a 2048 render over-reserved by 49% *and*, on the Base path where the estimate is written to the ledger verbatim, over-**booked** it permanently. Thresholds are now per-model. - **`fix(polymarket)` — two "stated as fact, never checked" reports.** An RPC failure was coerced to `$0.00` and printed as "your Base wallet holds $0.00 USDC — top up first" to a user holding $200; it now refuses to fund blind. And any non-403 from the CLOB — 502, 404, 429 from a misconfigured host — rendered as "✅ Region: order placement permitted" + "🎯 Ready to trade", cached 10 minutes, so the user funded before the first buy failed; only 400/401/422 (what a *working* CLOB returns for an empty body) now count as permitted. - **`fix(polymarket)` — a redeem with an unreadable balance no longer looks paid.** When the pUSD read failed, `paidOut` went null, which also made the "paid $0 while holding a winner" guard unreachable — and the success message simply omitted the payout line, rendering identically to a verified payout. That is the size=0 silent-loss shape this module was rewritten to kill. It now says the payout is UNVERIFIED and exposes `payoutVerified` in structured output. - **`fix(realface)` — a failed portrait lookup claimed "none enrolled".** The RealFace half surfaced its own failure; the Virtual Portrait half collapsed to an empty list and prompted a duplicate $0.01 enroll of an asset that already existed. - **`fix(polymarket)` — two of three Polygon RPCs were dead.** Probed with a real `eth_call`: llamarpc fails DNS, polygon-rpc.com returns 401 "tenant disabled", and 1rpc is rate-limited. `fallback()` depth was effectively 1 while ~9 reads x 4 retries piled onto one throttled endpoint. Now publicnode + drpc + 1rpc, all verified live. The comment claiming the list is "read-only" is also gone — `POLYGON_RPC_URLS[0]` is the sole un-fallbacked transport for every *signing* client, so reordering it is a write-path change. - **`fix(chat)` — `mode:"free"` built two clients and used one.** The eager `buildClient()` was dead on the only shape that reaches the routing loop; on Solana it re-ran `loadSolanaWallet()`'s home-directory scan every call. - **`docs` — tool descriptions quoted pre-fee bases.** The description is the only pricing an LLM sees at call time, and it disagreed with both the reserve logic and the skills (which commit `ff32cb4` had already corrected). Exa and DefiLlama rows now quote the charged price. README's Surf endpoint count was 84; code and the skill catalog both say 83. - 207 tests, typecheck, build and `verify:prices` (28/28) green. ## 0.32.3 A multi-agent audit of 0.32.2 across nine angles, every finding put through two independent skeptics. It caught nine real defects — including one in 0.32.2's own headline fix. The nastiest is not a money bug: **an optional dependency could kill the entire server.** - **`fix(server)` — a missing `sharp` took down all 19 tools.** `sharp` is an `optionalDependency`, but `inline-image.ts` imported it at the top level, so ESM resolution failed before `main()` ran. Reproduced: with sharp absent, `node dist/index.js --version` exits **1** with `ERR_MODULE_NOT_FOUND` and empty stdout — for a preview feature that is **off by default**, on profiles that never register `blockrun_image`. A fresh `npx -y @blockrun/mcp@latest` hits it on musl, unusual arch, offline CI or `--no-optional`. No dev machine ever saw it, because every dev machine has sharp built. `qr.ts` documents this exact hazard and loads lazily; this module now does too. Verified after the fix: `--version` returns `0.32.3` and `tools/list` returns all 19 tools with sharp removed. - **`fix(chat)` — 0.32.2's truncation cap was measured in BYTES; the gateway caps CHARACTERS.** The original sweep only probed ASCII, where the two are the same number. CJK separates them: **131,000 CJK characters (393,000 bytes) pass through whole** (`prompt_tokens 131,065`), and both alphabets cap at ~131,072 characters. Because UTF-8 length is always >= string length, the byte check could only **over**-fire — it never missed a real truncation, it invented ones, bolting "⚠️ TRUNCATED … only the first ~87%" onto complete, correct answers for any non-ASCII prompt and advising the caller to switch to a **paid** model. It pushed agents off a working $0 path into real USDC spend on a false premise, which is worse than the silence it was meant to fix. The test that pinned the wrong behaviour is now inverted. - **`fix(security)` — SSRF guard was literal-only; wildcard DNS walked through it.** `127.0.0.1.nip.io` is a public name that resolves to loopback, and was verified end-to-end reading a local server and base64ing the body into the data URI sent onward to the gateway; `169.254.169.254.nip.io` reaches cloud metadata the same way. No redirect needed, so the per-hop literal check saw nothing suspicious. Hostnames are now resolved and **every** returned address is checked, failing closed on NXDOMAIN. - **`fix(budget)` — two reserve bypasses.** `blockrun_exa` matched the raw path, so `contents?x=1` missed the per-URL branch: 100 URLs reserved **$0.012** and settled **$0.202** (17x), booked wrong permanently. And `estimateChatCost` ignored input entirely — a 100k-word prompt settled **$0.2557** against a **$0.0225** reserve (11.4x), with break-even at ~15 KB, an ordinary pasted file. Both now priced. - **`fix(wallet)` — running `blockrun_wallet` flipped the chain Base → Solana.** `ensureBothWallets()` (the *default* status action) writes `.solana-session`, and chain autodetect keys off that file existing. Afterwards every paid tool signs from a zero-balance Solana wallet or refuses "Base-only" — including `action:"deposit"`, so the funding path itself became unreachable. Reproduced in a clean HOME; the chain is now pinned across provisioning. - **`fix(polymarket)` — a reverted pUSD transfer reported success.** viem does not throw on revert; the receipt was discarded, so a failed withdrawal still printed "✅ Withdrawal submitted … the bridge delivers USDC to Base". `redeem.ts` and `setup.ts` both assert `receipt.status`; this path now does too. - **`fix(ci)` — the 0.32.2 tag/release automation had two holes.** The step had no version-changed guard, so a `publish.yml`-only push or `workflow_dispatch` would tag HEAD and title the release from an unrelated commit. And `actions/checkout` fetches no tags, so the "tag exists" check always missed and the push ran unconditionally — failing the job *after* npm had already published. Now gated on the version diff and checked against `git ls-remote`. - **`docs` — the README advertised $0.0075 for `blockrun_markets`/`blockrun_surf`; both charge $0.0095.** A 27% understatement of real money in the most-read file, and "$5 covers ~5,000 market queries" was 9.5x off (~525). Five lines corrected. - 204 tests, typecheck, build and `verify:prices` (20/20 exact) green. ## 0.32.2 The free tier throws away everything past 128 KiB and returns `200` as if it hadn't. This release makes that visible, and settles the one model 0.32.1 left documented-but-unexplained. - **`fix(chat)` — the free tier silently truncates at 128 KiB; `blockrun_chat` now says so.** Measured against the live gateway: `usage.prompt_tokens` flatlines at **26,266** for every request body from 135,000 B upward — identical on `gpt-oss-120b` and `deepseek-v4-flash`, so it is a property of the free path, not of one model's context window. There is no error, no warning and no `finish_reason` signal; the reply is confident and well-formed, which makes this the worst failure shape available — **indistinguishable from success**. An agent summarising a large document over `mode:"free"` would present an answer about the first 128 KiB as an answer about the whole thing. Oversized free calls now come back with how large the prompt was, how much was discarded, and what to use instead, plus `truncated: true` in `structuredContent`. Verified end to end: on a 176 KiB prompt the warning predicts 73% kept and the gateway counted 73%. Sizing is in **bytes, not characters** — 128 KiB is only ~43K CJK characters, so counting characters would under-report by 3x and miss exactly the prompts that need warning. - **Paid models are deliberately never warned about.** They do not truncate: the 402 quote for `gpt-5.6-terra` scales linearly from ~12,016 input tokens at 25 KB to ~192,016 at 400 KB with no ceiling. (Read from the payment-required header, so measuring this cost nothing.) Consequence worth stating: the "1M context" noted against `deepseek-v4-flash` is **unreachable on the free tier**. - **`docs(models)` — `nemotron-3-nano-omni-30b-a3b-reasoning` stays out of `free[]`, and now says why.** 0.32.1 listed it as healthy and free while leaving it unrouted with no reason given. It is healthy — and on Base it is **aliased**: it answers `200` in 2.0s while reporting `"model": "nvidia/gpt-oss-120b"`. On sol it serves itself (3.8s). Routing to it on Base would be a slower path to `gpt-oss-120b`, which is already `free[0]`. This is the aliasing trap described at the top of `constants.ts` caught in the act. - 185 tests, typecheck, build and `verify:prices` (20/20 exact) green. ## 0.32.1 A correction to 0.32.0, which dropped two working models from the `free` tier on a conclusion its own release notes disproved one paragraph earlier. - **`fix(models)` — `gpt-oss-120b` and `gpt-oss-20b` are back in `free`; they were never retired.** 0.32.0 removed them as "delisted... the tier only ever worked through aliasing", but the same entry states that `llama-4-maverick` "answers `200 OK` while being served by `gpt-oss-120b`". A model cannot simultaneously be the thing serving the alias and be dead. They are hidden from `GET /v1/models`, which is a listing decision, not a health signal — and `gpt-oss-120b` is the gateway's own `FREE_FALLBACK_MODEL`, with `gpt-oss-20b` as its last-resort rung, making them the most load-bearing free models there are. Re-probed on **both** chains with a realistic ~1.5K-token prompt: `gpt-oss-120b` **3.5s**, `gpt-oss-20b` **3.7s**, both `200` with real completions. `gpt-oss-120b` is now `free[0]` — it is marginally faster than the outgoing `deepseek-v4-flash` (3.8s) and is what the gateway itself falls back to. - **`fix(models)` — `mistral-large-3-675b` stays excluded, but for the right reason.** 0.32.0 recorded it as hanging: "no response, no error, connection held open past 90s". It does not hang. It **crawls**, and the distinction is the whole lesson: a toy ping (`"say OK"`, 8 `max_tokens`) comes back in **2s**, which is exactly how it kept certifying itself healthy, while the same model on a realistic 1.5K-token prompt took **123.2s**. That is why the gateway's own probe script has a `--real` mode. Never health-check a free model with a 16-token ping. - **No tier churn.** The tiers now hold 39 unique IDs. 37 were re-diffed against live `GET /v1/models`: 0 missing, 0 dead. The other 2 are the deliberately unlisted `gpt-oss` pair above, which by definition cannot be confirmed that way and were confirmed by live probe on both chains instead. The catalogue side of 0.32.0 was correct; only the free-tier reasoning was not. - **`fix(chat)` — `mode:"free"` can no longer stall a tool call for eighty minutes.** The fallback loop had no deadline of any kind and the SDK's default request timeout is **600s** (not the 60s a comment in `wallet.ts` claimed — it was wrong by 10x, now corrected). Free models fail by *crawling*, so one degraded entry held the whole call for ten minutes before falling through, and a degraded tier for eight times that — a worst case this release made 33% longer by growing `free[]` from 6 entries to 8. The free path now builds its client with a 60s per-model timeout (~5x margin over the slowest healthy measurement) plus a 150s deadline on the **whole** loop, so adding a ninth free model can never lengthen the worst case again. Paid tiers are untouched: a multi-minute frontier completion is the job, not a fault. Exhausting the deadline now returns "the free tier did not answer" instead of blaming whichever model happened to be slowest. - **`test` — the invariant behind the `$0` reserve is now pinned.** `estimateChatCost` returns `0` for `mode:"free"` purely because every `free[]` entry happens to be `nvidia/*`. That was an unenforced rule on a hand-edited array rewritten in three consecutive releases; one paid model landing in it would switch the budget gate off silently with every test still green. Added assertions for nvidia-only, non-empty and duplicate-free tiers, plus behavioural coverage of the new deadline. Both were mutation-tested (injecting `openai/gpt-5.6-sol` into `free[]`, and disabling the deadline check) to confirm they fail when violated. - **Docs.** `README.md` still advertised Kimi K2.6, which 0.32.0 removed from the catalogue. The root `VERSION` file had been stuck at 0.30.1 since that release; it is read by nothing (`src/index.ts` takes the version from `package.json`) but it is misleading to read, so it now tracks `package.json`. - 177 tests, typecheck and build green. `verify:prices` is 20/20 exact too, but it probes the paid surf/pm/modal/search/phone/exa/rpc routes and contains no chat route — it carries no signal about the free tier, and the model claims above rest on the live probes rather than on it. ## 0.32.0 Kimi K3 and the current high-end lineup, plus the tier lists rebuilt against the live catalogue instead of edited by hand. The interesting part is why nobody noticed they had rotted: **a retired model ID does not fail.** The gateway silently aliases it onto something else — `nvidia/llama-4-maverick` answers `200 OK` while being served by `gpt-oss-120b`, and `moonshot/kimi-k2.6` still quotes a price. Only a wholly unknown ID `400`s. So "it works" was never evidence a tier was correct, and 8 dead IDs had accumulated across 6 tiers. - **`feat(models)` — `moonshot/kimi-k3` ($3/$15, 1M ctx, vision + reasoning + coding)** added to `balanced`, `reasoning`, and `coding`. It supersedes the whole k2.x line, which is gone from the catalogue — `kimi-k2.6` was still listed in three tiers and was being aliased somewhere unchosen on every hit. - **`feat(models)` — the current high end, none of which we served.** `gpt-5.6-sol` ($5/$30, 1M) and `gpt-5.6-terra` ($2.5/$15, 1M); `claude-sonnet-5` ($3/$15, 1M) and `claude-fable-5` ($10/$50, 1M); `grok-4.5` ($2.5/$9, native search), `grok-4.3` ($1.5/$4, 1M) and `grok-build-0.1` (coding); `qwen3.7-max`; `deepseek-v4-pro` ($0.435/$0.87, 1M — frontier-class reasoning at budget-tier pricing, now `cheap[0]`); `minimax-m3`; `glm-5.2`/`glm-5.1`. - **`feat(chat)` — the default model is now `openai/gpt-5.6-terra`.** `balanced[0]` is what every call with no `model` resolves to. Newer line, 1M context, and **half the price** of the outgoing `gpt-5.5` default ($2.5/$15 vs $5/$30). - **`fix(models)` — the `free` tier was 4/5 retired.** `llama-4-maverick`, `qwen3-coder-480b`, `gpt-oss-120b` and `gpt-oss-20b` are all delisted; the tier only ever "worked" through the aliasing above, i.e. free calls were being served by a model nobody picked. Rebuilt from the `$0` models the catalogue actually lists. - **`fix(models)` — being listed is not being alive; every entry was live-probed.** `nvidia/mistral-large-3-675b` is in the catalogue at `$0` and **hangs**: no response, no error, connection held open past 90s, reproduced twice. It had landed at `free[0]` on the first pass — the first model every `mode:"free"` call tries — where it would have stalled the routing loop before it could fall through. Excluded and documented. - **`docs(chat)` — the tool description no longer advertises the old tiers.** It still told the model `mode:"coding"` meant "GLM-5 first" when `coding[0]` had been `claude-opus-4.8` for several releases, and pointed `mode:"reasoning"` at `o1`. Modes, examples and the `model` hints now match what the tiers actually contain. - **Budget gate re-verified, not assumed.** Adding $180/M and $168/M models raises the question of whether the `$20/M` frontier reserve still covers the worst case. It does — the gateway quotes sublinearly, so `gpt-5.4-pro` at 128k `max_tokens` quotes **$2.42** against a **$2.56** reserve — but headroom is only ~5%, so the constant was left alone rather than guessed at. Cheap-tier candidates probed the same way, all with wide margins. - All 49 tier IDs validated against live `GET /v1/models`. 169 tests, typecheck, build, `verify:prices` (20/20 exact), and the stdio smoke test (19 tools) green. ## 0.31.6 Round 3. Two of these were live the whole time and invisible to every prior round: a skill that never loaded, and an endpoint that never existed. Both were found by asking the gateway instead of reading our own files. - **`fix(skills)` — `prediction-markets` has never once loaded.** Its description read `...you CANNOT get from a public API: historical price...`. A plain YAML scalar may not contain `": "`, so the frontmatter failed to parse, the loader got no `name`, and the skill was never registered. It builds, it publishes, the prose reads perfectly — the only symptom is that Claude never uses a capability we shipped. Quoting the scalar fixes it; a new test parses every `SKILL.md` with a real YAML parser (a naive split would have "parsed" the dead file happily, which is the whole point). - **`fix(surf)` — advertised an endpoint that does not exist.** `chat/completions` ("Surf-1.5 chat with citations", `$0.02 flat`) returns **404 Unknown Surf endpoint**; the gateway replies with its own catalog of **83**. That phantom *was* the off-by-one — `surf.ts` claimed 84 where the skill and the gateway both say 83. Told to use it, the model would have burned a turn on a 404. - **`fix(pricing)` — `withTxFee` rounded where the gateway ceils.** `usdToMicroUsdc` is an unconditional `Math.ceil`. Rounding agrees only when the addition is exact and goes one micro short wherever the ×1.05 margin drifts in float: modal's CPU hour charges **102001** micro, not 102000. My own `.toFixed(4)` had been hiding it — `$0.102001` prints as `$0.1020`. - **`fix(pricing)` — a prototype key killed every budget cap.** modal's GPU tables were object literals, so `TABLE["toString"]` resolved up the prototype chain to a **function**, `?? default` never fired, and it reached the gate as **NaN** — where `cost > 0` is false (so the call is **allowed**) and `spent += NaN` sticks for the life of the process. A $1-capped agent was cleared for a $500 call. Now `Map`s; `budget.ts` also fails closed on any non-finite estimate rather than let one estimator poison the ledger. - **`docs(skills)` — every stale price corrected against live quotes.** All in the same direction, always understating: `image-prompting` nano-banana **~$0.01 → $0.0545** (5.45×) and a gpt-image-2 poster **~$0.04 → $0.128** (3.2×, the >1024 large tier); `surf` **$0.001 → $0.0095** (9.5×) plus a worked example still doing retired-tier math; `modal`'s A100 example quoted **no price at all** and claimed the sandbox "auto-evicts after 1200s idle" — it does not, it is **$1.3413** charged upfront and never refunded; `rpc` **$0.002 → $0.0040**; `exa` **$0.01 → $0.0120**; `phone` **$0.54 → $0.5420**; `search` `max_results:20` **$0.50 → $0.527**; `gentech` 14 figures including a budget split across `surf T1/T2` tiers that no longer exist; and `crypto-data` documented `blockrun_rpc({ chain: ... })` when the param is `network` — the call as written could not have run. - **`test` — `npm run verify:prices`, a live gate against exactly this drift.** Probes all 20 paid routes and compares each 402 quote to what the estimator reserves; under-reserving exits non-zero, over-reserving warns. Free to run (no payment attached). This class of bug is invisible to CI by construction — the gateway reprices without an MCP release — and has now shipped **three times**: stale Surf tiers, the base mistaken for the charge, and round-vs-ceil. Reintroducing the classic bug trips it immediately. **All 20 routes now match the gateway exactly, to the micro-dollar.** - 169 tests, typecheck, build green. ## 0.31.5 Round 2 of the audit loop — regression-hunting round 1's own fixes. Everything functional held; the only casualties were artifacts of my own regex surgery in 0.31.4. - **`fix(skills)` — the surf rewrite left the file inconsistent.** Deleting the `chat/completions` section with a regex (rather than by hand) left: worked-example headings numbered **1, 2, 3, 4, 6, 7** with a hole where 5 had been; an **empty `### Chat — 1` category heading** whose only endpoint 404s; and a catalog claiming **83 endpoints / 13 categories** while the per-category counts still summed to **84**. Renumbered, orphan removed, counts reconciled — 12 categories summing to 83, matching the header. - **Verified no functional regression from the 0.31.2–0.31.4 fixes.** Every genuinely free path still reserves exactly $0 (`chat` mode:"free" alone, `nvidia/*`, `phone/numbers/release`, GET `voice/call/{id}`) — important because `checkBudget` only short-circuits at exactly 0, so a $0.002 reserve on a free call would deny it on an exhausted budget. Every paid path still > $0. `search` returns a finite, positive reserve for all of `2.7 / 0.5 / 50.9 / 51 / 1e308 / Infinity / -Infinity / NaN / "10" / null / true / [] / {} / undefined`, and 50.9 still caps at 50. `modal` returns a finite reserve for every garbage body, and non-create paths stay $0.0030 regardless of what the body carries. - **`modal` divergence on invalid input is harmless, confirmed live:** `gpu:"h100"` (lowercase), `gpu:"NOPE"`, `timeout:86401`, `timeout:"3600"` all return **HTTP 400 without charging**, so an estimate that diverges there costs nothing — the reserve is released in the `finally`. Every *valid* shape matches the header exactly. - 165 tests, typecheck, build green. ## 0.31.4 Closes the last of the audit findings: every price an agent reads is now the price it is **charged**, verified against live `payment-required` headers. - **`docs(surf)` — taught an endpoint that does not exist.** `chat/completions` (Surf-1.5) returns **404** on the gateway; the skill had a worked example, a catalog row, a trigger and pricing notes for it. All removed. - **`docs(surf)` — Surf has no premium tier any more.** The skill billed `onchain/sql` at `$0.0200`. Upstream `SURF_TIER_1/2/3_PRICE` are now **all identical**, and `onchain/sql` quotes the same **$0.0095** as every other Surf read. The tier column is gone — one flat rate, SQL included. - **`docs(gentech-blockrun)` — billed free calls.** `blockrun_price` crypto/FX/commodity quotes are **FREE**; the skill charged `$0.001` for them across four patterns and told agents to cache aggressively to save money that was never being spent. Also refreshed stale `defi` ($0.001 → **$0.0070**, prices/* → **$0.0030**) and `exa` ($0.01 → **$0.0120**) figures, and stopped quoting a flat rate for `blockrun_chat`, which is per-token. - **`docs(crypto-data, search, phone)`** — repriced to the charge: `defi` **$0.0070** / prices/* **$0.0030**, `rpc` **$0.0040**, `surf` **$0.0095**, stocks **$0.0030**, `phone/lookup` **$0.0120**, `lookup/fraud` **$0.0520**, `numbers/list` **$0.0030**, `numbers/buy` **$5.002**. `search` understated every example — the default 10-source call settles **$0.2645**, not $0.25, and the skill now says it is priced per source and expensive by default. - No code change; 165 tests, typecheck, build green. ## 0.31.3 - **`docs(modal)` — the tool and skill advertised `$0.01` for a call that can cost `$192`.** 0.31.2 fixed the *reserve* so the gate catches it; this fixes what we **tell the agent**, which is what walks it into the charge in the first place. Three separate lies, all live-verified: - **The price table said a flat `$0.01`.** `sandbox/create` is bimodal: `timeout ≤ 300s` is flat ($0.0120 CPU → $0.4020 H100); `timeout > 300s` bills **per-hour × the full requested lifetime, upfront, with no refund on early terminate** ($0.10/h CPU → $8.00/h H100). A 24h H100 sandbox is **$192.0020**. - **The skill's own worked example cost 67× its table.** `{ gpu: "A100", timeout: 600 }` quotes **$0.6687** live, not `$0.01`. Anyone copying the documented snippet was already on hourly billing and had no way to know. - **`timeout` was documented as "idle eviction".** It is the **billed lifetime** — you pay for the time you *ask for*, not the time you use. An agent told "idle eviction" would reasonably set a generous `86400` ceiling expecting to pay for what it consumes. That single misreading *is* the $192. - Also removed `A100-80GB` from the advertised GPU list — it does not exist; the gateway returns `HTTP 400 "Unsupported GPU type. Allowed: T4, L4, A10G, A100, H100"`. - Every one of the 13 published prices was checked against the live `payment-required` header and matches exactly ($0.0120 / $0.0520 / $0.0820 / $0.1020 / $0.2020 / $0.4020 flat; $0.1020 / $1.5020 / $4.0020 / $8.0020 / $192.0020 / $0.6687 / $2.0020 hourly). Documents the flat→hourly cliff too: `timeout:300` is $0.0120 but `timeout:301` is $0.0104 — briefly cheaper on CPU, until ~432s. - No code change to pricing logic; 165 tests, typecheck, build green. ## 0.31.2 Found by an adversarial multi-agent audit of everything shipped tonight. 0.31.1 fixed three tools by hand; that was treating symptoms. The gateway applies its flat $0.002 transaction fee in `buildPaymentRequirements` for **every** route, so **every** tool reserving the base was short. This fixes the class. - **`fix(chat)` — CRITICAL: `mode:"free"` plus an explicit PAID model reserved $0, a total budget-gate bypass.** `estimateChatCost` returned `0` on `mode === "free"` unconditionally, but an explicit `model` **wins over `mode`** at call time (`targetModel = model || MODEL_TIERS[mode ?? "balanced"][0]`). So `{ mode:"free", model:"openai/gpt-5.5" }` ran a frontier model against a **$0 reserve** — any agent, including one already at its cap, got unmetered frontier calls by tacking on `mode:"free"`. Worst case measured: `mode:"free"` + `claude-opus-4.8` + a 100k thinking budget reserved **$0** on a call that settles over **$2**. Now an explicit model is priced on its own merits and `mode:"free"` only grants free when no model overrides it; genuinely free paths (`mode:"free"` alone, `nvidia/*`) still reserve $0. - **`fix(phone)` — CRITICAL: unlisted paid routes reserved AND recorded $0.** The catch-all returned `hasBody ? 0.001 : 0`, so any paid GET missing from the table was invisible to both the gate and the ledger. **`/v1/phone/numbers/search` is live and charges $0.0120** — and appears in neither this table nor the gateway's own `PHONE_PRICES`, so the table cannot be trusted to stay complete. Unknown routes now **fail closed** at $0.0120; explicitly-free reads stay $0. - **`fix(budget)` — the $0.002 tx fee was missing from six more estimators.** New shared `src/utils/tx-fee.ts` (`withTxFee`) mirrors the gateway's `addTransactionFee`, including its `$0` no-op so free tiers stay free. Verified against live `payment-required` headers: `defillama/protocols` $0.005→**$0.0070**, `prices/*` $0.001→**$0.0030** (3x short), `exa/search` $0.010→**$0.0120**, `rpc` $0.002→**$0.0040** (2x short), `phone/lookup` $0.010→**$0.0120**, `phone/numbers/list` $0.001→**$0.0030** (3x short), plus `modal`. `rpc` batches take the fee **once per request, not per element**. - **`fix(chat)` — float drift in the reserve.** `(1024/1e6)*20` is `0.020479999999999998`, which surfaced verbatim in budget messages. Rounded to micro-dollars. - **`fix(modal)` — CRITICAL: `sandbox/create` is priced off the BODY, and the estimator read the path — 16,000x short.** The gateway's pricing is bimodal (`getModalCreatePricing`): `timeout <= 300s` is a flat rate (CPU $0.01, GPU per tier), `timeout > 300s` bills **hourly x the full requested lifetime, upfront, with no refund on early terminate**. Estimating on the path reserved a flat $0.01 for every create — so `{ timeout: 86400, gpu: "H100" }` reserved **$0.012** against a live-verified charge of **$192.0020**. A $1 agent cap could settle $192 of non-refundable spend. The estimator now mirrors the gateway's tables (T4/L4/A10G/A100/H100, flat + hourly), takes the body, and falls back to the CPU rate on an unknown gpu exactly as the gateway does. Verified against live headers: `$192.0020`, `$4.0020`, `$0.4020`, `$0.1020`, `$0.0120` — all exact. - **`fix(security)` — CRITICAL: `hasPathTraversal` was bypassable with an embedded tab/newline.** The URL spec has the parser **delete** every ASCII tab (U+0009), LF (U+000A) and CR (U+000D) before parsing, so `..` is not a `..` segment to an equality check but IS one by the time `fetch()` resolves it. `blockrun_surf({ path: "..\t/phone/numbers/buy" })` reserved **$0.0095** and reached the **$5.00** endpoint — a 526x under-reserve that also escaped `--profile` tool scoping. All seven path tools were affected. The guard now strips those characters before splitting, and the new test asserts each payload **actually escapes the namespace against the real parser** before asserting the guard blocks it. - **`fix(price)`** — paid stock calls reserved $0.001 against a **$0.0030** charge (3x short). - **`fix(search)`** — the reserve floored `max_results`; the gateway prices the **raw** value (`2.7` quotes a $0.0709 base vs `2` at $0.0525). Flooring under-reserved on any fractional input. - **Not changed, deliberately:** the audit recommended dropping `checkBudget`'s `cost > 0` guard so a $0 reserve can still be denied. Rejected — this server has genuinely free paths (`blockrun_price` crypto/fx/commodity, `blockrun_dex`, `mode:"free"`, `nvidia/*`, free phone reads) and denying them on an exhausted budget would be a regression, since a free call spends nothing. The real defect was **paid** calls estimated at $0, fixed above at the source. Verified on an exhausted budget: free calls pass, the $192 modal call is denied. - **`fix(image)` — the reserve, the Cost footer and the ledger all understated real spend.** `estimateCost` returned the raw catalog figure while the gateway settles `catalog x 1.05 + $0.002` — `zai/cogview-4` reserved $0.0150 against a live-verified **$0.017751** (15.5% short); `google/nano-banana-pro` $0.10 vs **$0.107001**. The estimate now mirrors the server's arithmetic **including its float drift**, which is load-bearing: `0.015 * 1.05` is `0.015750000000000002`, so `ceil((base*1.05 + 0.002) * 1e6)` yields `17751` where any pre-rounded version yields `17750` and lands a micro short. Reserve, footer and ledger now all report the charged price. - **`fix(speech)`** — `MIN_PAYMENT_USD` mirrored the server's **base** floor. The gateway's own route says *"Price = (characters / 1000) x model rate, minimum $0.003/request"* — that $0.003 is $0.001 + the $0.002 fee, so a short render reserved 3x short. - 165 tests, typecheck, build, stdio smoke green; every fixed reserve checked against the live gateway. ## 0.31.1 - **`fix(budget)` — every paid tool reserved the BASE price, not the price. The 402's JSON `price` field is not what x402 charges.** A 402 body reports `price: {amount: "0.0075"}` — that is the base. What actually gets charged is `maxAmountRequired` inside the base64 **`payment-required` header**, and it is base **+ a $0.002 flat transaction fee**. The gateway states the split itself in `src/app/api/v1/pm/[...path]/route.ts`: *"Tier 1 (GET) = $0.0095/call ($0.0075 base + $0.002 tx fee)"*. Decoded live: every `/v1/surf/*` and `/v1/pm/*` route returns `maxAmountRequired=9500` → **$0.0095**. - **`blockrun_markets` was ~9.5x short.** `estimateMarketCost` still returned the pre-flat tiers (`$0.001` / `$0.005`) — 0.31.0 updated the tool *description* to flat but not the estimator. So the gate reserved `$0.001` against a `$0.0095` charge, and `recordSpending()` booked `$0.001` of a `$0.0095` spend: the budget **ledger** under-counted too, not just the reserve. Now flat `$0.0095`. - **`blockrun_surf` was $0.002 short.** Its own comment already said *"the gateway adds a $0.002 transaction fee on top → $0.0095 customer-facing"* and *"this estimator feeds the BUDGET GATE, so it must never under-quote"* — and then set the constant to the base. Now `$0.0095`. - **`blockrun_search` was $0.002 short** — 0.30.10 fixed the 5% buffer but pinned the body's `price` field, so it stayed under by the flat fee at every size. Reserves now match the header exactly: `max_results` 1/5/10/20/50 → `$0.0283/$0.1333/$0.2645/$0.5270/$1.3145`. Tests repinned to the **charged** column; `test/surf.test.ts` likewise. - **Skills corrected**: `prediction-markets`, `crypto-data`, `surf` and `gentech-blockrun` advertised `$0.0075`. Users pay **$0.0095**. An agent budgeting off those numbers under-reserves on every call. - **The lesson, now written into the code**: the base is not the price. Read `maxAmountRequired` from the `payment-required` header. This has been wrong twice in the same direction — first stale tiers after the gateway went flat, then the base mistaken for the price — both times by trusting a number that looked authoritative. The public pricing pages (`/services/surf` $0.0095, `/services/predexon` GET $0.003 / POST $0.007 for the then-current base) were **right all along**. ## 0.31.0 - **`fix(surf,markets)` — Surf and Predexon are now one flat $0.0075/call, and the budget gate was under-reserving.** The gateway collapsed every prediction-market / crypto-data tier to a single network-uniform price (2026-07-15). `estimateSurfCost()` still priced from tier tables ($0.001 / $0.005 / $0.02) — and it had *already* drifted before this change, since the gateway moved Surf T1/T2 to $0.0075 while the estimator kept quoting $0.001. It feeds the spend cap, so every cheap-looking call reserved less than it cost. It now returns the flat rate, which deletes the drift at the root rather than re-syncing a table that will drift again. - **The tier tables are gone, not just unused.** `SURF_T2_PATHS` / `SURF_T3_PATHS` / `SURF_T2_PREFIXES` classified paths only to price them; with a flat rate nothing reads them, and leaving them would make dead code look load-bearing. The old "a query string downgrades the tier and under-records spend up to 20×" bug is now unrepresentable — there is no tier left to misclassify. The regression test is kept, asserting no path perturbation can change the quote. - **`fix(skills)` — the routing advice was arguing from a price gap that no longer exists.** `crypto-data` and `surf` skills told agents "Predexon serves the same Polymarket/Kalshi data at $0.0010 vs $0.0075 — 7.5× cheaper". Both now bill the same. The conclusion is unchanged — still route prediction markets to `blockrun_markets` — but for **coverage**, which is the real reason: wallet clustering, smart money, sports, UMA, and five venues Surf does not carry at all. An agent routing on a stale price is making the right call for a wrong, checkable reason. - Prices synced across `blockrun_surf` / `blockrun_markets` tool descriptions, `prediction-markets` / `crypto-data` / `surf` / `gentech-blockrun` skills, the polymarket positions fallback hint, and the README. Untouched: `$0.001` that belongs to other products (stocks quotes, DefiLlama prices, Modal) — several sit on adjacent rows of the same tables. ## 0.30.10 - **`fix(search)` — the budget gate reserved less than a search actually costs.** `blockrun_search` is the most expensive tool here (priced per *source*: a default call settles ~$0.26 while most tools cost $0.001), and its reserve mirrored `$0.025 x max_results` — but the gateway settles **5% above that, rounded up to 4dp**. So every search reserved short, and the gate exists precisely to stop an agent overshooting its cap. Verified against the gateway's own 402 quotes, which are free to request (send any call with no payment header and it replies with the exact price): `max_results` 1/5/10/20/50 quote $0.0263/$0.1313/$0.2625/$0.5250/$1.3125 — the reserve now matches each exactly. - Computed in **integer micro-dollars**, because the float form is not exact: `0.025 * 1.05` is `0.026250000000000002`, which rounds to `$0.026251` — still under the gateway's `$0.0263`, i.e. still short. A reserve must never be short. New `test/search-cost.test.ts` pins the five live quotes, the bare-`{query}` default, the 50-source ceiling, and that garbage `max_results` (`0`, `-5`, `"10"`, `null`, `NaN`, `{}`) falls back to the default reserve rather than $0 — a $0 reserve is a gate bypass. - The tool description was understating it too (`default max_results=10 → $0.25`); it now leads with the fact that search is priced per source and expensive by default (~$0.26 at the default, ~$1.31 at 50), and suggests capping `max_results`. - **`fix(build)` — tests were never typechecked.** `tsconfig.json` had `include: ["src/**/*"]`, so `npm run typecheck` passed while `test/` contained genuine type errors — which is exactly how 0.30.6's broken `estimateChatCost` call signatures reached a commit. Proven before fixing: a planted `const _bad: number = "definitely not a number"` in `test/chat.test.ts` typechecked clean. Now `include: ["src/**/*", "test/**/*"]` and the same planted error fails with `TS2322`. `dist/` is unaffected (tsup builds from `entry`, not `include`) — no test artifacts ship. ## 0.30.9 - **`docs(skills)` — new `crypto-data` skill: three crypto tools had no skill, and agents were paying for data two of them give away free.** `blockrun_defi` (DefiLlama TVL/yields), `blockrun_price` (Pyth quotes + OHLC for crypto/FX/commodities/12 stock markets), and `blockrun_dex` (DexScreener pairs/liquidity) were mentioned only in passing by the general `gentech-blockrun` catalog — no triggers, no paths, no examples. They were effectively undiscoverable. - **Routes by cost, because five tools overlap and two are free.** An agent asked *"what's BTC worth?"* can plausibly reach for `blockrun_price`, `blockrun_surf`, `blockrun_dex`, `blockrun_defi`, or `blockrun_rpc`, and nothing told it which. **`blockrun_price` is free for crypto/FX/commodities and `blockrun_dex` is free outright** — while the same BTC quote through `blockrun_surf` (`market/price`) costs **$0.0095**. The skill leads with a cost-ordered routing table and states the rule plainly: a plain crypto price or DEX pair is free; only reach for `blockrun_surf` when you need what the free tools genuinely lack (on-chain SQL, 100M+ wallet labels, social, news, unlocks, liquidations, ETF flows). - Documents every `blockrun_defi` path with prices, every `blockrun_price` action/category/market, and `blockrun_dex`'s params; cross-links `skills/surf/SKILL.md` (83 endpoints) and `skills/rpc/SKILL.md` rather than duplicating them. Worked examples are compound and free-first — e.g. *"is this token legit?"* starts with free `blockrun_dex` liquidity and only pays for holders/unlocks once the free signal justifies it. - **Verified live, not asserted:** every tool, path, action and category checked against the running server; the FREE claims confirmed end-to-end — `blockrun_price` crypto returned a real BTC quote and `blockrun_dex` real PEPE liquidity with the wallet balance **unchanged to the micro-dollar** (64.946044 → 64.946044). - **`fix(skills)` — Surf's own skill had the wrong prices, and pointed agents at the expensive vendor.** It advertised three tiers ($0.001 / $0.005 / $0.020). The gateway's real price is **flat $0.0075** for all 80 standard endpoints, $0.0200 premium. Confirmed by asking the gateway itself — an unpaid request returns a 402 quoting the exact price, and costs nothing: `market/price`, `wallet/labels/batch`, `social/mindshare`, `news/feed`, `exchange/klines` and `search/web` all quote $0.0075. (The public service pages are wrong too: **/services/surf** says $0.0095/$0.022, and **/services/predexon**'s header says GET $0.003/POST $0.007 while its own table correctly says $0.001/$0.005.) - **Predexon and Surf overlap on prediction markets, and Surf is the wrong answer every time.** Surf carries 17 `prediction-market/*` endpoints and its description advertises "prediction-market positions", so an agent asking for Polymarket odds could legitimately land there — and pay **$0.0075 against Predexon's $0.0010 for identical data, 7.5x**. Predexon also has wallet clustering, smart money, leaderboards, sports, UMA and five more venues that Surf lacks entirely; Surf owns on-chain SQL, 100M+ wallet labels, 16 CEXs, social, news and unlocks that Predexon lacks entirely. Both skills now state the split explicitly and link each other, so the one place you can lose money routes correctly. - No code change; `dist/` is byte-identical to 0.30.8. ## 0.30.8 - **`docs(skills)` — the prediction-markets skill never mentioned the tool it ships with, so agents could not reach Predexon at all.** `skills/prediction-markets/SKILL.md` referenced `blockrun_markets` **zero** times across 263 lines while teaching `client.pm(...)` — the Python SDK — 37 times. An agent in Claude Code following it would try to `import blockrun_llm` and write Python instead of calling the tool sitting right in front of it. Rewritten against the live registry on the pattern `skills/surf/SKILL.md` already proved: MCP invocation first (`blockrun_markets({ path, params, body })`), Python demoted to a "for non-MCP use" footnote. - **It also taught three paths that do not exist.** `polymarket/search`, `polymarket/query`, and `kalshi/query` are absent from the live Predexon registry (the real path is `markets/search`), so an agent that got past the Python problem would have 404'd anyway. Removed. - **The endpoints worth paying for were invisible.** `triggers:` had no entry for smart money, whales, leaderboards, P&L, price history, candles, orderbooks, or open interest — so the skill never fired for those intents and 42 of 58 endpoints were undiscoverable. Triggers 16 → 42; decision table 16 rows → **all 58 endpoints**; description now leads with what a public API cannot give you (history that cannot be backfilled, wallet clustering, smart-money positioning, cross-venue canonical IDs — no account, no API key) rather than "Predexon v2, $0.001/call". - **Added worked examples phrased as user questions**, including compound recipes that show why the data is worth paying for: *"who's smart money betting on in this market?"* (`market/{id}/smart-money` → `wallet/{addr}` → `wallet/positions/{addr}`), *"this whale is up 400% — who are they really?"* (`identity` → `cluster` → `pnl` → `similar`), *"find me something to copy-trade"*, and *"is the same bet cheaper on another venue?"*. - No code change; `dist/` is byte-identical to 0.30.7. ## 0.30.7 - **`docs` — the README documented a feature 0.30.6 deleted.** `routing:"smart"` was removed from `blockrun_chat` along with the ClawRouter dependency, but three README claims survived the release and shipped inside the package (`files` includes `README.md`, so it is also what npmjs.com renders): the Base-only fallback list, a **CRITICAL** note telling agents smart routing is Base-only, and a troubleshooting entry for a `Smart routing (ClawRouter) not available on Solana` error that can no longer occur. Anyone following them would pass `routing:"smart"`, get nothing back, and reasonably conclude the server was broken — the exact failure mode 0.30.6 set out to end. Removed all three. The ClawRouter links under Related Projects stay: it is still a real product, just no longer anything this server depends on. - No code change; `dist/` is byte-identical to 0.30.6. ## 0.30.6 - **`fix(deps)` — decouple from ClawRouter, and bust the npx caches poisoned by its outage.** From 2026-07-11 to 07-14, `npx -y @blockrun/mcp@latest` could not start at all: `SyntaxError: Identifier '__cjs_createRequire' has already been declared`. Nothing was wrong with this package. `@blockrun/clawrouter@0.12.220` published a bundle that had inlined a stale copy of *itself* (it and `@blockrun/llm` depend on each other, so its own `noExternal` build resolved the back-import to the last published dist in `node_modules`), and the duplicated banner made every entrypoint a load-time `SyntaxError`. Fixed upstream in `@blockrun/clawrouter@0.12.222`. - **Why it reached us at all:** we pinned `@blockrun/llm: ^2.11.0`, which caps on the 2.x line — where the router is a hard dependency, statically imported at `dist/index.js:29`. So every MCP start-up eagerly loaded ClawRouter's entire bundle to serve tools that never route. Now on `@blockrun/llm: ^3.6.1`, where it is an **optional peer dependency npm does not install at all**. ClawRouter is gone from the tree: `removed 54 packages`, ~50MB, about **15% of a 328MB install**. - **`fix(chat)!` — `routing:"smart"` is removed** (BREAKING: `blockrun_chat` no longer accepts `routing` / `routing_profile`). It auto-picked the cheapest capable model, which serves an agent that has no model of its own. But every caller here is *already running inside a frontier model* and reaches for this tool to get what that model **lacks**: a specific model, an image, live X data. Nobody in Claude Code needs us to pick a cheap model for them. It was the only caller of `llm.smartChat()` — hence the only reason the router was ever in our dependency tree, and the only reason a broken ClawRouter bundle could take this server down. Want a cheap model? `mode:"cheap"` / `mode:"glm"` or an explicit `model:` — both resolve here, with no router. - **Why this needs a version bump rather than just the upstream fix:** npx keys its cache on the *spec*, not the resolved tree. With `@blockrun/mcp` still at 0.30.5, `npx -y @blockrun/mcp@latest` considers `~/.npm/_npx/68ab1540555296f1` already satisfied and reuses the poisoned ClawRouter forever. Measured: a cache holding 0.30.5 stays broken on retry; one holding 0.30.4 rebuilds and heals. Publishing 0.30.6 makes `latest` outrank every cached copy, so affected installs self-heal on next run with no manual cache clearing. - **Why local dev never caught it:** our lockfile pins `@blockrun/clawrouter@0.12.214`, so no developer machine was ever exposed. Published packages don't ship lockfiles, so users resolved `^0.12.190` fresh and got `0.12.220`. Reproducing installs the way a user gets them — not the way the repo builds — is now the standard for this class of bug. - 151 tests, typecheck, build, stdio smoke green. Verified end-to-end against the published registry, including a **live x402 payment settled on Base with the router absent** (`-0.010160 USDC`, `zai/glm-5`) — the payment path survives the `@blockrun/llm` 2.x→3.x major bump. ## 0.30.5 - **`fix(polymarket)` — `redeem` actually pays out now: route redemption through Polymarket's pUSD collateral adapters.** A user reported three redeems that returned success + a tx hash while Polymarket's data-api logged each as `REDEEM size=0`. Root cause (verified on-chain with live markets): V2-era CLOB token_ids are still keyed to **USDC.e** (standard markets) or the legacy NegRiskAdapter's wrapped collateral (neg-risk) — **not pUSD**. Redeeming via `CTF.redeemPositions` with pUSD collateral recomputes a positionId nobody holds, and the CTF does **not** revert on a zero balance: it burns nothing, pays nothing, and the transaction *succeeds*. The fix targets the canonical pUSD collateral adapters from [docs.polymarket.com/resources/contracts](https://docs.polymarket.com/resources/contracts) (Sourcify `exact_match`; identity constants — CTF, pUSD, USDC.e, legacy adapter, wrapped collateral — verified on-chain before wiring): `CtfCollateralAdapter` `0xAdA100…FcE1f` (standard) and `NegRiskCtfCollateralAdapter` `0xadA200…eAab` (neg-risk). They pull the caller's outcome tokens, redeem through the right underlying path, wrap the USDC.e payout into pUSD, and return **pUSD** to the deposit wallet. Setup's approval batch adds the two adapter operator approvals (they pull via `safeBatchTransferFrom`); **existing wallets self-heal — run `action:"setup" confirm:true` once before your next redeem.** Hardened after an adversarial multi-agent audit of the fix: the success message now reports the actual **payout delta** (a $0 payout while winning tokens were held returns a loud ⚠️ instead of a ✅), the EOA path checks `receipt.status` (a mined-but-reverted tx no longer prints ✅), the EOA approvals loop gets the same check, and the relayer-batch failure text now matches the missing-approval hint. New `test/polymarket-redeem.test.ts` pins the literal adapter addresses + calldata shape. 153 tests, typecheck, build, stdio smoke green. ## 0.30.4 - **`fix(polymarket)` — retire the last stale manual-relayer-creds guidance and align every runtime/doc surface with actual behavior.** A two-round multi-agent audit of the `polymarket-trading` skill against the implementation (69 claims verified, every finding adversarially re-checked) surfaced 24 stale or contradictory statements left behind by the builder-key bootstrap (0.30.0) and Finland-egress (0.30.3) transitions; all fixed: - **Tool description** no longer demands `POLYMARKET_RELAYER_API_KEY/_SECRET/_PASSPHRASE` (credentials have been auto-bootstrapped from the wallet key since 0.30.0) and now states the Finland-egress geoblock default instead of the pre-0.30.3 "US/UK/EU are close-only" wording. - **Dead manual-creds code deleted** (-77 lines): `relayerCredsMissing()`/`relayerCredsMissingMessage()` (hard-coded `false`/`""`), the unreachable `setup` branch that told users to fund "while you get relayer creds", `deriveDepositWalletNoCreds()`, and the never-called `RelayerCreds`/`getRelayerCreds` env config. - **Proxy ≠ egress, consistently.** The 403 error, `setup`'s region line, the SKILL, README, and setup guide all said (or implied) `POLYMARKET_CLOB_PROXY` / `HTTPS_PROXY` re-route the egress. They don't — a proxy only changes how the current CLOB host is reached; Polymarket still sees the Finland relay's IP unless `POLYMARKET_CLOB_HOST` is also repointed. Every surface now leads with the host repoint and states the proxy caveat. - **EOA mode (`POLYMARKET_SIG_TYPE=0`) honestly framed.** The skill claimed it is "read-only for orders" while simultaneously recommending it for the issue-#65 error; the code prints an unconditional "Ready to trade". All surfaces now agree: a diagnostic fallback — the CLOB may reject plain-EOA makers on order placement. - **Signer-key custody claims qualified.** `~/.blockrun/.session` is the *default* signer source; a `BLOCKRUN_WALLET_KEY` env var or an existing agent `wallet.json` takes precedence (per `@blockrun/llm` key resolution) — so the backup notes (skill, README, setup guide, `setup` output, `blockrun_wallet` output) now say to back up the key behind the signer address `setup` prints, wherever it lives, instead of hard-coding one path that may not hold the controlling key. README's env table gains the missing `BLOCKRUN_WALLET_KEY` row. - Skill step-0 note inverted for the Finland default (geoblocked users set **nothing**; `POLYMARKET_CLOB_HOST` is for opting out), and the fund-before-deploy error no longer says deploy "needs relayer creds". 150 tests (maker-rejection assertion updated), typecheck, build, stdio smoke (19 tools) green. ## 0.30.3 - **`fix(polymarket)` — default the CLOB geoblock egress to Finland (`europe-north1`), retiring the Tokyo relay.** Order placement routes through a hosted egress in a permitted region; the default now points at BlockRun's **Finland** relay instead of Tokyo. Per Polymarket's own geographic policy, Finland is **fully unrestricted** (frontend *and* API), whereas Japan is "close-only on the frontend" — a gray zone at risk of tightening. Verified from the new egress: `GET /clob/version` → `{"version":2}`, `POST /clob/order` → **401 (permitted, not 403)**, geoblock → `{"blocked":false,"country":"FI"}`. Deploy recipe moved to [`deploy/finland-egress/`](deploy/finland-egress). Override with `POLYMARKET_CLOB_HOST` as before (go direct with `https://clob.polymarket.com`, or run your own egress). No API/behavior change beyond the default host. - **`docs`** — Tokyo → Finland across the README, the setup guide, and the `polymarket-trading` skill; corrected the region note (US/UK + specific countries are close-only; Ireland/Finland/Japan-API are open). ## 0.30.2 - **`fix(polymarket)` — grant the missing `pUSD → NegRisk Adapter` approval so neg-risk ("winner"/multi-outcome) markets can actually be traded.** `setup`'s approval batch granted pUSD (ERC-20) spend to only the two exchanges, while giving the NegRisk Adapter a CTF *operator* (ERC-1155) approval but **not** the pUSD one — an asymmetry that let `setup` report ✅ ready yet neg-risk buys fail: the CLOB accepts the order, then settlement through the adapter reverts. The pUSD spender set now matches Polymarket's own canonical `approveTokensForTrading` (both exchanges, the **NegRisk Adapter**, and the Conditional Tokens contract). Since `readApprovals` reads on-chain every run, existing deposit wallets self-correct — re-run `action:"setup" confirm:true` once to sign the newly-required approval. Root-caused from a real user's funded-but-failing bet on a World Cup winner market (deposit wallet fully funded + exchange-approved on-chain; the field diagnosis of an "approval never landed / gasless relayer" bug was a flaky-public-RPC artifact — `polygon-rpc.com` returns `401 tenant disabled` that reads as allowance 0). - **`fix(polymarket)` — buy/sell now self-heal a stale CLOB balance cache instead of failing a funded wallet.** The CLOB keeps a server-side balance/allowance cache; `setup`'s warm-up refresh was best-effort and **silently swallowed** (`.catch(() => undefined)`), so a failed warm-up left `setup` printing "ready" while the exchange still saw balance 0 → `not enough balance/allowance` on a fully-funded vault. On that rejection the order path now refreshes the cache (`updateBalanceAllowance` — COLLATERAL for buys, the outcome token for sells) and retries the submit **once** (mirrors the existing #65 creds-retry); `setup` surfaces a warm-up failure as a note rather than hiding it. New test `test/polymarket-balance-retry.test.ts` (stateful fake CLOB: stale-cache reject → refresh → retry succeeds; and a persistent rejection retries exactly once then maps the error). 152 tests, typecheck, build green. - **`docs(polymarket)` — document the full canonical approval set and neg-risk troubleshooting** across the README, `docs/polymarket-trading-setup.md`, and the `polymarket-trading` skill (the four pUSD spenders, why the NegRisk Adapter grant matters, and "re-run `setup confirm:true` after upgrading to grant a newly-required approval"). ## 0.30.1 - **`fix(polymarket)` — make `setup` resilient to transient Polygon RPC failures.** The five approvals reads (pUSD `allowance` ×2, CTF `isApprovedForAll` ×3) and the pUSD `balanceOf` read went straight through viem's `fallback` transport — which rotates RPCs on a *transport-level* error but does **not** retry a decode error from a flaky public RPC that returns a bad/stale 200 body, so a single hiccup on any read erred the **entire** `setup` (observed ~1-in-3 on a cold first run). Adds a read-level retry (4 attempts, backoff — re-running the read gives the fallback a fresh transport) around those reads, and hardens the transports (`retryCount` on each `http` and on the `fallback`). Verified 10/10 back-to-back setups green. Surfaced by an end-to-end test of the *published* package over the MCP stdio protocol (tools registered in the trading profile; setup / positions / orders / dry-run buy / dry-run fund / empty-vault withdraw all correct). No behavior change on the happy path. ## 0.30.0 - **`feat(polymarket)` — zero-config trading, gasless x402 funding, and the corrected POLY_1271 auth. First *published* release of `blockrun_polymarket`.** Supersedes the never-published 0.29.0 (its publish was blocked by a red test until this cut) and makes the full lifecycle work out of the box — verified end-to-end with real money on the live CLOB: fund → deploy → buy → sell → withdraw, from a US machine, zero configuration. Changes since 0.29.0: - **Corrected clob-client-v2 [#65](https://github.com/Polymarket/clob-client-v2/issues/65) fix.** 0.29.0 bound CLOB creds to the deposit wallet via an ERC-7739-wrapped L1 ClobAuth (the fix the issue *proposed*) — which the CLOB rejects with *"Invalid L1 Request headers"*. The working path, matching Polymarket's reference Rust client (`rs-clob-client-v2`): L1/L2 auth is the **owner EOA's** plain signature (the API key binds to the EOA), while POLY_1271 orders carry signer/maker = deposit wallet and are validated on-chain by the vault's ERC-1271 `isValidSignature`. `getClobClient()` derives EOA creds and hands the real EOA signer + the deposit wallet as `funderAddress`. Verified: a real $1 order matched. - **No manual credentials.** The MCP bootstraps its own Builder API key from the user's wallet via the CLOB `createBuilderApiKey()` (L2-authed) for the gasless relayer's HMAC auth — no Polymarket account, no "get a relayer key from the website" step. Cached 0600 at `~/.blockrun/.polymarket-builder-creds`. - **Gasless x402 funding (`action:"fund"`).** One call moves Base USDC into the vault as pUSD: signs an EIP-3009 authorization, the BlockRun gateway charges $0.01 and settles the deposit **straight to the Polymarket bridge** (non-custodial — the USDC never touches BlockRun; CDP sponsors the Base gas); the bridge unwraps to pUSD in the vault. $2 minimum; the credit is async, so it reports SUBMITTED with the pUSD credit PENDING rather than "funded" (#226). - **`action:"withdraw"` — cash out pUSD → native USDC on Base**, delivered to the agent wallet (the same key that pays x402 fees). Verified: $3.01 landed on Base in ~30s. - **Zero-config geoblock bypass.** `POLYMARKET_CLOB_HOST` now defaults to BlockRun's hosted Tokyo egress, so order placement works from geoblocked regions (US/UK/EU) out of the box — verified: a US machine reports `Region: order placement permitted (egress JP)` with no config. Fully overridable (go direct with `https://clob.polymarket.com`, or run your own via `deploy/tokyo-egress`). The relay only forwards to Polymarket; every order is still signed locally. (Operational note: this makes the relay production-critical for order placement.) - Underscore-auth-header survival bridge (proxies/Cloud Run strip `POLY_*` headers — sends hyphenated copies too); 1rpc-first Polygon RPC order (polygon-rpc.com was lagging). User guide rewritten (`docs/polymarket-trading-setup.md`) and the `polymarket-trading` skill now teaches the agent the zero-setup flow (fund via x402 → buy → sell → redeem → withdraw). 148 tests, typecheck, build green. ## 0.29.0 - **`feat(polymarket)` — new `blockrun_polymarket` tool: real trading on Polymarket (CLOB V2, Polygon).** Actions: `setup` (gasless deposit-wallet provisioning via Polymarket's relayer: CREATE2 derive → deploy → confirm-gated approval batch → L2 creds → CLOB balance-cache refresh), `buy`/`sell` (limit GTC/GTD + market FOK/FAK, tick-rounded, min-size-checked), `orders`, `cancel`, `positions` (free Data-API), `redeem` (gasless via relayer; NegRisk adapter aware). Non-custodial: every order/approval/redeem is EIP-712-signed locally by the existing `~/.blockrun/.session` key (one identity pays x402 on Base AND bets on Polygon); the relayer/CLOB only ever receive signed, tamper-evident payloads. Safety is server-side and deliberately separate from the x402 budget ledger (different asset, different wallet): `confirm:true` hard-required to sign anything (dry-run preview otherwise), `POLYMARKET_MAX_BET_USD` per-order cap (default $25), optional `POLYMARKET_MAX_SESSION_USD`, secrets never printed (creds/state at `~/.blockrun/.polymarket*`, 0600). Ships a workaround for the open clob-client-v2 [issue #65](https://github.com/Polymarket/clob-client-v2/issues/65) (L1 auth not ERC-7739-wrapped for POLY_1271, so API keys bind to the EOA and every deposit-wallet order 400s): `l1-auth-1271.ts` derives creds bound to the deposit wallet with the same TypedDataSign envelope the SDK uses for orders, plus an address-reporting signer shim so L2 headers carry the funder — pinned by a golden-vector test and an independent viem signature-recovery test; auto-recovery re-derives creds once on the mismatch fingerprint. `POLYMARKET_SIG_TYPE=0` gives a plain-EOA fallback. Geoblock-aware: runtime region check in setup and on 403s (US/UK/EU are close-only), `POLYMARKET_CLOB_PROXY`/`HTTPS_PROXY` egress passthrough — the proxy covers CLOB order traffic AND the relayer's own (separate-axios) deploy/approve/redeem calls, so a US-egress demo routes every geoblockable Polymarket request through one permitted egress. Deps: `@polymarket/clob-client-v2@1.0.8` (exact-pinned — the patch mirrors its signing internals), `@polymarket/builder-relayer-client`, `@polymarket/builder-signing-sdk@0.0.8` (pinned for dedupe), `axios`, `https-proxy-agent`. Registered in the `full` + `trading` profiles (19 tools). Hardened after a 4-dimension adversarial multi-agent review (money-safety / crypto / correctness / integration): conservative side-aware tick rounding (a limit BUY floors so a signed price never beats the user's limit, and a sub-tick buy is rejected rather than silently lifted); atomic reserve-then-commit session accounting (rolls back on a failed submit, closing a TOCTOU overshoot under concurrent orders); `success:true` + informational `errorMsg` (CLOB "delayed") treated as placed, not thrown — preventing duplicate submits; market SELL with no book bid rejected instead of $0-notional bypassing the caps; money caps fail CLOSED on `0`/garbage with a stderr warning; deposit-wallet state keyed to the signer so a rotated key never points funding at an unrecoverable vault; `POLYMARKET_BOUNDED_APPROVALS` honored in EOA mode and in the "already-approved?" check; `assertContractConfig()` runs before any approval signature; tightened creds-mismatch classifier (no false-positive on a "401" inside a token id); credential-derivation errors never echo response bodies; positions paginated. 132 tests green (10 new suites incl. confirm-gating, cap/tick/min-size enforcement, reserve-rollback, delayed-status, and an L1-auth golden vector + independent signature-recovery check); typecheck + build green. ## 0.28.0 - **`fix(wallet)` — top-up now mints a real Coinbase Onramp link instead of the dead `buy.blockrun.ai`.** 0.27.0 opened a static `https://buy.blockrun.ai`, which doesn't resolve (NXDOMAIN) — the browser opened to a "can't reach this site" page. Replaced with the real funding path: `blockrun_wallet action:"deposit"` (and the paid tools' out-of-funds branches) now call the gateway's free `POST /v1/onramp/token` with an x402 wallet signature ($0 — the signature only proves wallet ownership, nothing settles) to mint a **one-time `https://pay.coinbase.com/...` session URL**, then open that. The user buys USDC with a card and it settles directly into their own self-custody Base wallet — the MCP equivalent of Franklin's in-panel "Buy USDC with card", without a local dashboard server. Base-only (Coinbase can't onramp SPL USDC); on Solana `launchTopUp` returns address/QR guidance. Verified end-to-end against the live gateway with a fresh empty wallet: `deposit` and an out-of-funds `blockrun_image` each minted a distinct working `pay.coinbase.com` link. No media-tool `description`/schema changes (the link appears only in a runtime error), so the MCP prompt length is unchanged. ## 0.27.0 - **`feat(wallet)` — out-of-funds now auto-opens the BlockRun top-up page.** Adds `blockrun_wallet action:"deposit"`, which launches `https://buy.blockrun.ai` in the user's default browser (best-effort via a new `openUrl` helper) and returns the link plus the active-chain address as a fallback for headless/permission-restricted environments. The paid media tools (`blockrun_image`, `blockrun_video`, `blockrun_music`, `blockrun_speech`, `blockrun_realface`) now auto-open the same top-up page in their out-of-funds failure branch and print the link in the error, so a user whose wallet ran dry is taken straight to funding instead of a dead-end error. Server-side only: no tool `description`/schema changes on the media tools (the link text appears solely in a runtime error), so the MCP prompt length is unchanged. No token minting, no x402, no local panel server — just the hosted funding portal (the MCP equivalent of Franklin's in-panel top-up). Adds a handler test with `open` mocked (no browser launches). ## 0.26.0 - **`feat(media)` — every media tool now reports the USDC cost in its result.** `blockrun_image`, `blockrun_video`, and `blockrun_music` returned the URL/model but no price, so on a bare MCP (without the plugin's `announce-cost` skill) the user never saw what a generation charged — the cost was booked to the budget ledger but never surfaced. Each now appends a `Cost: $X.XXXX` line and a `cost_usd` field to `structuredContent`, matching `blockrun_speech` / `blockrun_realface` which already did this. Video and music report the **real 402-settled amount** (both are token-priced upstream, so 1080p/4K clips and long tracks can exceed the per-unit estimate); image uses the catalog estimate on Base and the 402 amount on Solana — each falls back to the estimate only if the quote doesn't parse. No new spend path and no behavior change to what is charged — the figure shown is the same amount already recorded to the budget. Adds handler-level tests for the image/video/music footers with the HTTP layer and x402 payment helpers mocked (no network, no real spend); `npm test` now runs with `--experimental-test-module-mocks`. ## 0.25.3 A multi-agent audit pass (finder fan-out across the money path + freshly-merged Solana image code, each finding adversarially verified) surfaced six real issues — all fixed here. Two are budget-gate bypasses on the most-used tools; one is an SSRF deny-list gap. 103 tests (13 new) + typecheck + build + 18-tool stdio smoke green. - **`fix(chat)` — reserve the frontier worst-case for `balanced`/`coding`/default modes.** `estimateChatCost` only reserved the frontier amount for `reasoning`/`powerful` and explicit models; `balanced` and `coding` fell through to the ~$0.003 budget-model heuristic. But `balanced[0]` = `openai/gpt-5.5` and `coding[0]` = `anthropic/claude-opus-4.8` are frontier, and a no-mode chat resolves to `balanced` — so the **default** chat path reserved 6–20× too little. A near-exhausted budget could authorize a frontier completion, and N concurrent default calls each passed the gate then settled at frontier price, blowing the cap. The ledger (`recordActualSpend`) was already correct; the hole was purely at the pre-call gate. - **`security(ssrf)` — strip trailing dots so an FQDN can't bypass the deny-list.** `isBlockedFetchHost` matched names exactly or via `endsWith`, but never stripped the root dot the WHATWG URL parser preserves — `new URL("http://metadata.google.internal./").hostname` is `"metadata.google.internal."`, which matched nothing while DNS still resolved it. A prompt-injected `image`/`mask` URL in `blockrun_image` could reach loopback/metadata/internal hosts through this gap. - **`fix(phone,surf)` — price on a normalized path so a query string can't downgrade the tier.** `estimatePhoneCost`/`estimateSurfCost` classified by exact match on a slug stripped only of a leading slash, so a query string / trailing slash / casing missed the match and priced at the cheap default — `phone/numbers/buy?x=1` billed locally as $0.001 while the gateway charged the real $5, and surf's $0.02 tiers dropped to $0.001. Classification now runs through a shared `normalizeClassifyPath`; the original slug is still sent, so legitimate surf query params are preserved. - **`fix(image)` — re-reserve the Solana quote against the budget before paying.** On Solana, `blockrun_image` reserved and confirmed the Base cost-table estimate but settled the gateway's marked-up quote, with no re-check — so a call that passed the gate on the low estimate could settle past the cap (`blockrun_video` already guards this). `solanaPaidPost` now exposes the quoted price via an `onQuote` hook before signing; the tool re-reserves the true amount (shared `reReserveIfHigher` helper) and aborts before signing any payment if it would overshoot. - **`fix(music)` — keep the payment authorization valid through the poll window.** The EIP-3009 authorization was signed with `maxTimeoutSeconds=300`, but after signing the tool waits up to ~95s submit + 240s poll — past 300s. A slow MiniMax track completing after `validBefore` failed settlement server-side and surfaced as a wrong "fund your wallet" error for a track that actually generated. Bumped to `Math.max(server, 600)` (mirrors `blockrun_video`). - **`fix(speech,music)` — book settled spend before parsing the response body.** On the synchronous settled path a 200 means USDC already left the wallet, but `recordActualSpend` ran only after `resp.json()` and URL validation — so a truncated body threw first, skipped the record, and the `finally` released the reservation, leaving the ledger unchanged for a real charge (the cap silently drifts more permissive). `speech` now books right after confirming the 200; `music`'s inline path parses defensively and records from the receipt before throwing. ## 0.25.2 - **`security(deps)` — patch the `ws` memory-exhaustion DoS chain.** A pinned `viem` transitive `ws@8.20.1` (below the ≥8.21.0 patch) was reaching consumers and flagging the entire `ws → viem → @x402/evm → @blockrun/clawrouter → @blockrun/llm` chain (5 high). An `overrides` entry forces `viem`'s `ws` to 8.21.0, clearing all of them — `npm audit` drops **15 → 11**, the ws chain gone. The override ships in `package.json`, so every `npx` install gets the patched `ws`. The remaining advisories are the Solana web3.js-v1 tree (no upstream fix for `bigint-buffer`; npm's only suggested "fix" is a breaking downgrade), the intentional `rpc-websockets@9.3.0` pin (bumping re-introduces the Node <20.19 ESM break), and a dev-only `esbuild`. Also fixed at the source in **`@blockrun/llm@3.5.1`**. No source changes; 84 tests + build + live wallet smoke green. ## 0.25.1 - **`fix(image)` — validate the env knobs on the 0.25.0 features.** The new opt-in features parsed their numeric env vars with bare `Number(env || default)`, which only falls back on unset/empty (a non-empty string is truthy) — so a typo became `NaN` and silently changed behavior: `BLOCKRUN_CONFIRM_THRESHOLD="$0.05"` flipped the confirm gate to "ask on every paid call", and (fail-open) a malformed `BLOCKRUN_INLINE_MAX_BYTES` removed the inline base64 context-bloat ceiling (`data.length > NaN` is always false). `confirm-spend` now reuses the validated `parseBudgetLimitEnv` (trims, strips a leading `$`, requires a finite positive number); `inline-image` uses a validating `envInt` that falls back to the default on a non-finite/non-positive value and clamps quality to 1–100. Both opt-in and off by default; no behavior change for valid configs. ## 0.25.0 - **`feat(image)` — optional inline preview + opt-in spend confirmation.** Two UX layers for `blockrun_image`, both off by default (no behavior change unless enabled): - **Inline preview** — an `inline` param (or `BLOCKRUN_INLINE_IMAGES=1`) returns a downscaled JPEG thumbnail as a `type:"image"` block **alongside** the full-resolution URL, so rich clients (e.g. the VS Code extension) render the result in-conversation. Best-effort: auto-skips above a size cap and on any fetch/encode error (URL-only fallback), with source download/decode caps. Tunable via `BLOCKRUN_INLINE_MAX_DIM` / `_QUALITY` / `_MAX_BYTES`. - **Spend confirmation** — before charging, the server asks via **MCP elicitation** (showing the estimated cost) with an "approve all this session" checkbox. **Off by default — opt in with `BLOCKRUN_CONFIRM_SPEND=on`** (avoids double-prompting when a PreToolUse hook already gates spend); threshold via `BLOCKRUN_CONFIRM_THRESHOLD`. No-ops on clients without elicitation and **fails open** — only an explicit *decline* aborts (a decline releases the budget reservation and charges nothing), and session auto-approve latches only on an explicit *accept*. Thanks @KillerQueen-Z! (#21) — re-integrated on top of the 0.24.x charge path so the SSRF guard, Content-Length cap, and the concurrency-safe `reserveBudget` reservation all stay intact; the confirmation runs once inside the reserve→record→release flow. ## 0.24.3 A fourth audit pass (regression-hunting the 0.24.1–0.24.2 fixes plus the packaging/build surface) found two issues — both in fixes shipped earlier in the 0.24.x line. - **`fix(security)` — the image SSRF deny-list no longer misses IPv4-mapped IPv6 literals.** `isBlockedFetchHost` (added in 0.24.1) only decoded the decimal `::ffff:127.0.0.1` form, but the WHATWG URL parser canonicalizes a mapped literal to the hex-compressed form (`new URL('http://[::ffff:127.0.0.1]/').hostname` → `[::ffff:7f00:1]`), which slipped the guard — so `http://[::ffff:169.254.169.254]/` reached the cloud metadata endpoint and `http://[::ffff:127.0.0.1]/` reached loopback. The hex `::ffff:hi:lo` form is now decoded to its embedded IPv4 and re-checked, and the test exercises the hostname `new URL()` actually emits (the prior test only checked the decimal form the real caller never produces). - **`fix(chat)` — `thinking.budget_tokens` floor is now 1024.** 0.24.2 set the schema floor to 1, but Anthropic's extended thinking requires `≥1024` and the value is forwarded verbatim, so `[1,1023]` always 400'd. The floor matches Anthropic's minimum. ## 0.24.2 A third audit pass — focused on regression-hunting the 0.24.1 changes plus the previously thin Anthropic path, zod schemas, and docs — surfaced a small batch of fixes (one of them a regression introduced by 0.24.1 itself). - **`fix(chat)` — extended-thinking `budget_tokens` no longer bypasses the budget gate.** The pre-pay reserve was derived from `max_tokens`, but Anthropic bills thinking tokens as output, so a tiny `max_tokens` plus a large `thinking.budget_tokens` passed a ~$0.02 gate while settling for several dollars. The thinking budget is now folded into the reserve, and the param is bounded (`int`, 1–100000) instead of unbounded. - **`fix(chat)` — native Anthropic data-URI images.** `parseDataUri` only matched `image/{jpeg,png,gif,webp}` with no parameters, so a `data:image/jpg;base64,…` (the common alias) or a URI with `;name=` was forwarded as a `type:"url"` source and 400'd upstream. It now accepts the `jpg` alias and extra params, rejects unsupported media types, skips an unparseable data URI instead of forwarding a broken source, and drops a message whose content reduced to empty. - **`fix(perf)` — `getChain()` no longer scans the home directory on every call.** 0.24.1's empty-session-file fix switched Solana autodetection to `loadSolanaWallet()`, which `readdir`+`stat`s every hidden dir in `$HOME` — on every `getChain()` call (a hot path hit by every tool, `getWalletInfo`, and `formatError`). It now reads just the session file and requires it non-empty, keeping the guard without the per-call scan. - **`docs(readme)`** — reconcile with code: Node **≥ 20.19** (was ≥ 18; `engines` requires 20.19), add `blockrun_realface` (enroll/portrait) to both Base-only lists, and note `blockrun_search` covers **X/Twitter** (not just web + news). ## 0.24.1 A second audit pass (every finding adversarially re-verified) over the 0.24.0 code — including the changes 0.24.0 itself introduced — surfaced a batch of hardening fixes. None critical; the two notable ones are residuals of the 0.24.0 budget work. - **`fix(budget)` — high-resolution video can no longer settle past the cap.** The video pre-pay gate reserved only `perSecond × seconds` (a 720p-baseline estimate); Seedance/Sora are token-priced upstream, so a 1080p/2K/4K render could settle for several multiples of the reserve while the gate only validated the small number. The real price from the 402 challenge is now re-reserved against the budget **before** the payment is signed (and held for the full polling window so concurrent jobs reserve the true amount), aborting if it would exceed the cap. - **`fix(budget)` — concurrent `blockrun_chat` calls no longer over-count / cross-attribute spend.** `withSettledCost` measured a call's cost as the delta of the shared client's cumulative `getSpending()` counter; under the MCP SDK's concurrent dispatch, two in-flight calls each captured the other's settlement, inflating the ledger and charging agent A for agent B's spend (fail-safe — it never under-counts, so it could not overspend). Each chat call now runs on a fresh per-call client so the delta isolates only that call. - **`fix(security)` — SSRF guard on the `blockrun_image` reference-URL fetch.** `toImageDataUri` fetched a caller/model-supplied URL server-side with redirects followed and no address filtering, so a supplied (or prompt-injected) reference could probe localhost, the cloud metadata endpoint, or internal hosts. It now rejects loopback/private/link-local/CGNAT/IPv6-ULA addresses and metadata/internal names, and follows redirects manually, re-validating every hop. - **`fix(robustness)` — bounded fetches, cache + chain-detection edges.** `blockrun_dex` and the Base balance RPC now use bounded fetches (no unbounded hang); the model cache treats an empty catalogue as *not loaded* (an empty result was pinned for the full 5-min TTL); and `getChain` detects Solana via a usable key (`loadSolanaWallet`) instead of bare `existsSync`, so an empty/truncated session file no longer pins every tool to an unbuildable client. - **`fix(video)` / `docs(constants)`** — the video success message reports the billed duration instead of a hardcoded `8s`, and the OpenAI model-inventory comment now lists `gpt-5.5` (the balanced default) with the correct count. - **`test`** — +4 suites/cases (68 total): SSRF host classification, model-cache empty-result re-fetch, plus the repurposed image guard test. ## 0.24.0 A whole-codebase audit (8 review angles, every finding adversarially re-verified) found that the v0.23.0 budget cap — the wallet-drain guardrail — had **four independent bypasses**. This release closes all of them plus a batch of correctness and robustness fixes. - **`fix(security)` — path-based passthrough tools no longer let a `..` segment escape their namespace.** `rpc`, `surf`, `modal`, `phone`, `exa`, `search`, `defi`, and `markets` only stripped leading/trailing slashes, so an internal `..` (or its `%2e%2e` / `.%2e` / backslash encodings, which the WHATWG URL parser normalizes identically) survived — e.g. `blockrun_surf path:"../../v1/phone/numbers/buy"` re-routed onto a $5 endpoint while the ledger booked $0.001, defeating both the per-tool budget pre-check and profile scoping (a `trading`-profile call reaching `/v1/modal/*` or `/v1/phone/*`). New `utils/path-safety` helpers (`hasPathTraversal`, `isValidNetworkSlug`) reject traversal/invalid chain slugs **before** any spend; `blockrun_rpc` validates the network as a plain chain slug (`/^[a-z0-9-]+$/`). - **`fix(budget)` — the spend cap can no longer be bypassed by concurrent calls (check-then-record TOCTOU).** `checkBudget` only *read* `spent`; the paid call then awaited the network before the spend was *written*, so N concurrent calls each passed a stale total and collectively overran the cap — exactly the multi-agent fan-out the tools advertise. New `reserveBudget()` atomically checks **and** reserves the estimate into `spent`, returning an idempotent `release()` that every paid tool now calls in `finally` once the call settles or fails. The real settled cost is still booked separately; release nets it out. No-charge-on-failure semantics are preserved. - **`fix(chat)` — `routing:"smart"` + `routing_profile:"free"` no longer drains the wallet unmetered.** That combination reserved `$0` at the gate, but the SDK maps `"free"` → a **paid** auto-tier model, so a loop could spend past the cap with the gate never firing. The `$0` special-case is removed (it now reserves the normal auto amount) and the schema copy that promised "zero cost NVIDIA" is corrected. Also: `response_format:"json_object"` is now honored on the native `anthropic/claude-*` path (folded into a system instruction — `/v1/messages` has no `response_format` field), and `routing:"smart"` combined with a multi-turn `messages` array now returns a clear error instead of silently dropping the conversation history. - **`fix(errors)` — failures on the manual-402 media tools are classified accurately.** `speech`/`music`/`video`/`realface` probe the endpoint *unpaid* and threw on any non-402 response; the catch matched payment errors by the substring `"402"`/`"payment"`, so a 5xx outage, a 429, or RealFace's 425 (liveness not finished) was reported as "fund your wallet". A new `isPaymentRejectionError` matches only real settlement signals (`insufficient`/`balance`/`rejected`), the probe throws carry no `402`/`payment` tokens, and `formatError`'s status-code regex no longer reads the integer part of a decimal amount (`$402.50`, `$500.00`) as a status code. `music`/`video` also guard the probe-body parse with `.catch(() => ({}))` so a non-JSON error page can't mask the real status. - **`fix(robustness)` — startup crash, `$NaN` balance, body timeout, image OOM, key-leak gap.** A nonsensical `--profile constructor`/`__proto__` now falls back to `full` (via `Object.hasOwn`) instead of crashing at startup; a lagging RPC returning `{"result":"0x"}` no longer yields `$NaN USDC` and aborting the fallback list (parsed via BigInt, garbage → next RPC); `fetchWithTimeout` keeps its abort timer armed so the timeout covers a body that stalls after headers; a remote reference image is rejected by `Content-Length` before being buffered into memory; and the key-leak scanner now catches a bare (no-`0x`) 64-hex key under a key/secret-named field (MetaMask export format). The duplicated Base USDC address / RPC list in `wallet.ts` is collapsed onto `constants.ts`. - **`refactor` — dead `ServerContext` type removed; `realface` enroll dedup.** The unused `ServerContext` interface is gone, and the enroll action calls the file's own `payAndPostJson` x402 helper instead of a ~40-line inline copy that had to stay in sync with the portrait path. - **`test` — 29 new unit tests (64 total).** New suites cover path-safety (incl. percent-encoded/backslash traversal), budget reservation (concurrent gating + idempotent release), `estimateChatCost`/native-JSON, `parseBaseUsdcCallResult`, the body-timeout, the image `Content-Length` pre-check, the key-leak matchers, and the new error-classification cases. ## 0.23.2 - **`fix(errors)` — error guidance no longer suggests a wrong, cross-domain model, and upstream model outages are classified as such instead of a generic blip.** `formatError` (shared by all tools) had a single 500 branch that appended *"try a different model (e.g. openai/gpt-4o)"* — useless advice on a video/image/music/speech failure, and wrong when the gateway surfaced an upstream model-supply outage (token360's `Model '…' not found or not active for requested provider`) as a 500. A new `isModelUnavailable` branch detects that case and says the model is *temporarily unavailable upstream*; an optional `altModels` lets a tool name a **same-domain** fallback (video → `bytedance/seedance-2.0, azure/sora-2`; image → `google/nano-banana, zai/cogview-4`, each spanning two providers so a single-provider outage still leaves a working suggestion). Music/speech/other tools simply stop emitting the wrong model name. Thanks @KillerQueen-Z! (#26) - **`test` — `formatError` branch coverage.** `test/errors.test.ts` covers model-unavailable (with and without `altModels`), the generic-500 path no longer naming `gpt-4o`, payment/402 funding guidance, plain validation messages getting no canned text, and the `$1.4020`-isn't-a-402 token-boundary guard. ## 0.23.1 - **`fix(modal)` — long synchronous `sandbox/exec` no longer aborts at 60s and orphans a paid sandbox.** Modal's `exec` blocks until the command finishes (the skill documents `timeout` up to 1200s), but the call ran on the shared 60s-timeout client, so any exec over ~60s threw `AbortError` — the result was lost and the sandbox the user paid to create kept running upstream. Modal calls now use a dedicated client whose HTTP timeout is sized to the requested `timeout` (floored at the 300s sandbox default, capped at 30 min, plus slack), without lengthening the 60s timeout every other tool relies on. ## 0.23.0 - **`fix(budget)` — the spend cap now reflects REAL on-chain cost, not a flat estimate.** Paid tools recorded a pre-call estimate (a flat `$0.001` for explicit-model chat, a per-second table price for video) into the budget ledger instead of the amount actually settled via x402 — so a frontier-model chat or a 1080p/4K video could settle for orders of magnitude more than was booked, silently blowing past the cap the tool advertises. `blockrun_chat` now books the `LLMClient.getSpending()` delta (the SDK's real settled USDC) on every paid path; the manual-x402 media tools (`video`/`music`/`speech`/`realface`) record the 402 `details.amount`; native Anthropic derives cost from token usage. The pre-call gate is now `max_tokens`-aware so a near-exhausted budget can't authorize one large frontier completion, and `BLOCKRUN_BUDGET_LIMIT` sets an optional default global cap at startup (the ledger is still in-memory and resets per process). `blockrun_image` no longer over-charges sizes ≤1024² (the large-size tier only applies when a dimension truly exceeds 1024). - **`fix(qr)` — a failed `sharp` install can no longer crash the whole server.** `sharp` was a top-level static import resolved before `main()`; on a fresh `npx` where the native binary fails to build (musl/Alpine, unusual arch, offline CI, partial optionalDeps) the entire module graph failed and *every* tool became unusable — for a cosmetic Solana payment-QR logo overlay. It now loads lazily and degrades to a (still scannable) logo-less QR when absent, and is declared an `optionalDependency`. - **`fix(tools)` — passthrough routing, billing, error reporting, and the key-leak scanner.** An empty/whitespace `body` string now resolves to `undefined` (not `{}`), so `markets`/`phone`/`surf` no longer flip GET-only reads to POST or bill Tier-2 for a spuriously-empty body (and `rpc`'s method/body split is fixed). Top-level array/primitive responses are wrapped as `{ result }` for valid MCP `structuredContent` across `markets`/`search`/`exa`/`surf`/`modal`/`phone`. `markets`/`price` now surface the structured gateway error body; `blockrun_models` catches catalogue-fetch failures instead of throwing uncaught. The startup key-leak scanner also detects Solana secret keys exported as a 64-byte JSON array. - **`chore` — require Node ≥ 20.19 and ship the skill catalogs.** `engines.node` now matches `@blockrun/llm` (≥20) and the documented `rpc-websockets`/`uuid` ESM constraint (Node 18 installed but crashed at runtime). The `skills/` directory now ships in the npm tarball so `npx` installs include the `SKILL.md` catalogs that tool descriptions point agents to. - **`docs` — corrected stale model names, counts, prices, and install commands** across the tool descriptions, README, AGENTS.md, CONTRIBUTING.md, CLAUDE.md, and the image-prompting skill (real reasoning models, `$0.40` video clips, `blockrun_realface` in the Base-only list, 18-tool / 8-skill counts, valid Codex install, delisted DALL-E 3 / Flux references removed). - **`test` — budget + body unit tests.** `test/budget.test.ts` proves the cap holds against real settled cost (with a regression guard showing the old flat-estimate path overshooting), and `test/body.test.ts` covers `coerceBody` (empty→undefined) and `asStructuredContent` array wrapping. ## 0.22.0 - **`feat` — tool profiles: `--profile media | trading | research | chat` (or `BLOCKRUN_MCP_PROFILE`) expose a trimmed tool set** so MCP clients load fewer schemas into context. One published package now serves focused installs — e.g. `npx @blockrun/mcp@latest --profile trading` registers 7 tools (`wallet price dex markets surf defi rpc`) instead of 18. `wallet` is in every profile, resources are gated to their tool, and an unknown name falls back to `full` (the historical 18-tool set, still the default when no flag is given). Thanks @KillerQueen-Z! (#20) - **`test` — profile-resolution test suite + compile-time `ALL_TOOLS` drift guard.** New `npm test` (`tsx --test`) covers `--profile`/env precedence, case-insensitivity, per-profile tool counts, wallet-in-every-profile, and unknown→full fallback. `ALL_TOOLS` is now `as const satisfies readonly ToolName[]` with an exhaustiveness type guard, so a newly added tool can't silently drop out of the `full` profile. - **`docs` — README links back to blockrun.ai/docs.** Thanks @VickyXAI! (#19) ## 0.21.5 - **`refactor` — internal cleanup, no behavior change.** Collapsed four byte-identical `fetchWithTimeout` copies (music, speech, video, realface) and the duplicated model-cache loader into shared `utils/http.ts` and `utils/model-cache.ts`. Both the abort timer and the model-cache TTL timer are now `.unref()`'d, so a pending request or expiring cache never keeps the stdio process alive. Added `isTimeoutError()` (checks the `AbortError`/`TimeoutError` DOMException name before falling back to message substrings) and used it for the music/speech/video timeout branches, replacing the previous inconsistent per-tool string matching. ## 0.21.4 - **`fix(wallet)` — pin `rpc-websockets@9.3.0` so the Solana wallet path loads on Node < 20.19 / < 22.** With the Solana deps now installed (0.21.3), a fresh install exposed a deeper transitive break: `@solana/web3.js@1.98.4` wants `rpc-websockets ^9.0.2`, which floats to `9.3.9` — and `9.3.9` bumped its `uuid` dependency to `^14.0.0`, which is **ESM-only**. `rpc-websockets` is CommonJS and does `require('uuid')`, so Node versions without `require(ESM)` support (e.g. 20.17) throw `ERR_REQUIRE_ESM` and `blockrun_wallet` crashes before returning. Declaring `rpc-websockets@9.3.0` (uuid `^8.3.2`, CJS) as a direct dependency pins the whole tree to one CJS-compatible copy that still satisfies `@solana`'s `^9.0.2` — npm `overrides` can't fix this because they're ignored when the package is installed as a dependency (the npx case). Verified: a clean tarball install resolves a single `rpc-websockets@9.3.0` with `uuid@8.3.2` and no ESM uuid anywhere in the tree. ## 0.21.3 - **`fix(wallet)` — declare `@solana/web3.js` + `@solana/spl-token` as direct deps so `blockrun_wallet` works on a fresh `npx` install.** Both are only `optionalDependencies` of `@blockrun/llm`, which npm installs *when they succeed* — so the wallet's Solana path (`ensureBothWallets` → `SolanaLLMClient.getBalance`) works in dev but a fresh `npx -y @blockrun/mcp@latest` that omits/fails optional deps shipped without them, throwing `missing dependency (@solana/web3.js)` on the default `status` action. Re-declared both at the ranges `@blockrun/llm` pins (`^1.98.4`, `^0.4.14`) so they install on every npx and dedupe to one copy — same pattern used for `@anthropic-ai/sdk` in 0.18.0. ## 0.21.2 - **`fix` — `--version`/`-v` and `--help`/`-h` CLI flags exit cleanly.** Metadata flags are now handled before the stdio transport connects, so version/help inspection no longer boots the full MCP server. Thanks @xianzuyang9-blip! (#16) - **`fix(chat)` — stop recommending dead `nvidia/deepseek-v3.2` in the `blockrun_chat` description.** The 0.21.1 sweep rebuilt `MODEL_TIERS` but missed the tool description's direct-pick example, which still pointed at one of the NIM-hung models. Replaced with `nvidia/deepseek-v4-flash` (free, healthy, 1M context). ## 0.21.1 - **`fix(models)` — drop dead free models from `MODEL_TIERS`.** 2026-06-07 sweep: `free[]` led with `nvidia/qwen3-next-80b-a3b-thinking` (NVIDIA EOL, 410) and `nvidia/mistral-small-4-119b` (timing out), and included `nvidia/deepseek-v3.2` + `nvidia/glm-4.7` (NIM hung). Rebuilt `free[]` to the models actually serving themselves (`llama-4-maverick`, `qwen3-coder-480b`, `deepseek-v4-flash`, `gpt-oss-120b/20b`); `cheap[]` swapped `deepseek-v3.2` → `deepseek-v4-flash`; `glm[]` dropped the hung `nvidia/glm-4.7`. ## 0.21.0 - **`feat(defi)` — new `blockrun_defi` tool: DeFi fundamentals via DefiLlama.** Path-based GET passthrough to `/v1/defillama/*`: `protocols`, `protocol/{slug}`, `chains` (TVL), `yields` (APY pools) at $0.005/call and `prices/{coins}` at $0.001/call. Live-tested (ETH price round-trip). - **`feat(realface)` — Virtual Portrait support.** New `action:"portrait"` enrolls an AI-generated character from an `image_url` in one step ($0.01, Base only, NO phone liveness — for fictional/AI characters; real people still go through the init→status→enroll liveness flow). `action:"list"` now returns both RealFace and Virtual Portrait assets. Live-tested end-to-end (generate → enroll → asset id usable with Seedance `real_face_asset_id`). ## 0.20.0 - **`feat(rpc)` — new `blockrun_rpc` tool: raw JSON-RPC on 40+ chains.** Path-based passthrough to the gateway's new Tatum-backed `/v1/rpc/{network}` endpoint (Ethereum, Base, Solana, Bitcoin, Sui, NEAR, XRP, Polkadot, Monad, Berachain, HyperEVM, and 30+ more). $0.002 per call; a JSON-RPC batch charges per element. Accepts `method`+`params` shorthand or a full JSON-RPC `body` (incl. batch arrays). Unknown-but-wellformed network slugs pass through, so new chains work without an MCP release. Full network catalog + per-chain recipes in the new `rpc` skill. - **`fix(image)` — sync `blockrun_image` with the live catalog.** Removed delisted `openai/dall-e-3` (was the broken *default*) and `together/flux-schnell`; added `google/nano-banana-pro` ($0.10, up to 4K). Default model is now `openai/gpt-image-2` for both generate and edit. Corrected base prices (gpt-image-1 $0.02, gpt-image-2 $0.06 at 1024²; larger sizes billed higher) and made budget estimates size-aware. Edit (img2img) now also supports `google/nano-banana` and `google/nano-banana-pro`, matching the gateway's image2image roster. `size` is free-form (e.g. 1536x1024 for gpt-image-*, 4096x4096 for nano-banana-pro) instead of the stale DALL-E 1792px enum. ## 0.19.2 - **`docs` — retire the hosted `mcp.blockrun.ai` install.** The hosted HTTP server (a stale v0.2.x deployment with only 8 of 16 tools and the deprecated `X-Wallet-Key` hosted-auth flow) has been decommissioned. The npx stdio install is the only supported path: `claude mcp add blockrun -s user -- npx -y @blockrun/mcp@latest`. README on npm refreshed accordingly. No code changes. ## 0.18.0 - **`feat(chat)` — native Anthropic passthrough for `claude-*`: real `thinking` blocks + verbatim signatures.** An explicit `anthropic/claude-*` model now bypasses the OpenAI-compat `/v1/chat/completions` path and goes DIRECT to the gateway's native `/v1/messages` endpoint (via `@blockrun/llm`'s `AnthropicClient`), which forwards to `api.anthropic.com` verbatim — zero model substitution, no cost routing, no fallback. The OpenAI-compat path could not carry thought signatures (they're lost in conversion) and flattened thinking to a string; the native path returns the real Anthropic response untouched. - New `thinking` param (`{ type: "enabled", budget_tokens }`) — honored on the native `claude-*` path; `max_tokens` is auto-raised above `budget_tokens` when needed. Ignored for non-Claude models (no native thinking channel). - The tool result's `structuredContent` carries the verbatim native response: `native` (full Anthropic `Message`), `thinking_blocks` (with their original `signature`), `signature_present`, `requested_model` + the real upstream `model` echo (proof of no substitution), `stop_reason`, and `usage`. Nothing is fabricated. - **Multimodal image input** — `messages[].content` now accepts an array of `{ type: "text" }` / `{ type: "image_url" }` parts. Images (https URLs or `data:` base64 URIs) are converted to native Anthropic image blocks on the `claude-*` path, and forwarded verbatim for vision-capable models on the OpenAI path. - **`chore(deps)` — add `@anthropic-ai/sdk` `^0.39.0`** as a direct dependency (previously only a transitive optional dep of `@blockrun/llm`), so the native passthrough path is always available to MCP consumers. ## 0.17.0 - **`feat(chat)` — `response_format` (JSON mode) and `stop` sequences on `blockrun_chat`.** The gateway now honors both OpenAI params on `/v1/chat/completions` — natively for OpenAI/Azure, and emulated for Anthropic/Bedrock (raw-JSON system instruction + code-fence strip for `response_format: "json_object"`; `stop` mapped to `stop_sequences`). Threaded through every routing path (smart, multi-turn, single-model, mode tiers). - **`chore(deps)` — upgrade `@blockrun/llm` to `^2.11.0`** (from `^1.12.0`), which exposes the new `responseFormat` / `stop` options. Per the 2.x upgrade path, the dropped `"free"` routing profile is now coerced to default ClawRouter routing (the gateway already picks the most cost-effective model). ## 0.16.2 - **`feat(models)` — add `anthropic/claude-opus-4.8` to routing.** Anthropic's most capable Claude for complex reasoning and agentic coding ($5 in / $25 out, 1M context, 128k output, adaptive thinking, vision). Now leads the `powerful`, `reasoning`, and `coding` tiers in `MODEL_TIERS` so those modes route to it first, and it heads the Anthropic flagship roster in the catalog comment. The live `blockrun_models` catalog already serves it; this aligns the local routing hints. ## 0.16.1 - **`feat(models)` — add `google/gemini-3.5-flash` to routing.** Google's latest-generation Flash (built-in thinking mode, frontier-class quality at Flash speed; $0.5 in / $3 out, 1M context, vision + reasoning + coding). Now leads the `fast` tier in `MODEL_TIERS` so `mode:"fast"` routes to it first, and it's added to the Google model roster in the catalog comment. The live `blockrun_models` catalog already serves it; this aligns the local routing hints. ## 0.15.1 - **`docs(changelog)`** — clarify that the image-to-video price-tier correction applies to all image-input calls (seed `image_url` or `real_face_asset_id`), not just RealFace. No code change vs. 0.15.0; version bumped so the published package tracks the doc. ## 0.15.0 - **`feat(realface)` — new `blockrun_realface` tool + Seedance RealFace video.** BlockRun upgraded Seedance with BytePlus RealFace: enroll a real person once (liveness-verified) and generate video of *that specific person*, not a generic seed image. The MCP now exposes the full flow end-to-end: - `blockrun_realface action:"init"` (free) — creates an asset group and a phone H5 link; the link is rendered as a QR code and opened so the real person can scan it and complete the ~1 min liveness check (nod + blink). Pass `group_id` to refresh an expired link. - `blockrun_realface action:"status" group_id:…` (free) — polls until `ready_to_finalize:true`. - `blockrun_realface action:"enroll" name:… group_id:… image_url:…` (**$0.01 USDC, Base only**) — uploads the face photo, waits for the BytePlus face-match, returns the `ta_xxxx` asset id. Full x402 sign/verify/settle; settles only after the asset is active (group-not-active → 425, face-match-fail → 422, neither charges). - `blockrun_realface action:"list"` (free) — lists the wallet's enrolled `ta_xxxx` assets. - **`feat(video)` — `blockrun_video` accepts `real_face_asset_id`.** Pass a `ta_xxxx` asset (Seedance 2.0 / 2.0-fast only) to drive real-person video. Mutually exclusive with `image_url`; client-side guardrails fail fast on model/conflict mismatches. - **`fix(video)` — image-to-video now uses the correct (cheaper) price tier in the budget pre-check.** Any image-input call — seed `image_url` *or* `real_face_asset_id` — on Seedance 2.0 / 2.0-fast is now estimated at the image-to-video rate (`2.0-fast` $0.140/sec · `2.0` $0.183/sec) instead of the text-to-video rate (0.238 / 0.298). This matches the per-second rates already documented in the tool description and the upstream pricebook; previously image-to-video calls were over-estimated ~1.6×, making the pre-call budget gate stricter than reality. Affects only the client-side estimate — actual charges are set by upstream settlement. xAI and Seedance 1.5-pro image calls are unchanged. - Privacy: BlockRun stores only the asset id, name, and the photo URL you supply — no face/liveness data. ## 0.14.5 - **`fix(video)` — Seedance prices realigned to upstream 720p + audio defaults.** The gateway's `/v1/videos/generations` route now defaults Seedance calls to `resolution: 720p` with `generate_audio: true` for t2v (commit `e6dc1f1` on the main app), which roughly doubles tokens/sec vs. the historical 480p baseline. MCP's per-second display rates and budget pre-check were still calibrated to the old 480p figures, so the pre-call budget gate was under-estimating Seedance cost by ~2× — a near-empty budget could overshoot. Rates and tool description bumped to match upstream's canonical pricebook: - `bytedance/seedance-1.5-pro`: $0.046/sec → **$0.092/sec** (720p + audio t2v) - `bytedance/seedance-2.0-fast`: $0.119/sec → **$0.238/sec** text · **$0.140/sec** image-to-video - `bytedance/seedance-2.0`: $0.149/sec → **$0.298/sec** text · **$0.183/sec** image-to-video - 2.0-fast / 2.0 Pro tool description now flags BytePlus RealFace asset support (see `/docs/video/real-person-ip` on the main app). - README $5-capacity headline updated: was "~20 Seedance 1.5-pro clips" (480p), now "~10 clips" (720p+audio). ## 0.14.4 - **`fix(search)` — pricing was wrong by ~3×.** Old `estimateSearchCost` multiplied `$0.025 × sources.length` so `sources: ["web","x","news"]` budgeted $0.075 — but upstream actually charges per *returned result*, not per source category. Now `$0.025 × max_results` (default 10 → $0.25, cap 50 → $1.25). Skill + tool description + README aligned. - Also rename body fields to match upstream snake_case: `maxResults`→`max_results`, `fromDate`→`from_date`, `toDate`→`to_date`. Tool/skill examples updated. - **`fix(video)` — Seedance prices calibrated to upstream token billing.** Seedance is token-priced (token360) on the gateway, not flat per-second. Display rates updated: - `bytedance/seedance-1.5-pro`: $0.03/sec → **$0.046/sec** (was undercharging) - `bytedance/seedance-2.0-fast`: $0.15/sec → **$0.119/sec** (was overcharging) - `bytedance/seedance-2.0`: $0.30/sec → **$0.149/sec** (was overcharging 2×) - README $5 capacity now correctly reads "~20 Seedance 1.5-pro clips" (was 30). ## 0.14.3 - **`feat(budget)` — pre-call budget gates on every paid tool.** Previously only `blockrun_chat` ran a budget check, and it recorded post-hoc, so a near-exhausted budget could be overshot by the last expensive call. Now image / music / video / search / exa / markets / price / modal / phone / surf all expose `agent_id` and pre-check the estimated cost against the global + per-agent limit before settling. - Per-tool cost estimates: image per-model, music flat $0.1575, video per-second × billed-duration, price per stocks tier, phone per-endpoint, exa per-URL for `contents`, markets/surf per-path tier - `checkBudget(budget, agent_id, estimatedCost)` compares `spent + cost` against `limit` with EPSILON-safe float math - **`feat(wallet)` — chain-aware fail-fast for Base-only tools.** `blockrun_image`, `blockrun_music`, `blockrun_video`, and paid `blockrun_price` calls return a clear "Switch to Base" error before attempting to create or charge a Base wallet under Solana mode. - Free `blockrun_price` calls (crypto/FX/commodity/list) no longer require a wallet — new cached `_freePriceClient` uses `requireWallet: false` - `blockrun_wallet` action `budget`/`delegate`/`revoke`/`report` no longer reads or creates a wallet, so per-agent budget setup works before funding - **`fix(tools)` — assorted correctness fixes.** - `blockrun_models` switches to `listAllModels` when available so image models appear in `category:"image"`; filter uses `type === "image"` instead of fragile substring match (`dall-e`/`flux`/`banana`) - `blockrun_image` default model no longer renders as `undefined`; edit mode restricted to `openai/gpt-image-1|2` (other models fail upstream) - `blockrun_price` `from: 0` no longer misjudged as missing (`!from` → `from === undefined`); validates `market` required when `category="stocks"`; zod `limit` tightened to int positive max 2000 - `blockrun_chat` mode-routing path now passes `temperature` (was dropped) - `blockrun_markets` `body ? pmQuery : pm` → `body !== undefined` so falsy bodies don't silently downgrade to GET (matches `blockrun_surf`) - **`fix(budget)` — tighter cost estimates for chat smart routing + surf wallet/* endpoints.** - `blockrun_chat routing:"smart"` now estimates by `routing_profile`: free=$0 / eco=$0.002 / auto=$0.01 / premium=$0.05 (was flat $0.001). Stops a single premium-profile call from overshooting a near-empty budget by 50×. `mode:"reasoning"`/`mode:"powerful"` also escalate to $0.01. - `blockrun_surf` cost estimator rewritten from `includes()` heuristic to a Set + prefix lookup keyed off the marketplace catalog. Catches all `wallet/*` T2 endpoints (5 paths were undercharged 5×), `exchange/depth|klines|funding-history|long-short-ratio`, `market/liquidation/*`, `market/onchain-indicator|price-indicator`, `prediction-market/polymarket/positions|activity`, `social/detail|ranking|smart-followers/history`, `token/dex-trades|holders|transfers`, `web/fetch`. Also catches `onchain/schema` as T3 (was undercharged 20×). - **`docs(readme)` — env-vars section reflects 0.14.1's `.chain` precedence** and adds explicit "Base-only" note for media tools + paid stock price calls. ## 0.14.1 - **fix(wallet): respect `~/.blockrun/.chain` over stale Solana session.** Previously, the mere existence of `~/.blockrun/.solana-session` pinned the MCP to Solana — even when the user had explicitly switched chains by writing `base` to `~/.blockrun/.chain`. Voice calls and other paid actions would 400 on a wallet/chain mismatch with no obvious recovery short of deleting session files. New precedence in `getChain()`: explicit `.chain` (or `payment-chain` alias) wins, then `SOLANA_WALLET_KEY` env var, then `.solana-session` autodetect as a first-run fallback only. ## 0.14.2 - **BREAKING — `blockrun_x` removed.** AttentionVC partner integration retired. Callers depending on this tool will get tool-not-found and should switch to `blockrun_surf` (`social/user`, `social/tweets`, `social/tweet/replies`, `social/mindshare`) or `blockrun_search` with `sources: ["x"]`. - **BREAKING — `blockrun_phone`, `blockrun_exa`, `blockrun_modal`, `blockrun_search` switched to path-based passthrough** matching the `blockrun_surf` / `blockrun_markets` pattern. Old shape `{ action, ... }` no longer accepted; new shape is `{ path, body }`. - Reduces tool description bytes ~14 KB (down from ~21 KB), letting LLMs spend more attention on the actual call - Full endpoint catalogs moved into per-tool skills (`skills/phone/SKILL.md`, `skills/modal/SKILL.md`, `skills/search/SKILL.md`, updated `skills/exa-research/SKILL.md`) - Adding new endpoints to any of these surfaces no longer requires an MCP release - **`blockrun_phone` voice/call: `from` is now correctly documented as REQUIRED.** Upstream has always required it (must be a number your wallet owns from `phone/numbers/buy`) but the prior tool description marked it optional, causing silent 400s. - **Error surfacing fix.** Gateway 400/422/5xx responses now include the upstream `message`, `hint`, and `missing_params` fields in the error text. Previously the SDK's `APIError` body was swallowed, leaving only bare `API error: 400` with no actionable detail. New helper `extractErrorMessage()` in `src/utils/errors.ts` walks `err.response` and surfaces structured fields. - dist/index.js: 85.48 KB → 75.60 KB (-11.5%). ## 0.14.0 - **`blockrun_surf` — unified crypto data via Surf (asksurf.ai), 84 endpoints behind one tool.** Path-based passthrough mirrors `blockrun_markets`; adding new Surf endpoints no longer requires an MCP release. - CEX market data (16 exchanges), on-chain SQL (13 chains, 80+ ClickHouse tables), 100M+ labeled wallets, Polymarket + Kalshi side-by-side, social mindshare / CT intel, news, unified search, Surf-1.5 chat with citations - Tier 1 $0.001 / Tier 2 $0.005 / Tier 3 $0.02 — settles directly to Surf's Base treasury, no Surf account required from the caller - Tool description ≤ 20 lines; full 84-endpoint catalog moved to the new `surf` skill - **`surf` skill.** Quick Decision Table covering ~50 most-reached endpoints, 7 worked examples (price reads, ClickHouse SQL, wallet-labels triage, PM comparison, Surf-1.5 chat with citations, social mindshare, macro stack), method-routing rule (`body` ⇒ POST, else GET), full catalog organized by category. 26 triggers cover the long tail (`on-chain sql`, `wallet labels`, `mindshare`, `etf flows`, `tokenomics unlock`, ...) so the skill fires without users naming "Surf" explicitly. - **Marketplace claim → reality.** `/marketplace/surf` page (line 338) previously advertised `blockrun_surf`; the tool did not exist. Now it does. ## 0.13.0 - **`blockrun_markets` — Predexon v2 endpoints surfaced.** All v2 endpoints went live in production on 2026-05-07. The path-based passthrough was already routing correctly, but agents couldn't discover the new routes from the stale description. - Canonical Cross-Venue (T1): `markets`, `markets/listings`, `outcomes/:predexon_id` — unified data layer with cross-venue IDs across Polymarket, Kalshi, Limitless, Opinion, Predict.Fun. Filters: `?venue=`, `?status=`, `?category=`, `?league=`, `?event_id=`, `?pagination_key=` - Sports (T1): `sports/categories`, `sports/markets`, `sports/markets/:game_id`, `sports/outcomes/:predexon_id` — markets grouped by game with venue listings - Keyset pagination: `polymarket/markets/keyset` and `polymarket/events/keyset` — cursor-based traversal via `?pagination_key=` - Wallet Identity & Clustering (T2): correct routes for `polymarket/wallet/identity/:wallet` (GET), `polymarket/wallet/identities` (POST, bulk up to 200 — replaces retired `identities-batch`), `polymarket/wallet/:address/cluster` (GET) — fixes 3 previously-listed wrong paths - **`prediction-markets` skill rewrite.** Added 4 sections for v2: Canonical Cross-Venue, Sports, Keyset Pagination, Wallet Identity & On-Chain Clustering (T2). Quick Decision Table now leads with the canonical cross-venue endpoints. New worked example: tracking a smart wallet's identity + cluster. ## 0.11.0 - **`blockrun_video` switches to async submit+poll**. The blockrun.ai video endpoint moved from sync to async on 2026-04-23. The tool now submits the job, then polls `/v1/videos/generations/{id}` with the same signed header every 5s until upstream returns `completed` (5min total budget). Tool input and output shapes are unchanged. Settlement only fires on the first completed poll, so upstream failure or budget exhaustion = zero charge. - Bumped advertised `maxTimeoutSeconds` on video requests to 600s so the signed authorization stays valid across the polling window. ## 0.10.0 - **`blockrun_image` gains `openai/gpt-image-2`** (ChatGPT Images 2.0). Reasoning-driven generation with multilingual text rendering and character consistency. Added to the model `z.enum` so agents can pick it; edit-path default switched from `gpt-image-1` → `gpt-image-2` (gpt-image-1 still accepted). Description paragraph lists the new model at $0.06-0.12. - **`blockrun_video` gains 3 ByteDance Seedance variants**: - `bytedance/seedance-1.5-pro` — $0.03/sec, 5s default (up to 10s), cheapest path. - `bytedance/seedance-2.0-fast` — $0.15/sec, ~60-80s gen, sweet-spot price/quality. - `bytedance/seedance-2.0` — $0.30/sec, 720p Pro quality. Added to the model `z.enum`; `duration_seconds` description now covers 5s Seedance default + 10s ceiling. Timeout error message de-xAI-ified. - **Dep bump**: `@blockrun/llm` `^1.8.0` → `^1.9.0` to match the types widened for the new image edit models. ## 0.9.2 - **`MODEL_TIERS` now matches the post-refresh NVIDIA free tier.** The 0.9.1 note claimed "no code change was required" — that was wrong for `blockrun_chat` with `mode: "free"` or `mode: "coding"`, which picks the primary model from the hardcoded tier list rather than the live catalogue. The stale list still put retired models at positions 2–3 (`nvidia/nemotron-ultra-253b`, `nvidia/nemotron-super-49b`) and kept `nvidia/devstral-2-123b` in `coding`. The backend redirected, so requests didn't fail, but the two new fast models (`nvidia/qwen3-next-80b-a3b-thinking`, `nvidia/mistral-small-4-119b`) were never primary picks. - `mode: "free"` now leads with `nvidia/qwen3-next-80b-a3b-thinking` → `nvidia/mistral-small-4-119b`, then the 6 other visible free models. - `mode: "coding"` drops the retired `nvidia/devstral-2-123b`. - Provider-summary comment block refreshed: Anthropic section lists the current flagships (opus-4.7 / opus-4.6 / sonnet-4.6 / haiku-4.5), NVIDIA section describes the 8 visible models + which retired IDs the backend still aliases. ## 0.9.1 - **Install command:** `claude mcp add blockrun -s user -- npx -y @blockrun/mcp@latest` (the `-s user` scope fixes a per-project install pitfall the previous command caused). - NVIDIA free-tier refresh on the backend (2026-04-21): retired `nvidia/nemotron-*`, `nvidia/mistral-large-3-675b`, `nvidia/devstral-2-123b`, `nvidia/qwen3.5-397b-a17b`, and paid `nvidia/kimi-k2.5`. Two new models callable via `blockrun_chat`: `nvidia/qwen3-next-80b-a3b-thinking` (free reasoning flagship) and `nvidia/mistral-small-4-119b` (fastest free chat). `blockrun_models` returns the current catalogue live, so no code change was required. ## 0.9.0 - **New `blockrun_price` tool** — Pyth-backed realtime quotes and OHLC history across crypto, FX, commodities and 12 global stock markets (us/hk/jp/kr/gb/de/fr/nl/ie/lu/cn/ca). Crypto / FX / commodity are fully free; stocks charge $0.001 per call. Actions: `price`, `history`, `list`. - **New `blockrun_x` tool** — structured X/Twitter access via the AttentionVC `/v1/x/*` endpoint family. Replaces the earlier Grok-chat prototype with 11 actions: `user_lookup`, `user_info`, `followers`, `followings`, `verified_followers`, `user_tweets`, `user_mentions`, `tweet_lookup`, `tweet_replies`, `tweet_thread`, `search`. - Upgrade `@blockrun/llm` to `^1.8.0` for `PriceClient` + extended type metadata. ## 0.8.0 - **New `blockrun_video` tool** — generate short AI videos via `xai/grok-imagine-video` ($0.05/sec, 8s default). Text or image-to-video. Blocks until the clip is ready (~30-120s). - `blockrun_image` now supports `xai/grok-imagine-image` ($0.02) and `xai/grok-imagine-image-pro` ($0.07). - Tool responses surface the gateway-hosted permanent URL; source URLs and `backed_up` flag included when the asset was mirrored. ## 0.6.8 - Latest stable release - Real-time data tools: markets, research, X/Twitter, crypto - x402 micropayments via USDC - MCP protocol compatible with Claude Code