Notifications · Référence
Notification Service
A legacy source-vendored direct Effect dispatcher retained for compatibility; durable systems should use @krak-stack/notifications.
Dernière mise à jour le 8 octobre 2026
Compatibility Status
service-notification is the source-vendored direct compatibility dispatcher. It sends top-level channel messages through an application-composed NotificationChannelRegistry and remains available for projects that already own this source. It is not the recommended durable notification system.
New applications that need package-owned migrations, inbox and preference CRUD, delivery attempts, Effect persisted-queue jobs, retries, a scheduler, workers, or one-shot reminders should install @krak-stack/notifications.
Install
bunx shadcn@latest add @krak-stack/service-notificationIncluded Files
services/notification/index.ts- DirectNotificationService, optional persistence-store contract, and layer helpersservices/notification/channels/index.ts- Compatibility channel contract and registryservices/notification/schema.ts- Dynamic message envelope and shared send error
Direct Dispatch
const notifications = yield* NotificationService;
yield* notifications.send({
email: {
to: "[email protected]",
subject: "Password reset",
text: "Use the secure link to reset your password.",
},
});Install notification-channel-email-ses when this compatibility dispatcher should send through SES. For the durable package, import the provider adapter from @krak-stack/notifications/transport/email-ses or /transport/email-smtp instead.
Optional Store Hook
The structured { persist, message } form can call a consumer-provided NotificationPersistenceStore before optional direct channel dispatch. The application still owns that store, its transaction boundary, authorization, migrations, relay, retry policy, and workers. Adding the hook does not turn this compatibility item into the durable @krak-stack/notifications runtime.