You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New notifications skill — the entry point for transactional / non-auth email. Teaches the builder how AgentLink sends app-driven email (welcome, "export ready", receipts, alerts) through the queue: api._admin_send_email → PGMQ → internal-queue-worker → internal-send-email → Resend, with public.internal_logs_email for idempotency/observability. SKILL.md covers the server-only send rule, the send API, the welcome sample + its confirmation-timing nuance, and cross-links auth (auth emails), cli (per-env Resend setup), edge-functions, and database. references/transactional-email.md is the deep dive: add-an-email recipe, the internal_logs_* convention, retry/dead-letter via read_ct, local resend-box testing, and troubleshooting. Registered in agents/builder.md (now 7 preloaded skills); auth and edge-functions SKILLs cross-link it so non-auth email is routed to the right place.
builder agent: the transactional-vs-auth email split is now spelled out at the decision layer. Two new rows in the architecture matrix (agents/builder.md) route app-driven email to api._admin_send_email(...) → internal-send-email (notifications skill) and Supabase Auth email to the _hook_send_email → internal-send-auth-email hook (auth skill, flagged a separate function). A new "Email: two paths, never crossed" subsection adds the originator litmus test (does your code decide to send it? → notifications; does an auth event trigger it? → auth hook), warns against routing auth email through api._admin_send_email or adding auth templates to the internal-send-email registry, and notes the scaffolded welcome email is deliberately a notification, not an auth hook, so it never collides with the signup confirmation.
notifications skill: migration guide for projects scaffolded before the unified email path. New section in skills/notifications/SKILL.md for older projects that shipped a dedicated internal-invite-member edge function: recommend consolidating onto the invite registry entry in internal-send-email (confirm with the user first — it removes a function and leaves an orphaned cloud deployment to delete), with exact steps (add the invite template, repoint _internal_admin_create_invitation/_resend_invitation to api._admin_send_email('invite', …) with nodedupe_key, delete the function + its config.toml block, db apply/db migrate/deploy, then supabase functions delete on cloud). Generalizes to any bespoke per-email function; notes auth emails stay on the auth hook.
Changed
Prescriptive docs migrated off the per-function invite pattern to the unified api._admin_send_email('invite') → internal-send-email path.agents/references/recipes.md (Recipe 2), skills/auth/SKILL.md (invitation RPC row + troubleshooting), skills/auth/references/rls_patterns.md, skills/edge-functions/SKILL.md (naming table + resend link), and skills/cli/references/resend.md no longer teach the standalone internal-invite-member function as the canonical invite-email path.