feat(FN-2878): add webhook notification provider support

- Add webhook settings fields and defaults for enablement, URL, format, and event filtering
- Implement WebhookNotificationProvider with payload formatting support for generic, Slack, and Discord endpoints
- Extend NotificationService to manage both ntfy and webhook providers with live settings sync
- Export webhook notification types/providers through engine notification entry points
This commit is contained in:
Fusion
2026-04-28 09:55:20 -07:00
committed by gsxdsm
parent b4ccfc00e8
commit d52add6f8c
7 changed files with 414 additions and 7 deletions

View File

@@ -24,6 +24,10 @@ export const DEFAULT_GLOBAL_SETTINGS = {
ntfyBaseUrl: undefined,
ntfyEvents: ["in-review", "merged", "failed", "awaiting-approval", "awaiting-user-review", "planning-awaiting-input", "gridlock"],
ntfyDashboardHost: undefined,
webhookEnabled: false,
webhookUrl: undefined,
webhookFormat: "generic",
webhookEvents: [],
notificationProviders: [],
defaultProjectId: undefined,
setupComplete: undefined,

View File

@@ -1117,6 +1117,23 @@ export interface GlobalSettings {
* ?project=<id>&task=<id> so the dashboard opens the correct project first.
* Example: "http://localhost:3000" or "https://fusion.example.com" */
ntfyDashboardHost?: string;
/** When true, enables webhook notifications for task lifecycle events.
* Requires webhookUrl to be set. Default: false. */
webhookEnabled?: boolean;
/** URL to send webhook notifications to.
* Must be an http:// or https:// URL. */
webhookUrl?: string;
/** Format of the webhook payload.
* - "slack": Slack incoming webhook format ({ text: message })
* - "discord": Discord webhook format ({ content: message })
* - "generic": Structured JSON with event/task/timestamp fields
* Default: "generic". */
webhookFormat?: "slack" | "discord" | "generic";
/** List of notification events to send via webhook.
* When webhookEnabled is true, only events in this list trigger webhooks.
* If undefined or empty when webhookEnabled is true, all events are sent.
* Default: [] (all events). */
webhookEvents?: string[];
/** Pluggable notification providers configuration. Additive to legacy ntfy
* settings so existing ntfy configuration continues working unchanged. */
notificationProviders?: NotificationProviderConfig[];