feat: Resend transactional email integration (RESEND toolpack) - #570
Open
dilandia wants to merge 1 commit into
Open
feat: Resend transactional email integration (RESEND toolpack)#570dilandia wants to merge 1 commit into
dilandia wants to merge 1 commit into
Conversation
Adds a RESEND catalog entry (TOOLPACK) with two outbound tools, mirroring the Asaas hardened spec: email_send (from/reply_to bound to the instance config, never model args; correlation ref recorded for future inbound delivery webhooks) and email_status (bounded projection of GET /emails/:id). Ships the resend vault secret type (bearer, /domains connectivity probe accepting restricted keys), the console wiring (catalog labels, config section for sender/reply-to, tool metadata, brand mark) and pt-BR/en locales. Inbound delivery events are left out on purpose: Resend signs webhooks with Svix, which the generic HMAC strategy does not verify. Also normalizes path separators in the error-catalog sweep so its path-literal exemptions hold on Windows checkouts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CzKQNp9oM3hgBBQPrrictx
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.
O que este PR adiciona
Integração nativa de e-mail transacional via Resend no catálogo de integrações, no mesmo molde do toolpack Asaas:
RESENDno catálogo (kindTOOLPACK)email_send— envia e-mail ao cliente (confirmação de agendamento, lembrete, follow-up). Invariantes de segurança espelhando o spec do Asaas:from/reply_topresos à config da instância (nunca args do modelo — prompt-injection não troca o remetente do domínio verificado do tenant); a API key flui só pro header via vault; origem fixa; https-only, sem redirects, timeout e leitura limitados. GravaIntegrationExternalRef(kindresend_email) para correlação futura de webhooks de entrega por PK.email_status— projeção limitada deGET /emails/{id}(só campos de status; nunca o HTML de volta ao contexto). HTTP 403 no envio vira a dica acionável de domínio não verificado.resendno vault — bearer, probe de conectividade em/domains, aceitandorestricted_api_key(key sending-only) como válida.tests/modules/toolpacks-resend.test.ts(allowlist fail-closed, sender preso à config, fail-closed sem credencial/from, projeção de status) + linha na tabela de decisão dosecret-type-fit+ entradas justificadas no ledger de i18n idênticas-por-design (marca própria, com bump do pino documentado).Fora de escopo (de propósito)
Webhooks inbound de entrega (delivered/bounced): o Resend assina com Svix, que a estratégia
HMAC_SHA256genérica não verifica. Fica para um follow-up com verificador Svix-aware, para o qual oIntegrationExternalRefjá gravado aqui é o pré-requisito.Nota
Inclui uma normalização de separadores de path no sweep do
error-catalogpara que as isenções por literal de caminho valham em checkouts Windows. Feliz em separar em PR próprio se preferirem.bun checkverde (10.444 pass / 0 fail, com banco).🤖 Generated with Claude Code
https://claude.ai/code/session_01CzKQNp9oM3hgBBQPrrictx