All notable changes to the ankusa_sdk Hex package are documented here. Format
follows Keep a Changelog; this project
follows Semantic Versioning.
Unreleased
0.6.0 - 2026-10-28
Added
Ankusa.SDK.Messagecarriestraceparentandtracestate: the hook's W3C trace context from the message, verbatim (nilwhen none); a non-string value isinvalid_field.Ankusa.SDK.ClaimRef.parse/1andAnkusa.SDK.ClaimCheck.redeem/3accept signed, expiring v2 refs (urn:ankusa:claim:v2:<tenant>:<claim_id>:<exp_unix>:<signature>): the parsedpathcarries?exp=&sig=andredeem/3requests it as is. The gateway's400 bad_signatureand410 ref_expiredare anAnkusa.SDK.ClaimRejectedError. The SDK never checks the signature or the expiry.Ankusa.SDK.Webhook.receive_delivery/3, the receiver-side decision on one HTTP-sink delivery (signature, then headers) without Plug. Options:secrets,:allow_unsigned,:tolerance_seconds,:now.verificationon parsed headers, decoded messages and received deliveries: how Ankusa verified the hook at ingest ({status, flagged},nullfrom a node older than the field).scopeonAdminRejectedErrorandRoutesRejectedError: the scope a403 forbiddensays the credential lacks (control planes require a credential since Ankusa 0.6).Ankusa.SDK.Admin.list_audit/2:GET /v1/audit, the audit trail (newest first, paged bycursor/limit, filtered bysince,until,actor,action,tenant).Delivery metadata (CON-4).
Webhook.Headers.received_at(when the edge accepted the hook, unix milliseconds, fromx-ankusa-received-at) andWebhook.Headers.body_sha256(the lowercase hex SHA-256 of the body sent, fromx-ankusa-body-sha256):nilwhen the header is absent, empty or malformed, never an error.Receivernow setsHook.received_atfrom the header (it was alwaysnilover HTTP).Wire-format evolution path (CON-2).
Ankusa.SDK.Message.decode/1accepts everyvfromMessage.min_supported_version/0toMessage.max_supported_version/0(1 and 2) into the oneMessage, withvas the wire said it: av: 2message is av: 1message plus additive fields, so the keys it does not know are ignored.Message.instanceandMessage.region: the name of the Ankusa instance that published the message and the region it is configured with (nilwhen null or absent).Ankusa.SDK.LifecycleEvent.decode/1decodes the CloudEvents lifecycle events of the instance's lifecycle sinks.Ankusa.SDK.Hook.trusted?/1:trueonly when the node verified the hook at ingest (status: "ok") and did not flag it (flagged: false). Works on aHook, a decodedMessageor the parsedWebhook.Headers; a flagged,failedorskippedhook and one with noverificationare untrusted.
Changed
- Breaking (SEC-10):
Ankusa.SDK.Receiveris signed by default. The sink signs every delivery unless configuredallow_unsigned: true, so the plug now needs the sink's:secretand raises atinit/1without one; passallow_unsigned: trueto accept unsigned deliveries (a configured:secretis never weakened by it). The signature is judged beforex-ankusa-id: a request with neither is401, not400.
Fixed
Ankusa.SDK.Receivernow setsverificationon theHookit hands to the handler (it was alwaysnilover HTTP, so a hook accepted after a failed signature looked the same as a verified one).
0.5.0 - 2026-10-14
Added
Ankusa.SDK.Signature.verify/4verifies the Standard Webhooks signature an HTTP sink with asecretadds, comparing with:crypto.hash_equals/2; failures areAnkusa.SDK.InvalidSignatureError(code,field, never retryable).Ankusa.SDK.Receivertakes:secret(one or a list) and:tolerance_seconds, and answers401{"error":"invalid_signature","code":...}to a delivery that doesn't verify.Ankusa.SDK.Message.decode/1now carriesdedupe_key,replay_id,idempotency_keyandheaders, verifies an inline body's length and sha256, checks a claim's tenant againsttenant_id, and rejects a claim that isn't a well-formed ref.Ankusa.SDK.InvalidMessageErrorgainscodeandfield.Ankusa.SDK.Idempotency.key/2: the idempotency key for a message, parsed webhook headers, or a hook. It returns the key Ankusa shipped (the message'sidempotency_key, thex-ankusa-idempotency-keyheader) and, for a message or delivery that predates it, computestenant:source_id:dedupe_key(tenantdefaultwhen there is none) when a provider event key is present, else the hook id;include_replay: trueappends the replay id.Ankusa.SDK.Hookcarriesdedupe_key,replay_id,idempotency_keyandheaders;Ankusa.SDK.Webhook.Headersparsesx-ankusa-dedupe-key,x-ankusa-replay-idandx-ankusa-idempotency-keyand keeps every request header.Ankusa.SDK.Admin.create_replay/2,get_replay/2,list_replays/1andupdate_replay/3for the replay-job API (POST/GET/PATCH /v1/replays; kindsdlq,archive,quarantine).
Changed
Ankusa.SDK.ClaimCheck.redeem/3returnsClaimCheckUnavailableError(retryable) for a gateway408or429instead ofClaimRejectedError.
Removed
- The admin client's
replay_dead_lettersfunction;POST /v1/dlq/replayis gone in favour of replay jobs.
0.3.0 - 2026-10-01
Added
Ankusa.SDK.Receiver, aPlugforAnkusa.Sink.Httpdeliveries: it reads the raw body, parses thex-ankusa-*headers, calls the configuredAnkusa.SDK.Handler, and answers202/503/400/413the way the dispatcher's retry expects. Options::handler,:path,:max_body_bytes.Ankusa.SDK.Hook, the one value a handler sees whichever transport delivered it, andAnkusa.SDK.Handler, the behaviour it implements.Ankusa.SDK.Webhook.parse_headers/1for receivers built on something other than the Plug, plusAnkusa.SDK.MissingHookIdErrorwhenx-ankusa-idis absent or empty.Ankusa.SDK.Message, theAnkusa.Sink.Messagewire format shared by the queue sinks:decode/1with an exact reason for every malformed message, andto_hook/2, which redeems the claim check when the payload rode one.Ankusa.SDK.InvalidMessageErrorclassifies undecodable bytes.Ankusa.SDK.ClaimCheck(redeem/3,health/1) with the end-to-end sha256 check the gateway does not run, andAnkusa.SDK.ClaimRef.parse/1on its own. The error hierarchy carriesretryableso a consumer needs one bit to pick dead-letter or retry:InvalidClaimRefError,ClaimNotFoundError,ClaimRejectedError,ClaimIntegrityError,ClaimCheckUnavailableError.Ankusa.SDK.Routes:health,list_routes,create_route,get_route,replace_route,update_route,delete_route,get_ip_rules,put_ip_rules,test_route, withInvalidRouteIdError,RouteNotFoundError,RoutesRejectedError,RoutesUnavailableError.Ankusa.SDK.Admin:health,metrics,config,list_dead_letters,replay_dead_letters,list_quarantined, withRoleNotEnabledError,AdminRejectedError,AdminUnavailableError.Ankusa.SDK.Sources:verify_version,server_version,list_sources,get_source,create_source,update_source,delete_source, plusAnkusa.SDK.Sources.Spec(the writable spec) andAnkusa.SDK.Sources.Source(a stored, redacted source).- Every client takes
:headers,:timeout_ms(default 10 s) and:req_options(:finch,:connect_options,:pool_timeout,:plug). One request per call, no retries, and a redirect is never followed: a3xxis an*UnavailableError. With a:finchpool,timeout_msbounds the response only, since the pool owns its connect options. - The language-neutral conformance runner
(
test/conformance_test.exs), passing every vector inconformance/cases.