openclaw/docs
Bill Chirico ca629296c6
feat(hooks): add agentId support to webhook mappings (#13672)
* feat(hooks): add agentId support to webhook mappings

Allow webhook mappings to route hook runs to a specific agent via
the new `agentId` field. This enables lightweight agents with minimal
bootstrap files to handle webhooks, reducing token cost per hook run.

The agentId is threaded through:
- HookMappingConfig (config type + zod schema)
- HookMappingResolved + HookAction (mapping types)
- normalizeHookMapping + buildActionFromMapping (mapping logic)
- mergeAction (transform override support)
- HookAgentPayload + normalizeAgentPayload (direct /hooks/agent endpoint)
- dispatchAgentHook → CronJob.agentId (server dispatch)

The existing runCronIsolatedAgentTurn already supports agentId on
CronJob — this change simply wires it through from webhook mappings.

Usage in config:
  hooks.mappings[].agentId = "my-agent"

Usage via POST /hooks/agent:
  { "message": "...", "agentId": "my-agent" }

Includes tests for mapping passthrough and payload normalization.
Includes doc updates for webhook.md.

* fix(hooks): enforce webhook agent routing policy + docs/changelog updates (#13672) (thanks @BillChirico)

* fix(hooks): harden explicit agent allowlist semantics (#13672) (thanks @BillChirico)

---------

Co-authored-by: Pip <pip@openclaw.ai>
Co-authored-by: Gustavo Madeira Santana <gumadeiras@gmail.com>
2026-02-10 19:23:58 -05:00
..
.i18n Docs: seed ja-JP translations 2026-02-08 10:18:04 -08:00
assets docs(onboarding): add bootstrapping page (#9767) 2026-02-05 12:08:35 -05:00
automation feat(hooks): add agentId support to webhook mappings (#13672) 2026-02-10 19:23:58 -05:00
channels feat: IRC — add first-class channel support 2026-02-10 17:33:57 -06:00
cli Onboard: rename Custom API Endpoint to Custom Provider 2026-02-10 07:36:04 -05:00
concepts docs: clarify which workspace files are injected into context window (#12937) 2026-02-10 10:06:23 -05:00
debug Docs: enable markdownlint autofixables except list numbering (#10476) 2026-02-06 10:08:59 -05:00
diagnostics Docs: add nav titles across docs (#5689) 2026-01-31 15:04:03 -06:00
experiments fix: prevent act:evaluate hangs from getting browser tool stuck/killed (#13498) 2026-02-11 07:54:48 +08:00
gateway feat(hooks): add agentId support to webhook mappings (#13672) 2026-02-10 19:23:58 -05:00
help refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
hooks docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
images Channels: finish Feishu/Lark integration 2026-02-03 14:27:39 -08:00
install feat: `ClawDock` - shell docker helpers for OpenClaw development (#12817) 2026-02-10 16:04:41 -05:00
ja-JP docs: fix ja-JP dashboard URL link 2026-02-09 11:26:27 -06:00
nodes docs: add symptom-first troubleshooting hub and deep runbooks (#11196) 2026-02-07 10:28:19 -05:00
platforms chore(release): 2026.2.9 2026-02-09 11:19:07 -06:00
plugins docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
providers Update Together default model to together/moonshotai/Kimi-K2.5 (#13324) 2026-02-11 08:39:15 +09:00
refactor refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
reference Docs: restore maintainers in contributing 2026-02-10 10:33:32 -06:00
security Centralize date/time formatting utilities (#11831) 2026-02-08 04:53:31 -08:00
start Onboard: rename Custom API Endpoint to Custom Provider 2026-02-10 07:36:04 -05:00
tools Commands: add commands.allowFrom config 2026-02-09 23:58:52 -06:00
web docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
zh-CN docs: fix broken links checker and add CI docs (#13041) 2026-02-09 18:30:05 -08:00
CNAME refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
brave-search.md Docs: enable markdownlint autofixables except list numbering (#10476) 2026-02-06 10:08:59 -05:00
ci.md docs: fix broken links checker and add CI docs (#13041) 2026-02-09 18:30:05 -08:00
date-time.md Docs: add nav titles across docs (#5689) 2026-01-31 15:04:03 -06:00
docs.json feat: IRC — add first-class channel support 2026-02-10 17:33:57 -06:00
index.md Docs: enable markdownlint autofixables except list numbering (#10476) 2026-02-06 10:08:59 -05:00
logging.md Docs: add nav titles across docs (#5689) 2026-01-31 15:04:03 -06:00
network.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
perplexity.md Docs: enable markdownlint autofixables except list numbering (#10476) 2026-02-06 10:08:59 -05:00
pi-dev.md Docs: enable markdownlint autofixables except list numbering (#10476) 2026-02-06 10:08:59 -05:00
pi.md fix: align pi-coding-agent typings and docs 2026-02-01 16:08:01 -08:00
prose.md docs: canonicalize docs paths and align zh navigation (#11428) 2026-02-07 15:40:35 -05:00
style.css Docs: streamline start and install docs (#9648) 2026-02-05 10:09:45 -05:00
tts.md Docs: add nav titles across docs (#5689) 2026-01-31 15:04:03 -06:00
vps.md Docs: enable markdownlint autofixables except list numbering (#10476) 2026-02-06 10:08:59 -05:00
whatsapp-openclaw-ai-zh.jpg Docs: add zh-CN landing notice + AI image 2026-02-02 18:35:01 +01:00
whatsapp-openclaw.jpg refactor: rename to openclaw 2026-01-30 03:16:21 +01:00