Add posting management commands - #152
Open
ivankuznetsov wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds six single-posting management commands backed by the HEY SDK.
Changes:
- Adds routing, trash, and ignore commands.
- Adds unit tests and CLI surface entries.
- Updates README, help, and agent guidance.
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.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
skills/hey/SKILL.md |
Documents commands and approval requirements. |
README.md |
Adds usage examples. |
internal/cmd/root.go |
Registers the commands. |
internal/cmd/posting_actions.go |
Implements posting actions. |
internal/cmd/posting_actions_test.go |
Adds mocked endpoint tests. |
internal/cmd/help.go |
Adds commands to curated help. |
.surface |
Updates the CLI surface snapshot. |
Comments suppressed due to low confidence (5)
internal/cmd/posting_actions.go:81
- The help text and machine-readable
agent_notesdescribe multiple postings/IDs, but this command accepts exactly one. This contradicts the command's cardinality contract and can mislead users or agents into attempting a batch; make both descriptions singular.
"Move postings to Trash",
"moved to Trash",
"State-changing action. Confirm the exact posting IDs and obtain explicit user approval before moving each posting to Trash.",
internal/cmd/posting_actions.go:105
- The help text and machine-readable
agent_notesdescribe multiple postings/IDs, but this command accepts exactly one. This contradicts the command's cardinality contract and can mislead users or agents into attempting a batch; make both descriptions singular.
"Move postings to Set Aside",
"moved to Set Aside",
"State-changing action. Confirm the exact posting IDs and obtain explicit user approval before moving each posting to Set Aside.",
internal/cmd/posting_actions.go:93
- The help text and machine-readable
agent_notesdescribe multiple postings/IDs, but this command accepts exactly one. This contradicts the command's cardinality contract and can mislead users or agents into attempting a batch; make both descriptions singular.
"Move postings to The Feed",
"moved to The Feed",
"State-changing action. Confirm the exact posting IDs and obtain explicit user approval before moving each posting to The Feed.",
internal/cmd/posting_actions.go:118
- The help text and machine-readable
agent_notesdescribe multiple postings/IDs, but this command accepts exactly one. This contradicts the command's cardinality contract and can mislead users or agents into attempting a batch; make both descriptions singular.
"Move postings to Reply Later",
"moved to Reply Later",
"State-changing action. Confirm the exact posting IDs and obtain explicit user approval before moving each posting to Reply Later.",
internal/cmd/posting_actions.go:131
- The help text and machine-readable
agent_notesdescribe multiple postings/IDs, but this command accepts exactly one. This contradicts the command's cardinality contract and can mislead users or agents into attempting a batch; make both descriptions singular.
"Ignore postings",
"ignored",
"State-changing action. Confirm the exact posting IDs and obtain explicit user approval before ignoring each posting.",
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+65
to
+67
| "Move postings to Paper Trail", | ||
| "moved to Paper Trail", | ||
| "State-changing action. Confirm the exact posting IDs and obtain explicit user approval before moving each posting to Paper Trail.", |
| runSingle func(context.Context, int64) error | ||
| } | ||
|
|
||
| func newPostingActionCommand(name, short, pastTense, agentNotes string, runSingle func(context.Context, int64) error, aliases ...string) *postingActionCommand { |
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 users and automation can now move or ignore an existing posting directly from the CLI. The new commands expose the posting-management operations already supported by
hey-sdk:hey paper-trail <posting-id>hey feed <posting-id>hey set-aside <posting-id>hey reply-later <posting-id>hey trash <posting-id>hey ignore <posting-id>Each invocation accepts exactly one posting ID. This keeps state-changing results unambiguous: a failed command cannot hide earlier mutations from the same batch.
trashmoves a posting to Trash; it does not permanently delete it.The bundled HEY skill marks these operations as state-changing and tells agents to verify the posting ID and obtain explicit user approval before execution.
Validation
make checkmake race-testmake build check-surfaceSummary by cubic
Adds CLI commands to move or ignore a single posting, enabling mailbox routing directly from
hey. This gives users and automation clear, one-at-a-time actions backed byhey-sdk.paper-trail,feed,set-aside,reply-later,trash,ignore(use ashey <command> <posting-id>).trashmoves to Trash only; it does not permanently delete.skills/heyto mark these as state-changing and require ID confirmation and explicit approval.Written for commit e28f857. Summary will update on new commits.