Repository navigation
feat(email-core): add bcc to create_draft and update_draft - #215
Merged
Merged
Conversation
Accept bcc: string[] on create_draft and update_draft (new drafts and the reply path) and as a body-file frontmatter key. On reply drafts, providers drop Bcc addresses from the derived To/Cc so a participant can be moved to Bcc. send_draft keeps gating bcc against the allowlist. Refs #214
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Oct 16, 2026
stevenobiajulu
added a commit
that referenced
this pull request
Oct 16, 2026
Releases #215 (bcc on create_draft and update_draft), which landed on main after the 0.3.3 tag. Agents run the installed server, not main, so bcc stays unavailable until this ships.
stevenobiajulu
added a commit
that referenced
this pull request
Oct 16, 2026
The change shipped in #215. Archiving folds its Draft Bcc Recipients requirement into the email-write spec.
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.
Closes #214.
What
create_draftandupdate_draftnow acceptbcc: string[](bare or name-address form), on new drafts and on the reply path. Microsoft Graph writesbccRecipients; Gmail writes aBccheader.bccis also a recognized body-file frontmatter key. Providers,ComposeMessage/ReplyOptions, the draft preview, and thesend_draftallowlist gate already carried bcc, so most of this is the input surface.Behavior choices worth reviewing
createReplyAll(and Gmail's derived recipients) would keep the introducer on To/Cc and add them to Bcc, so they'd stay visible. Both providers now remove Bcc addresses (case-insensitive) from the To/Cc they derive. Gmail omits theTo:header if that empties it. Graph only patchestoRecipients/ccRecipientswhen something actually has to come off, so the no-bcc path sends the same PATCH as before.bccandto/ccin one call returnsBCC_RECIPIENT_CONFLICT(recoverable).update_draftread-back warning.update_draftwith onlybcccan't see the draft's existing To/Cc. If the persisted preview still shows a Bcc address on To/Cc, the response carries aBCC_RECIPIENT_ALSO_VISIBLEwarning.bccreplaces the Bcc line,[]clears it, and omitting it keeps it.send_emailrefusesbccfrontmatter (BCC_NOT_SUPPORTED). It sharesresolveComposeFields, has no bcc input, and its allowlist covers only to/cc. Without the refusal, a body file meant forcreate_draftwould send with no Bcc and no error.send_draftalready gates stored To/Cc/Bcc. New tests cover bcc set through bothcreate_draftandupdate_draftbeing blocked at send time.Tests
draft.test.ts, newDraft Bcc Recipients (issue #214)block): new draft, omitted bcc, reply-all move-to-bcc, derived-recipient removal, conflict, invalid address, frontmatter, thesend_emailrefusal, update set/keep/clear, the visibility warning, and thesend_draftallowlist for both create and update paths.frontmatter.test.ts:bcclist and single-value parsing.Bccheader emitted and removed from derived To/Cc; emptyToomitted.[]when needed, explicitto+ bcc keeps the displaced participant off Cc.npm run build,npm run lint, the full workspacetest:run(all green),check:spec-coverage(290/290), andopenspec validate add-draft-bcc --strictall pass.OpenSpec change:
openspec/changes/add-draft-bcc.Not done
No live real-mailbox smoke yet. This touches both providers' reply-draft recipient handling, so it's worth creating a reply-all draft with
bccagainst a real Graph and Gmail mailbox (draft only, no send) and checking it in the client before release.