Skip to content

Events

The full set of events a hooks handler can be registered for — see Hooks and events for how a hook is declared and the filter shape.

Event Payload Fires when
onAppReady {} The app has finished starting up.
onSessionStart { sessionId, channelId } A chat session began.
onAgentComplete { sessionId, channelId, result: string | null, duration } An agent turn finished.
onToolCall { toolId, params, result, success } A tool call completed during a turn.
onFileMemorized { path } A file was indexed into the folder’s knowledge base; supports the extensions filter.
onPluginSettingsChanged { key, oldValue: undefined, newValue } A plugin setting was saved from the app’s settings UI. Delivered to every plugin’s handler regardless of whose key changed — check the key prefix. oldValue is always undefined. Not fired by a handler’s own ctx.settings.set.
onFileChangeNotify { agentId, channelId, folderPath, folderDisplayName, changes, summary, isDigest } A summarized notification of file activity, potentially batched into a digest.
onSessionMessage { sessionId, channelId, result? } A message was produced in a session.
onChannelChanged { channelId, path, action: 'registered' | 'unregistered' } An inbound channel was bound to or released from a folder.
onAgentHitlRequest { agentId, executionId, requestId, action, target, description, channelId } The agent is asking for human-in-the-loop approval before proceeding.
onSessionEnd declared; not emitted
onFileChange declared; not emitted
onActionCreated declared; not emitted

onSessionEnd, onFileChange and onActionCreated are part of the manifest schema, so a manifest that registers a handler for any of them validates cleanly — but the app never emits these events, so that handler simply never runs. For file activity use onFileMemorized or onFileChangeNotify.

The extensions filter compares the payload’s path extension against the list; on an event whose payload has no path, a filter matches everything.

  • Hooks and events — the result trap in onAgentComplete / onSessionMessage, and declaring a hook with a filter
  • Plugin context (ctx) — the ctx argument every hook handler also receives