Dispatch hook
bb 0.43.3SDK 0.4.104pinned e865697 (desktop-v0.43.3)
Answers the checkpoint every message passes on its way to a provider. With this, a plugin can:
Decide whether a message may go
What it gives you
- Let a dispatch proceed, queue it with a user-visible reason, or refuse it outright
- See the thread, project, machine, prompt and resolved execution tuple before the turn runs
- Read each queued message, its author, origin, and originPluginId in queuedMessages, with an empty array for inline attempts
- Read the shared initiator category or mixed for a grouped dispatch, and the shared senderThreadId, null when nobody sent it, or mixed
- Read the shared origin and originPluginId, each independently mixed when grouped messages differ
- Read plugin-owned JSON attached by experimental_submit, including on queued re-attempts
- Hold work until a moment it names, then ask core to re-decide every queued message when its condition changes
API
Each symbol links to the pinned commit it was read at.
PluginHooksinterfacePluginHookSignaturesinterfaceMessageDispatchHookContextinterfacePluginDispatchEnvironmentIntenttypeMessageDispatchHookDecisiontype
Used by
Concurrency limit, Drafts
The brief is Markdown, written for a coding agent: what the capability is, where it registers, every SDK symbol with a pinned permalink, the rules that bite, and what done means.