AgentEventHooksMixin#

Build extensions, choose hooks, and manage request-scoped state. See the guide.

class zett_agent.extensions.base.AgentEventHooksMixin[source]#

Hooks for internal notifications and external input.

accept(config, event)[source]#

Handle one external event and report whether it was accepted.

The Agent broadcasts each event to every registered extension. Override this synchronous hook when an extension waits for input from another thread, HTTP request, TUI, or Web UI. The default ignores the event. Config is passed separately and can be None before initialization. Each extension decides whether the supplied identity and payload match its protocol. Return True to include this extension’s name in the broadcast result; returning False does not stop later receivers.

Parameters:
Return type:

bool

async on_event(context, event)[source]#

Process a published notification; inspect its concrete type with match.

Parameters:
Return type:

None