What's changed
Breaking. A paid tool whose settlement fails now returns 502 without the output, instead of 200 with the result. createToolHandler gains settlement, defaulting to "required". Set settlement: "best-effort" to restore the previous behavior, which only suits callers who reconcile failed settlements out of band. This is a minor version because the package is pre-1.0, not because the change is small.
Also in this release:
replayGuardon the hosted x402 gates andpaidPredicateGate, an optional single-use claim over each authorization's(payer, nonce)pair. Off by default, since it needs storage shared across instances.RPC_URLis resolved as a universal RPC fallback for all wallet providers.- Hostnames are resolved and re-checked against private ranges before anything is fetched, in
probe-endpointand ininspect. The previous guard only inspected the hostname string, so a public name whose A record points inward was fetched.inspectmatters most here because itsmetadataURIcomes from a permissionlessly writable registry. A DNS-rebinding window remains and needs a connect-time-pinned dial. deployrunsvercel linkandvercel env addby argv rather than building a shell string. It interpolated the working directory'spackage.jsonname, variable names parsed from.env.local.example, andvercel whoamioutput into a string passed toexecSync.- The usage reporters refuse a plaintext aggregator URL consistently. Only one of the three checked, while all three send an
x-api-keyand one forwards a signed authorization.
Community contributions
- Shell interpolation in
deploy, thanks @ygd58 for the fix (#18) and @bilguunbicktivism for the report (#14), which identified all three call sites and recommended the argv approach used here. - Lexical-only private address guard, thanks @ygd58 for the fix (#19) and @bilguunbicktivism for the report (#13), which demonstrated the bypass through
inspect.
Full changelog: ProjectOpenSea/opensea-devtools@tool-sdk-v0.28.5...tool-sdk-v0.29.0