Commit Graph

14 Commits

Author SHA1 Message Date
Vincent Koc
7d2d8732d0 docs(plugins/hooks): document per-hook timeoutMs registration option
For 891c7d9f1c: docs/plugins/hooks.md "Quick start" now lists the `priority`
and new `timeoutMs` opts that `api.on(...)` accepts, explaining that the
per-hook budget aborts a slow handler instead of letting plugin setup or
recall work consume the caller's configured model timeout. The change is
traceable to the new `OpenClawPluginApi.on` `{ priority?; timeoutMs? }`
signature and `PluginHookRegistration.timeoutMs` field added in the same
SHA.
2026-04-28 10:12:44 -07:00
Vincent Koc
c478aeca5a docs: cover cron_changed plugin hook and legacy env-var deprecation
- docs/plugins/hooks.md: add `cron_changed` to the Lifecycle hook catalog and
  a Gateway lifecycle paragraph describing its typed event payload, run
  status, delivery status, and removed-event job snapshot, so plugin authors
  picking up f155a5f955 (#72773) have a canonical reference beyond the
  sdk-overview bullet that already shipped in the same SHA.
- docs/help/environment.md: add a "Legacy environment variables" section for
  aa1834a3ff so users see that `CLAWDBOT_*` and `MOLTBOT_*` prefixes are now
  ignored and trigger an `OPENCLAW_LEGACY_ENV_VARS` deprecation warning,
  with a rename example to `OPENCLAW_*`.
2026-04-28 04:40:38 -07:00
Peter Steinberger
4d4c7c8ab3 fix(plugins): time out hanging agent end hooks 2026-04-28 01:18:50 +01:00
EVA
1adaa28dc8 [plugin sdk] Add generic plugin host-hook contracts (#72287)
Merged via squash.

Prepared head SHA: 68e5f2ce19
Co-authored-by: 100yenadmin <239388517+100yenadmin@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-27 17:07:02 -07:00
Peter Steinberger
ccfa0c1964 docs: clarify hook config and feishu policy 2026-04-27 23:30:57 +01:00
Vincent Koc
c7b336d83e docs(hooks): document new ctx.jobId field on plugin hook contexts
Scott Glover's commit 371b69b3e2 ('Expose cron jobId in plugin hook
context') added an optional jobId field on PluginHookAgentContext,
populated for cron-driven runs. The commit shipped without a docs
update or CHANGELOG entry, so plugin authors had no visible signal
that the new ctx.jobId field exists.

Surface ctx.jobId in two existing hook context references in
docs/plugins/hooks.md: the before_tool_call ctx-fields list, and the
runId/agent-lifecycle paragraph that already names ctx.runId — extend
it to note ctx.jobId on cron-driven runs and what plugins can do with
it (scope metrics, side effects, or state to a scheduled job).
2026-04-25 18:38:27 -07:00
Vincent Koc
f3accc753c feat(plugins): add before agent finalize hook (#71765) 2026-04-25 17:21:17 -07:00
Peter Steinberger
599ae7fed8 docs: clarify tool result details persistence 2026-04-25 19:47:19 +01:00
Vincent Koc
275c128e99 feat(plugins): add sanitized model call hooks 2026-04-25 10:56:40 -07:00
Peter Steinberger
5b59079fd4 fix(tts): preserve audio-only hook transcript 2026-04-25 06:28:54 +01:00
Vincent Koc
ff8b7145d7 docs(plugins): catalog active deprecations in sdk-migration and cross-link from hooks 2026-04-24 13:04:07 -07:00
Vincent Koc
3bd2ee78b6 feat(plugins): expose hook correlation fields
Expose first-class hook correlation fields for plugin message and run lifecycle hooks, including frozen diagnostic trace copies for plugin-facing events.
2026-04-24 11:37:34 -07:00
Vincent Koc
5d7d5ca2a9 docs(plugins/hooks): regroup hook catalog by surface, mark decision hooks, sync before_tool_call result type with code 2026-04-24 11:02:46 -07:00
Peter Steinberger
7330a0c7e0 docs: add plugin hooks reference 2026-04-24 18:22:47 +01:00