- SyncSettingsRepository + DatasetPermissionRepository with RBAC - Script deploy/run/undeploy API with import sandboxing - User sync settings API with permission checks - 4 CLI skills (connectors, security, notifications, corporate-memory) - Kamal production + staging configs - GitHub Actions CI + deploy workflows - 91 total tests passing
1 KiB
1 KiB
Notifications — How notifications work
Architecture
- User creates a Python script (locally or via Claude Code)
- Script queries local DuckDB and produces output
- Output is sent via Telegram bot or WebSocket gateway
Creating a Notification Script
# user/scripts/sales_alert.py
"""Sales alert - checks daily revenue."""
import duckdb
conn = duckdb.connect('user/duckdb/analytics.duckdb', read_only=True)
result = conn.execute("SELECT sum(amount) as revenue FROM orders WHERE date = current_date").fetchone()
print(f"Today's revenue: ${result[0]:,.2f}")
Running Locally
da scripts run sales_alert # runs on your machine
Deploying to Server
da scripts deploy sales_alert --schedule "0 8 * * MON" # every Monday 8 AM
Delivery Channels
- Telegram: Link via
da auth telegram-link - Desktop app: Via WebSocket gateway (automatic if connected)
Managing Scripts
da scripts list # all deployed scripts
da scripts undeploy <script-id> # remove from server