Add autonomous compliance agent that fetches web documents (cookie banners, privacy policies), classifies them via Qwen/Ollama, assesses DSGVO compliance, assigns to the responsible role, and sends notification emails. Components: - ZeroClaw SOP (6-step workflow: fetch, classify, assess, summarize, assign, notify) - Backend: /api/compliance/agent/analyze (combined endpoint) - Backend: /api/compliance/agent/notify (standalone email) - Frontend: /sdk/agent page (Manager UI with URL input + results) - Helper scripts + E2E test Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
1.0 KiB
Bash
Executable File
36 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# send-notification.sh — Send a notification email via Mailpit SMTP.
|
|
#
|
|
# Usage: bash send-notification.sh <recipient> <subject> <body_text>
|
|
#
|
|
# Uses Mailpit's SMTP on localhost:1025 via Python smtplib (one-liner).
|
|
|
|
set -euo pipefail
|
|
|
|
RECIPIENT="${1:?Usage: send-notification.sh <recipient> <subject> <body_text>}"
|
|
SUBJECT="${2:?Missing subject}"
|
|
BODY="${3:?Missing body text}"
|
|
|
|
SMTP_HOST="${SMTP_HOST:-localhost}"
|
|
SMTP_PORT="${SMTP_PORT:-1025}"
|
|
FROM_ADDR="${SMTP_FROM_ADDR:-compliance-agent@breakpilot.local}"
|
|
FROM_NAME="${SMTP_FROM_NAME:-BreakPilot Compliance Agent}"
|
|
|
|
python3 -c "
|
|
import smtplib
|
|
from email.mime.text import MIMEText
|
|
from email.mime.multipart import MIMEMultipart
|
|
|
|
msg = MIMEMultipart('alternative')
|
|
msg['From'] = '${FROM_NAME} <${FROM_ADDR}>'
|
|
msg['To'] = '${RECIPIENT}'
|
|
msg['Subject'] = '${SUBJECT}'
|
|
msg.attach(MIMEText('''${BODY}''', 'html', 'utf-8'))
|
|
|
|
with smtplib.SMTP('${SMTP_HOST}', ${SMTP_PORT}) as server:
|
|
server.sendmail('${FROM_ADDR}', '${RECIPIENT}', msg.as_string())
|
|
|
|
print('Email sent to ${RECIPIENT}')
|
|
"
|