mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:30:44 +00:00
docs: add plugin hooks reference
This commit is contained in:
@@ -17,6 +17,7 @@ reference for **what to import** and **what you can register**.
|
||||
- First plugin? Start with [Building plugins](/plugins/building-plugins).
|
||||
- Channel plugin? See [Channel plugins](/plugins/sdk-channel-plugins).
|
||||
- Provider plugin? See [Provider plugins](/plugins/sdk-provider-plugins).
|
||||
- Tool or lifecycle hook plugin? See [Plugin hooks](/plugins/hooks).
|
||||
</Tip>
|
||||
|
||||
## Import convention
|
||||
@@ -229,6 +230,9 @@ AI CLI backend such as `codex-cli`.
|
||||
| `api.on(hookName, handler, opts?)` | Typed lifecycle hook |
|
||||
| `api.onConversationBindingResolved(handler)` | Conversation binding callback |
|
||||
|
||||
See [Plugin hooks](/plugins/hooks) for examples, common hook names, and guard
|
||||
semantics.
|
||||
|
||||
### Hook decision semantics
|
||||
|
||||
- `before_tool_call`: returning `{ block: true }` is terminal. Once any handler sets it, lower-priority handlers are skipped.
|
||||
|
||||
Reference in New Issue
Block a user