Skip to main content

Module events

Module events 

Source
Expand description

Hook events — typed payloads for each extension point.

Each HookKind maps to a discrete phase of SynapsCLI’s execution loop. HookEvent is the concrete payload dispatched to subscribers at that phase; HookResult is what a handler returns to control execution flow.

Permission enforcement lives in crate::extensions::permissions: every HookKind declares a required_permission so the runtime can gate subscriptions before any payload is delivered.

Structs§

HookEvent
A hook event payload dispatched to extension handlers.

Enums§

HookKind
All hook event kinds in the phase-1 catalog.
HookResult
What an extension handler returns after processing a hook event.

Constants§

MAX_HOOK_OUTPUT
Maximum hook output size (bytes) before truncation on the JSON-RPC path. Matches max_tool_buffer (256 KB) — keeps the payload bounded while still giving transform extensions the full buffered output to work with. Exported so tests can build payloads that derive from the real cap and won’t rot when the constant changes.