Signal Receivers
Django Signal Receivers for guardrail.
Note
Experimental. The Guardrail was designed and coded by Claude Code (Anthropic’s Claude Opus 5.5), with Lawrence McDaniel as co-author. It is experimental, and will be documented.
- smarter.apps.guardrail.receivers.guardrail_deleted(sender, instance, **kwargs)[source]
Log a Guardrail that is about to be deleted.
- smarter.apps.guardrail.receivers.guardrail_saved(sender, instance, created, **kwargs)[source]
Log a created or updated Guardrail, with its name and id.
Its serialized fields are not logged: they include the owner’s user profile, whose email address is personal data.
- smarter.apps.guardrail.receivers.handle_guardrail_blocked(sender, guardrail, stage, message, **kwargs)[source]
Log a blocked message or reply.
- smarter.apps.guardrail.receivers.handle_guardrail_escalated(sender, guardrail, stage, event=None, **kwargs)[source]
Log an escalation to human review.
Its event awaits review in the Smarter admin.