Imported from xmanatee/kota (
src/modules/webhook-channel/AGENTS.md). Install upstream withnpx skills add xmanatee/kota --skill webhook-channel. Copyright stays with the author.
Webhook Channel Module
This module provides a generic inbound HTTP webhook channel. External services POST a JSON payload to create or resume agent sessions.
- Implements the
ChannelDefprotocol fromsrc/core/channels/channel.ts. - Registers its HTTP route via module route contribution.
- Supports optional HMAC-SHA256 signature verification.
- Supports source-based routing to different agents with per-source session continuity.
- Reports live webhook session ids to daemon scope-drain inspection and clears them when the daemon default scope changes.
- Separate from the outbound
webhooknotification module. - Inbound sessions use configured autonomy explicitly. Missing session-autonomy config is a route-boundary error, not a hidden fallback.
handler.tsowns types, helpers, source resolution, and request handling.index.tsowns the module definition and route registration.
Handler tests supply only configuration, event/log and agent-session ports. Share the request/response boundary fixture across parsing and source-routing scenarios; module contribution checks use the production loader. Keep source continuity here, while workflow and domain lifecycle decisions stay downstream.
