data/hooks/hook_types library
Classes
- ApiHookContext
- Context for API call hooks (HookType.preApiCall, HookType.postApiCall).
- ApiTokenUsage
- Token usage reported by the API.
- ErrorHookContext
- Context for error hooks (HookType.onError).
- FileHookContext
- Context for file-related hooks (HookType.onFileChange).
- GitHookContext
- Context for git-related hooks (HookType.onGitOperation).
- HookAbort
- Abort the entire hook chain and the hooked operation.
- HookChain
- An ordered list of HookRegistrations for a single HookType, sorted by priority (lower values first).
- HookContext
- Base context passed to every hook invocation.
- HookContinue
- Continue execution with optionally modified data.
- HookRegistration
- Registration record for a single hook handler.
- HookResult
- Result returned by a hook handler, controlling chain behavior.
- HookRetry
- Request that the hooked operation be retried after a delay.
- HookSkip
- Skip the current operation without error.
- HookTransform
- Transform the data flowing through the hook chain.
- MessageHookContext
- Context for message-related hooks (HookType.preMessage, HookType.postMessage).
- ToolHookContext
- Context for tool-related hooks (HookType.preToolExecution, HookType.postToolExecution).
Enums
- FileOperation
- File operations tracked by FileHookContext.
- GitOperation
- Git operations tracked by GitHookContext.
- HookPriority
- Priority levels for hook execution ordering.
- HookType
- All hook points in the application lifecycle.
Typedefs
-
AsyncHookHandler
= Future<
HookResult> Function(HookContext context) - Signature for asynchronous hook handlers.
- HookHandler = HookResult Function(HookContext context)
- Signature for synchronous hook handlers.
- HookMatcher = bool Function(HookContext context)
- Signature for hook matchers that determine whether a hook should fire.