mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 21:50:22 +00:00
feat(plugins): add before_agent_reply hook (claiming pattern) (#20067)
Merged via squash.
Prepared head SHA: e40dfbdfb9
Co-authored-by: JoshuaLelon <23615754+JoshuaLelon@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
This commit is contained in:
committed by
GitHub
parent
017bc5261c
commit
7cb323d84f
@@ -607,7 +607,7 @@ Compaction lifecycle hooks exposed through the plugin hook runner:
|
||||
|
||||
### Complete Plugin Hook Reference
|
||||
|
||||
All 27 hooks registered via the Plugin SDK. Hooks marked **sequential** run in priority order and can modify results; **parallel** hooks are fire-and-forget.
|
||||
All 28 hooks registered via the Plugin SDK. Hooks marked **sequential** run in priority order and can modify results; **parallel** hooks are fire-and-forget.
|
||||
|
||||
#### Model and prompt hooks
|
||||
|
||||
@@ -616,6 +616,7 @@ All 27 hooks registered via the Plugin SDK. Hooks marked **sequential** run in p
|
||||
| `before_model_resolve` | Before model/provider lookup | Sequential | `{ modelOverride?, providerOverride? }` |
|
||||
| `before_prompt_build` | After model resolved, session messages ready | Sequential | `{ systemPrompt?, prependContext?, appendSystemContext? }` |
|
||||
| `before_agent_start` | Legacy combined hook (prefer the two above) | Sequential | Union of both result shapes |
|
||||
| `before_agent_reply` | After inline actions, before the LLM runs | Sequential | `{ handled: boolean, reply?, reason? }` |
|
||||
| `llm_input` | Immediately before the LLM API call | Parallel | `void` |
|
||||
| `llm_output` | Immediately after LLM response received | Parallel | `void` |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user