webhook channel covers a JSON post; write your own for anything else. It replaces the alpha.4 InputResponder (see Migrate to alpha.5).
The contract
type()is the name a rule uses:channels: ["chat:team"], orexternal:chat:teamin a route tier.ChannelContexthas the target name (team), its settings merged fromyukta.notifications.channels.chat.team.*, and, for a question delivered by a route tier, the request, the one-timeanswerTokenandanswerExpires. A rule’s channel never gets a token.- The notification arrives already redacted; do not look for secrets in it.
- Return an error to retry. Delivery is at least once: be idempotent by the notification id.
Rules to keep
- The channel never receives an answer. A receiver answers with the token at the token-answer endpoint, so the answer is reviewed and audited like any other. Never put the token in a log line.
- Check URLs you call against the egress policy in your own code if you do not use the shared HTTP client.
- Keep
deliverquick; the worker retries after 1 s, doubling to 5 minutes, and gives up after 10 tries, raising adelivery.failednotification.
Test it
Unit testdeliver with a fake ChannelContext and StepVerifier; deliver the same notification twice and assert the receiver sees one effect. Then add the channel settings and a rule, raise a notification (a NOTIFY_TERMINAL with target: inbox does it) and check the receiver.
The SPI version is 1.1.