Skip to content

v0.34.0

Choose a tag to compare

@github-actions github-actions released this 10 Nov 13:16
· 29 commits to master since this release
v0.34.0
f193d9e

Breaking API changes

  • ctx.fail(reason, { callerFault: true }) is a new option on SDKJobContext.fail. On the x402 route, POST /v1/x402/<capability>, a failure marked this way answers 422 instead of 500, with the same body (status: "failed", reason, display, hint, charge_outcome: "not_charged") and no PAYMENT-RESPONSE. It is 422, not 400, because the x402 v2 HTTP transport reserves 400 for an invalid payment payload. The mark is stored on the job's final cancel message as caller_fault: true (CancelContent gains that optional field). Without the mark nothing changes. The change is additive, and it is flagged breaking only because an existing x402 caller can now see a 4xx where it saw a 5xx when a handler opts in.
  • { refund: true } on ctx.fail was documented as a caller-fault annotation, but the server never read it. The documentation now says it has no effect.
  • Additive export: @dvmkit/sdk/internal exports DIAGNOSTIC_CATALOGUE and its type DiagnosticCatalogue, the deep-frozen list-valued catalogue that span projection admits. Code-defined rules are not included.
  • Span projection now keeps http.route as /v1/x402/:capability for x402 requests, which it previously dropped.

Migrations

None. A handler that does not pass callerFault behaves as before.

Compatibility requirements

Node >=22, unchanged. No new dependency floors.

dvmctl and platform prerequisites

None. A platform that keeps its own copy of the diagnostic catalogue should compare it with DIAGNOSTIC_CATALOGUE to pick up the x402 route template.


What's Changed

  • chore(api): advance the comparison baseline to v0.33.0 by @aioli3 in #144
  • feat(observability): export the diagnostic catalogue and keep span routes, events, and codes it should admit by @aioli3 in #143
  • feat(server)!: answer 422 on the x402 route when a handler marks a failure as the caller's by @aioli3 in #146
  • chore(master): release 0.34.0 by @dvmkit-release-automation[bot] in #145

Full Changelog: v0.33.0...v0.34.0