@consensus-tools/notifications
v0.5.0
Published
Multi-adapter notification dispatch for HITL approval flows
Maintainers
Readme
@consensus-tools/notifications
Multi-channel notification dispatch for consensus-tools — Slack, Teams, Discord, Telegram, and webhooks.
Install
pnpm add @consensus-tools/notificationsUsage
import { sendHumanApprovalPrompt, sendSlackDM } from "@consensus-tools/notifications";
// Send HITL approval prompt to the appropriate channel
await sendHumanApprovalPrompt(target, prompt, credentials);
// Or send directly to Slack
await sendSlackDM({ channel: "U12345", text: "Please review" }, token);What's included
- Dispatch —
sendHumanApprovalPrompt,sendTimeoutWarning,sendDeadlineExpired - Channel adapters —
sendSlackDM,sendTeamsDM,sendDiscordDM,sendTelegramDM,sendViaWebhook - Utilities —
formatMention,nullCredentials
