HookType enum

All hook points in the application lifecycle.

Hooks fire at well-defined points, allowing plugins and internal systems to observe and modify behavior without direct coupling.

Inheritance
Available extensions

Values

preToolExecution → const HookType

Fires before a tool is executed. Can modify input or block execution.

postToolExecution → const HookType

Fires after a tool completes. Can modify output or trigger follow-up.

preMessage → const HookType

Fires before a user or assistant message is processed.

postMessage → const HookType

Fires after a message has been processed and response generated.

preApiCall → const HookType

Fires before an API call is made to the model provider.

postApiCall → const HookType

Fires after an API call completes (success or failure).

onError → const HookType

Fires when an error occurs anywhere in the system.

onPermissionRequest → const HookType

Fires when a permission check is requested.

onPermissionResult → const HookType

Fires after a permission decision has been made.

onSessionStart → const HookType

Fires when a new session is started.

onSessionEnd → const HookType

Fires when a session ends (graceful shutdown or timeout).

onConversationStart → const HookType

Fires when a new conversation begins within a session.

onConversationEnd → const HookType

Fires when a conversation ends.

onCompaction → const HookType

Fires when context compaction is performed.

onFork → const HookType

Fires when the conversation is forked into a sub-agent.

onToolRegistration → const HookType

Fires when a new tool is registered with the tool registry.

onCommandExecution → const HookType

Fires when a slash command is executed.

onFileChange → const HookType

Fires when a file is read, written, or deleted.

onGitOperation → const HookType

Fires when a git operation is performed.

onMcpConnect → const HookType

Fires when an MCP server connection is established.

onMcpDisconnect → const HookType

Fires when an MCP server connection is closed.

onAgentSpawn → const HookType

Fires when a sub-agent is spawned.

onAgentComplete → const HookType

Fires when a sub-agent completes its task.

onThemeChange → const HookType

Fires when the UI theme changes.

onConfigChange → const HookType

Fires when configuration values change.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<HookType>
A constant List of the values in this enum, in order of their declaration.