- Reset master to upstream/main (16,697 commits) - Overlay 2,271 local-only files (skills, tools, workspace, configs, apps) - Restore IDENTITY.md and USER.md templates - Build verified, gateway running, Discord working Co-Authored-By: Claude Opus 4.6 <[email protected]>
1.3 KiB
1.3 KiB
MAIL_AGENT.md — Implementation Notes
The Mail Agent scans messages and emits mail.* events. It does not send mail; it only drafts and classifies.
Implementation
- Code:
workspace/james/agents/mail/mail_agent.py - Channel:
james.events.mail - Dry-run only (fixtures or local parsing)
Dry-Run
PYTHONPATH=<repo-root>/workspace JAMES_MAIL_DRY_RUN=1 JAMES_MAIL_STDOUT=1 \
python3 workspace/james/agents/mail/mail_agent.py --dry-run
Optional fixture:
PYTHONPATH=<repo-root>/workspace JAMES_MAIL_DRY_RUN=1 JAMES_MAIL_STDOUT=1 \
python3 workspace/james/agents/mail/mail_agent.py --dry-run --fixture workspace/james/fixtures/mail.json
Classification Rules
mail.security_alert— login alerts, password resets, verification codesmail.invoice— billing, receipts, subscriptionsmail.action_required— requests, approvals, tasksmail.newsletter— marketing or digest mailmail.fyi— everything else
Severity mapping:
- security:
high - action_required:
medium - invoice:
medium - newsletter/fyi:
low
Payload Fields
email_idfromsubjectsnippetreceived_atlabelsclassificationsummarydraft_replydry_run
Systemd (optional)
workspace/james/agents/mail/systemd/james-mail.service