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
{{ message }}
Repository navigation
Send a reply as your own address, and keep a draft's sender on update_message - #665
hey-sdk v0.35.1 answers the identity a draft sends as (DraftSentAs: its
sender, else its creator) and builds a whole revision from an edit state
(DraftContentFromEdit). hey draft edit and send, draft show, and
send_draft's snapshot use them, and the copies here go.
Changes to what gets sent:
A reply goes out as the person's own address when HEY names no other
sender, instead of the account's default sender. HEY names a reply's
sender in the prefill only when it differs from the person's own contact;
the zero this used to pass left the SDK on the account's default sender,
which need not be that address. A reply now takes the prefill's sender,
else its creator (ReplySentAs).
hey mcp's update_message with no acting_sender_id now keeps the
draft's sender instead of moving it to the account address. HEY revises
a draft from the whole request and drops the sender from one without acting_sender_id, so an update used to move a draft saved from a shared
or alternate address to the account's own. An update that leaves it out
now gets the identity the draft was saved as, read from its edit state;
when that can't be read, or the edit page HEY answers isn't the draft's own (a sent or deleted draft redirects to the Imbox), nothing is changed. A sender the caller chose is
kept, and describe's update_message schema no longer requires acting_sender_id (create_message and create_reply still do).
Pins github.com/basecamp/hey-sdk/go to v0.35.1; the Nix vendorHash follows
go.sum. The vendored MCP model is already from v0.35.1's commit.
Changelog: Replies go out from your own address when HEY names no other
sender, rather than the account's default sender; hey mcp update_message
keeps a draft's sender when no acting_sender_id is given.
…essage
hey-sdk v0.35.1 answers the identity a draft sends as (DraftSentAs: its
sender, else its creator) and builds a whole revision from an edit state
(DraftContentFromEdit). hey draft edit and send, draft show, and send_draft's
snapshot use them, and the copies here go.
A reply now goes out as the prefill's sender, else its creator (ReplySentAs):
HEY names a reply's sender only when it differs from the person's own
contact, and the zero this used to pass left the SDK on the account's default
sender, which need not be that address.
hey mcp's update_message passed the caller's params straight to HEY, which
revises a draft from the whole request and drops a draft's sender from one
without acting_sender_id, moving a draft saved from a shared or alternate
address to the account's own. An update that leaves it out now gets the
identity the draft was saved as, read from its edit state; when that can't be
read, nothing is changed. A sender the caller chose is kept.
The draft-sender helpers this branch adopts shipped in hey-sdk go/v0.35.1;
go.mod takes the tag in place of its pre-release commit, the vendored MCP
model's provenance names the tag it was synced from, and the Nix vendorHash
follows go.sum.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Live verification against an authorized HEY server is still needed to confirm actual From selection and persisted MCP draft sender preservation, which mocked tests and existing smoke cases do not establish.
No open issues 🎉
What changed in this PR
This PR corrects sender selection for replies and MCP draft updates, using shared SDK helpers to keep identity handling consistent across the CLI and MCP server.
Changes:
Use the reply creator’s address when HEY supplies no explicit sender.
Preserve a draft’s saved sender during MCP updates unless explicitly overridden; refuse the update if that identity cannot be read.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
File
Description
nix/package.nix
Updates the dependency vendor hash.
internal/mcpserver/send.go
Uses the SDK sender helper for draft snapshots.
internal/mcpserver/param_contract_test.go
Accommodates the sender lookup in parameter tests.
internal/mcpserver/model/PROVENANCE.json
Records SDK v0.35.1 model provenance.
internal/mcpserver/model/openapi.json
Clarifies that scheduling dates and hours use UTC.
internal/mcpserver/drafts.go
Preserves saved senders and documents update behavior.
internal/mcpserver/drafts_test.go
Covers sender preservation, overrides, and lookup failures.
internal/mcpserver/dispatch.go
Applies sender preservation before draft updates.
internal/mail/reply_prefill.go
Resolves reply identity through the SDK helper.
internal/mail/reply_prefill_test.go
Tests creator fallback when no sender is supplied.
HEY answers the edit page of a sent or deleted draft by redirecting to the
Imbox, and the client follows it, so update_message could read a sender or
creator off a page that isn't the draft and revise with it. The identity is
now taken only from an answer that is the draft's own; anything else is
refused with nothing changed, as an unreadable one is.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The update_message schema still requires acting_sender_id, forcing schema-following callers to choose a sender rather than omit it to preserve the saved one.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Make acting_sender_id optional for message updates
internal/mcpserver/drafts.go:241
The schema returned by describe update_message still requires acting_sender_id: UpdateMessage uses CreateMessageRequestContent, and draftBody preserves its required list. Schema-following callers must therefore choose a sender instead of omitting it to preserve the saved one. Remove this requirement for UpdateMessage only, keep it for creation operations, and assert that distinction in the describe-contract test.
The model gives UpdateMessage CreateMessage's body, which requires
acting_sender_id, so describe told a caller following the schema to choose a
sender, and the update that keeps the draft's own was one it would never
send. update_message's body no longer requires it; create_message and
create_reply still do.
Fixed — the review's finding that describe still required acting_sender_id for update_message: the model gives UpdateMessage CreateMessage's body, so holdToDrafts now drops acting_sender_id from update_message's required list only, and TestDescribeServesTheDraftOnlyContract asserts update_message doesn't require it while create_message and create_reply still do (01b8b51). basecamp/hey-mcp-server#78 had the same schema and gets the same change.
Review threads: none open.
Review bodies: 1 finding answered (1 fixed).
Fixed from a review body: update_message's schema required acting_sender_id, now optional for updates only (01b8b51).
Also fixed, carried from basecamp/hey-mcp-server#78's review: the saved sender is read only from the draft's own edit page (12212c4).
Not reported on 01b8b51: Copilot, re-requested once on this PR (it reviewed 12212c4).
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
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.
hey-sdk v0.35.1 answers the identity a draft sends as (
DraftSentAs: itssender, else its creator) and builds a whole revision from an edit state
(
DraftContentFromEdit).hey draft editandsend,draft show, andsend_draft's snapshot use them, and the copies here go.
Changes to what gets sent:
sender, instead of the account's default sender. HEY names a reply's
sender in the prefill only when it differs from the person's own contact;
the zero this used to pass left the SDK on the account's default sender,
which need not be that address. A reply now takes the prefill's sender,
else its creator (
ReplySentAs).hey mcp's update_message with noacting_sender_idnow keeps thedraft's sender instead of moving it to the account address. HEY revises
a draft from the whole request and drops the sender from one without
acting_sender_id, so an update used to move a draft saved from a sharedor alternate address to the account's own. An update that leaves it out
now gets the identity the draft was saved as, read from its edit state;
when that can't be read, or the edit page HEY answers isn't the draft's own (a sent or deleted draft redirects to the Imbox), nothing is changed. A sender the caller chose is
kept, and describe's update_message schema no longer requires
acting_sender_id(create_message and create_reply still do).Pins github.com/basecamp/hey-sdk/go to v0.35.1; the Nix vendorHash follows
go.sum. The vendored MCP model is already from v0.35.1's commit.
Changelog: Replies go out from your own address when HEY names no other
sender, rather than the account's default sender;
hey mcpupdate_messagekeeps a draft's sender when no
acting_sender_idis given.