Skip to content

v1.2.0

Latest

Choose a tag to compare

@arcjet-rei arcjet-rei released this 07 Oct 15:37
· 4 commits to main since this release
Immutable release. Only release title and notes can be modified.
2596c95

Note

Guard and Protect now return server decisions that earlier versions could not decode. When the server sent a value this SDK did not recognise, such as a newly added reason, the SDK replaced the whole decision: a Guard DENY became a fail-open ALLOW, and a Protect DENY became ERROR. The same happened when a Guard call's Actor, CorrelationID or server policy input value was not valid UTF-8. These calls now get the server's own decision, so a call that used to be allowed can now be denied. An unrecognised Guard reason reads as UNKNOWN, and invalid UTF-8 is decoded as Latin-1. A policy input name that is not valid UTF-8 is now reported as a misconfiguration (ErrInvalidPolicyInput), and GuardAction does not run the action.

GuardClient.Guard now stops waiting after 2 seconds when your context has no deadline, as GuardAction already did. It fails open as before: an ALLOW with HasFailedOpen() true, together with a deadline_exceeded error. If your context has its own deadline, nothing changes.

Guard labels can now use uppercase ASCII letters, so getWeather.invoked is a valid label.

What's changed

  • Guard and Protect keep server decisions with values this SDK does not recognise, and Guard decodes strings that are not valid UTF-8 as Latin-1 (#91)
  • Remote-policy prompt injection results carry Billing (#92)
  • A metadata value whose MarshalJSON or MarshalText panics is dropped with warning AJ1017 instead of panicking, and builds using the legacy encoding/json now drop an unpaired UTF-16 surrogate, as Go 1.27's default build already did (#93)
  • Rampart bounds its window planning, and its documentation states the measured cost at the default input ceiling: up to 40 model passes per call for dense Korean text (#94)
  • ValidateGuardLabel and rate-limit bucket names accept uppercase ASCII letters (#97)
  • GuardClient.Guard applies a 2-second default deadline when the caller's context has none (#98)

The optional Rampart backend, github.com/arcjet/arcjet-go/sensitiveinfo/rampart, is released in lockstep at v1.2.0. agentframework stays at v0.1.0.

Full changelog: v1.1.0...v1.2.0