Package com.tnsai.hooks.events
Interface ActionHookEvent
- All Superinterfaces:
HookEvent
- All Known Implementing Classes:
OnActionError,PostAction,PreAction
public sealed interface ActionHookEvent
extends HookEvent
permits PreAction, PostAction, OnActionError
Generic action-dispatch hook events (issue #59). Fire around every
action the framework's
because it catches every
ActionExecutor routes — broader than
invalid reference
ToolHookEvent
ActionType (LOCAL, WEB_SERVICE,
LLM, MCP_TOOL), not only Tool SPI instances.
Consumer guidance:
- "Block
rm -rf /on the Bash tool" —, more specific, carries tool-level fields.invalid reference
ToolHookEvent - "Per-tenant cost budget on every LLM call" —
ActionHookEventwith a matcher onPreAction.type()equal toActionType.LLM; catches all LLM routes regardless of which role / capability made them.
PreAction— before dispatch; Block/Modify opportunityPostAction— after success; observe, collect metricsOnActionError— on throw; retry / escalation decisions
- Since:
- 0.5.0 (issue #59)
-
Method Summary