#950 Email: expose mail-api send features and durable reply-wait via plus-tags
Description
EditEARS SPEC:
- tools.email.send and ctx.send_email shall accept cc, bcc, reply_to, from_name, scheduled_at, template_id, template_context, thread_id, in_reply_to and pass them to mail-api POST /api/v1/emails.
- The email tool shall set metadata {workflow_run_id, task_id, tenant_id} on every send.
- Where headers are given, the email tool shall accept only allowlisted header names; if any other header is given, then it shall fail the task.
- When scheduled_at is set and the send is resumed, the email tool shall treat status scheduled as success and shall not re-POST.
- Where reply_tag is given, the email tool shall set reply_to to highway+<tag>@mail.rodmena.co.uk; if the tag is not [a-z0-9-] of at most 48 chars, then it shall fail the task.
- tools.email.wait_reply shall durably wait (poll GET /api/v1/inbound?recipient_tag=<tag>&unconsumed=true) until a reply arrives or a timeout elapses, return the message, and ack it via POST /api/v1/inbound/{id}/ack.
- If a reply arrives before the timeout, the run shall resume; if no reply arrives within the timeout, the tool shall return timed_out (both directions tested).
- notification_hub shall regain the cc parameter removed in 4ba5d88.
- One real attachment shall be sent through mail-api and confirmed status sent.
Context: #927 follow-up. Agent wrongly claimed mail-api has no cc; mail-api SendEmailRequest schema has cc, bcc, from_name, reply_to (plus-tags on own domain), scheduled_at, template_id, headers, metadata, thread_id, in_reply_to, webhook, expires_at. Inbound supports recipient_tag filter. Out of scope: per-email webhook, expires_at.
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...