Skip to content

Data Definition Document: Unified Signals & Notifications

Domain: Unified (audit, communications, identity, library, notifications, search, signals, vault, workflow) Logical Sub-Domain: Signals (Observation & Alerting) Physical Packages: @sd/mod-unified-signals, @sd/mod-unified-notifications Related Documents: Process Blueprint Context: This document defines the Data Structures for System Signals, Notification Templates, and User Preferences. Source: packages/modules/unified/{signals,notifications}/src/types.ts

0. Entity Relationship Diagram (ERD)

erDiagram
    SYSTEM_SIGNAL {
        string id PK
        enum priority "info, warning, critical"
        enum source "iot, workflow..."
        json payload
        bool isProcessed
    }

    NOTIFICATION {
        string id PK
        string userId FK
        enum type "general, security, billing"
        bool isRead
    }

    USER_PREFS {
        string userId PK
        json channels "Map<Type, Channel[]>"
    }

    SYSTEM_SIGNAL ||--o{ NOTIFICATION : "triggers (reflex)"
    USER ||--|| USER_PREFS : "configures"
    USER ||--o{ NOTIFICATION : "receives"

1. Primary Entities

Entity: SystemSignal

A normalized event emitted by any module.

Field Type Required Description
id string Yes Unique ID.
type string Yes Enum: METRIC_ALERT, DOC_ADDED, PROJECT_UPDATE, TELEMETRY.
source string Yes Origin module (iot, finance, workflow).
priority string Yes info (Digest), warning (Dashboard), critical (Reflex).
title string Yes Human readable headline.
payload json Yes Raw data for the Agent to process.
isProcessed boolean Yes Logic flag for the Auto-Digestion Agent.

Entity: Notification

A message delivered to a user.

Field Type Required Description
userId string Yes Recipient ID or 'global'.
type string Yes Category for channel routing (security, billing).
isRead boolean Yes UI state.

Entity: NotificationPreferences

User configuration for delivery channels.

Field Type Required Description
channels Map Yes Mapping of NotificationType -> ['email', 'sms', 'in_app'].

2. Configuration

Template: NotificationTemplateData

Standardized message formats (e.g. PO_APPROVED).

Field Type Required Description
id string Yes Template Key.
defaultChannels string[] Yes Fallback channels if user hasn't configured prefs.
body string Yes Handlebars-style template string.

4. Changelog

Date Author Description Reference
2026-01-24 Antigravity Initial creation Implementation Plan