feat(brain): Resend email integration with pixel tracking#296
Merged
Conversation
Wire pi@ruv.io as the brain's email identity via Resend.com for notifications, discovery digests, and conversational interaction. - Add src/notify.rs: Resend HTTP client with 11 rate-limited categories, styled HTML templates, open tracking pixel, and unsubscribe links - Add 8 new routes: test, status, send, welcome, help, digest, pixel, opens - All /v1/notify/* endpoints gated by BRAIN_SYSTEM_KEY auth - Cloud Scheduler job brain-daily-digest at 8 AM PT for discovery emails - RESEND_API_KEY secret mounted on Cloud Run (ruvbrain-00133-r2t) - 4 test emails verified delivered to ruv@ruv.net Co-Authored-By: claude-flow <ruv@ruv.net>
- Add Email tab to Encyclopedia Galactica modal with subscribe form - Add email subscription CTA in "Ready to connect" section - Add Subscribe link in footer navigation - Add POST /v1/notify/subscribe (public) — sends welcome email - Add POST /v1/notify/unsubscribe (public) — handles opt-out - Mark inbound email commands as "coming soon" (Resend webhooks TBD) - Add subscribeEmail() JS with fallback to mailto Co-Authored-By: claude-flow <ruv@ruv.net>
- Add POST /v1/email/inbound webhook handler for Resend inbound emails - Parse email subjects for commands: search, status, help, drift, etc - Semantic search via email: reply with "search <query>" to get results - Remove "coming soon" label from email commands on website - MX record updated: ruv.io -> inbound-smtp.resend.com (priority 10) - Webhook registered: pi.ruv.io/v1/email/inbound (ID: 55c6592c) - Old GoDaddy MX records removed from Cloudflare Co-Authored-By: claude-flow <ruv@ruv.net>
- Add POST /v1/chat/google endpoint for Google Chat webhook - Handle ADDED_TO_SPACE (welcome), MESSAGE (commands), REMOVED_FROM_SPACE - Commands: search, status, drift, recent, help + free-text auto-search - Rich Cards V2 responses with header, key-value widgets, and links - Service account pi-brain-chat created with Cloud Run invoker role - ADR-126 documents architecture, marketplace config, deployment steps Co-Authored-By: claude-flow <ruv@ruv.net>
- Add 'text' field to all Chat card responses (required for HTTP endpoint mode) - Parse Chat events from raw bytes for resilience against unknown fields - Log raw payload on parse failure for debugging - Return helpful fallback text on malformed events Co-Authored-By: claude-flow <ruv@ruv.net>
…c reasoning Add autonomous Gist publishing for novel discoveries with novelty gates, enhanced cognitive tick loop (60s lightweight + 5min full cycle), expanded symbolic reasoning with cross-domain inference, and dashboard UI improvements. Co-Authored-By: claude-flow <ruv@ruv.net>
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pi@ruv.iosender)src/notify.rsmodule: rate-limited notifications, styled HTML templates, open tracking pixel, unsubscribe links/v1/notify/*routes: test, status, send, welcome, help, digest, pixel, opensbrain-daily-digestjob at 8 AM PT for autonomous discovery emailsChanges
crates/mcp-brain-server/src/notify.rs— new Resend HTTP client (500 lines)crates/mcp-brain-server/src/routes.rs— 8 handlers + tracking pixel endpointcrates/mcp-brain-server/src/types.rs—notifierfield on AppStatecrates/mcp-brain-server/src/lib.rs— module registrationdocs/adr/ADR-125-resend-email-brain-integration.md— full ADRInfrastructure Already Deployed
RESEND_API_KEYsecret mounted on Cloud Runbrain-daily-digestscheduler job activeTest plan
cargo check -p mcp-brain-serverpasses/v1/notify/testreturns 200/v1/notify/pixel/:idreturns 1x1 GIF/v1/notify/opensreturns open rate stats🤖 Generated with claude-flow