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
..
2026-02-08 10:18:04 -08:00
2026-02-05 12:08:35 -05:00
2026-02-10 19:23:58 -05:00
2026-02-10 17:33:57 -06:00
2026-02-10 07:36:04 -05:00
2026-02-10 10:06:23 -05:00
2026-02-06 10:08:59 -05:00
2026-01-31 15:04:03 -06:00
2026-02-11 07:54:48 +08:00
2026-02-10 19:23:58 -05:00
2026-02-09 09:20:52 +09:00
2026-02-07 15:40:35 -05:00
2026-02-03 14:27:39 -08:00
2026-02-10 16:04:41 -05:00
2026-02-09 11:26:27 -06:00
2026-02-07 10:28:19 -05:00
2026-02-09 11:19:07 -06:00
2026-02-07 15:40:35 -05:00
2026-02-11 08:39:15 +09:00
2026-02-09 09:20:52 +09:00
2026-02-10 10:33:32 -06:00
2026-02-08 04:53:31 -08:00
2026-02-10 07:36:04 -05:00
2026-02-09 23:58:52 -06:00
2026-02-07 15:40:35 -05:00
2026-02-09 18:30:05 -08:00
2026-02-06 10:08:59 -05:00
2026-02-09 18:30:05 -08:00
2026-01-30 03:16:21 +01:00
2026-01-31 15:04:03 -06:00
2026-02-10 17:33:57 -06:00
2026-02-06 10:08:59 -05:00
2026-01-31 15:04:03 -06:00
2026-02-07 15:40:35 -05:00
2026-02-06 10:08:59 -05:00
2026-02-06 10:08:59 -05:00
2026-02-01 16:08:01 -08:00
2026-02-07 15:40:35 -05:00
2026-02-05 10:09:45 -05:00
2026-01-31 15:04:03 -06:00
2026-02-06 10:08:59 -05:00
2026-02-02 18:35:01 +01:00
2026-01-30 03:16:21 +01:00