Add automated ISAC system notifications
This commit is contained in:
@@ -342,3 +342,29 @@ window. Daily rows are assigned to the next 10:00 AM wall-clock boundary in
|
||||
dispatched rows retain `delivered_at` evidence and are never selected again.
|
||||
The existing ISAC notification delivery preferences still determine optional
|
||||
browser and email fan-out after the consolidated inbox message is created.
|
||||
|
||||
## Automated ISAC system messages
|
||||
|
||||
Automated message definitions live in `automated_system_messages` and are
|
||||
managed through ISAC → System Configuration → Automated Messages by agents with
|
||||
`system.notifications.manage`. Edits are recorded under the
|
||||
`system_configuration` audit category. Definitions identify a lifecycle event,
|
||||
enabled state, delay in minutes, message content, primary destination, and
|
||||
structured action callouts.
|
||||
|
||||
`account.created` is emitted by password, magic-link, and Discord registration.
|
||||
The delivery table has a unique message/user/event/event-ID constraint, so the
|
||||
same account creation cannot deliver the Welcome Agent message more than once.
|
||||
The default welcome introduces News, Database, Builds, Guides, Builder, ISAC
|
||||
Contributor Mode, and the SHD Discord community.
|
||||
|
||||
Immediate definitions are delivered in the registration request. Definitions
|
||||
with a delay are persisted in `automated_system_message_deliveries`. Production
|
||||
must run the delayed dispatcher once per minute:
|
||||
|
||||
```text
|
||||
* * * * * cd /path/to/shd.build && npm run notifications:system:production
|
||||
```
|
||||
|
||||
Only one dispatcher instance should run for the embedded database. Delivered
|
||||
rows retain both their delivery timestamp and generated notification ID.
|
||||
|
||||
Reference in New Issue
Block a user