Repository navigation
v0.34.0
Breaking API changes
ctx.fail(reason, { callerFault: true })is a new option onSDKJobContext.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 noPAYMENT-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 finalcancelmessage ascaller_fault: true(CancelContentgains 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 }onctx.failwas documented as a caller-fault annotation, but the server never read it. The documentation now says it has no effect.- Additive export:
@dvmkit/sdk/internalexportsDIAGNOSTIC_CATALOGUEand its typeDiagnosticCatalogue, the deep-frozen list-valued catalogue that span projection admits. Code-defined rules are not included. - Span projection now keeps
http.routeas/v1/x402/:capabilityfor 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