docs: clarify hook transform module path constraints

This commit is contained in:
Peter Steinberger
2026-02-14 14:06:24 +01:00
parent 35c0e66ed0
commit 644bef157a

View File

@@ -2021,6 +2021,7 @@ Auth: `Authorization: Bearer <token>` or `x-openclaw-token: <token>`.
- `match.source` matches a payload field for generic paths.
- Templates like `{{messages[0].subject}}` read from the payload.
- `transform` can point to a JS/TS module returning a hook action.
- `transform.module` must be a relative path and stays within `hooks.transformsDir` (absolute paths and traversal are rejected).
- `agentId` routes to a specific agent; unknown IDs fall back to default.
- `allowedAgentIds`: restricts explicit routing (`*` or omitted = allow all, `[]` = deny all).
- `defaultSessionKey`: optional fixed session key for hook agent runs without explicit `sessionKey`.