feat(contact): choose future email delivery - #510
Merged
Merged
Conversation
Reuse shared test infrastructure and keep Screened Out terminal in the contact smoke lifecycle so denial cannot mask later checks.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Ordinary command help omits several required delivery semantics currently present only in agent metadata.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds contact-first delivery routing for HEY contacts.
Changes:
- Adds
hey contact deliverwith four validated destinations. - Adds unit and smoke coverage.
- Updates CLI, API, command-surface, and agent documentation.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
.surface |
Records the new command and flag. |
API-COVERAGE.md |
Maps delivery API operations. |
docs/cli.md |
Documents routing behavior. |
docs/plans/2026-09-27-0116-feat-contact-delivery-routing-plan.md |
Defines the implementation plan. |
internal/cmd/contacts.go |
Registers the subcommand. |
internal/cmd/contacts_deliver.go |
Implements contact delivery routing. |
internal/cmd/contacts_deliver_test.go |
Tests validation and API behavior. |
internal/cmd/help_test.go |
Updates contact help expectations. |
skills/embed_test.go |
Verifies embedded guidance. |
skills/hey/SKILL.md |
Documents the command for agents. |
tests/smoke/contacts_test.go |
Adds real-server smoke coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
robzolkos
requested
a balanced review from Copilot
and removed request for
a team
September 27, 2026 13:18
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.



Summary
HEY contacts can now be sent to the Imbox, The Feed, Paper Trail, or Screened Out from the CLI. This gives scripts and coding agents the same delivery control as the web app without relying on box display names or an unreliable read-back.
The command validates its contact ID and closed destination vocabulary before account selection can make an HTTP request. Box destinations resolve HEY's canonical box kinds; Screened Out first confirms that the contact is an external email sender. The result is a stable
{id, destination}mutation response, and the CLI guide, API coverage, command surface, and bundled HEY skill describe the same contract.Selecting The Feed may remove an existing bundle, matching HEY's server behavior. Assigning a box does not implicitly approve a denied sender.
Validation
make checkmake buildFixes #336.
Summary by cubic
Adds
hey contact deliver <contact-id> --to imbox|feed|papertrail|screened-outso the CLI can set where a contact's future email arrives, giving scripts and agents the same delivery control as the web app. Fixes #336.{id, destination}result; the command is write-only because HEY does not expose the current setting as structured data.Written for commit b7448f9. Summary will update on new commits.