interlens.hooks.message_hook¶
interlens.hooks.message_hook
¶
MessageHook
¶
Bases: ABC
Middleware that inspects each freshly generated message before it is committed to the transcript, and may approve / deny / edit it.
This is the seam for a future LLM-judge that vets or rewrites turns (e.g. safety filtering, format
enforcement). Hooks live on the live Conversation (conversation.message_hooks) and are NOT serialized
in the template — they're a runtime policy, not part of the scenario recipe. The default is an empty hook
list, i.e. today's pass-through behavior.