You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gpt-pilot/docs/gateway
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>
9 months ago
..
security Replace text diagrams with mermaid (#7165) 10 months ago
authentication.md revert(docs): undo markdownlint autofix churn 10 months ago
background-process.md Docs: add nav titles across docs (#5689) 10 months ago
bonjour.md Docs: enable markdownlint autofixables except list numbering (#10476) 10 months ago
bridge-protocol.md Docs: add nav titles across docs (#5689) 10 months ago
cli-backends.md chore: apply local workspace updates (#9911) 10 months ago
configuration-examples.md fix: unify session maintenance and cron run pruning (#13083) 10 months ago
configuration.md feat(hooks): add agentId support to webhook mappings (#13672) 9 months ago
discovery.md Docs: add nav titles across docs (#5689) 10 months ago
doctor.md Docs: add nav titles across docs (#5689) 10 months ago
gateway-lock.md Docs: add nav titles across docs (#5689) 10 months ago
health.md Docs: add nav titles across docs (#5689) 10 months ago
heartbeat.md docs: canonicalize docs paths and align zh navigation (#11428) 10 months ago
index.md Docs: enable markdownlint autofixables except list numbering (#10476) 10 months ago
local-models.md Docs: enable markdownlint autofixables except list numbering (#10476) 10 months ago
logging.md Docs: add nav titles across docs (#5689) 10 months ago
multiple-gateways.md Docs: add nav titles across docs (#5689) 10 months ago
network-model.md Docs: landing page revamp (#8885) 10 months ago
openai-http-api.md Docs: add nav titles across docs (#5689) 10 months ago
openresponses-http-api.md Docs: add nav titles across docs (#5689) 10 months ago
pairing.md Docs: add nav titles across docs (#5689) 10 months ago
protocol.md Docs: add nav titles across docs (#5689) 10 months ago
remote-gateway-readme.md Replace text diagrams with mermaid (#7165) 10 months ago
remote.md docs: restructure Get Started tab and improve onboarding flow (#9950) 10 months ago
sandbox-vs-tool-policy-vs-elevated.md chore: Run `pnpm format:fix`. 10 months ago
sandboxing.md docs: canonicalize docs paths and align zh navigation (#11428) 10 months ago
tailscale.md Docs: enable markdownlint autofixables except list numbering (#10476) 10 months ago
tools-invoke-http-api.md Docs: add nav titles across docs (#5689) 10 months ago
troubleshooting.md docs: canonicalize docs paths and align zh navigation (#11428) 10 months ago