Skip to content

Add posting management commands - #152

Open
ivankuznetsov wants to merge 1 commit into
basecamp:mainfrom
ivankuznetsov:feat/posting-contact-actions
Open

Add posting management commands#152
ivankuznetsov wants to merge 1 commit into
basecamp:mainfrom
ivankuznetsov:feat/posting-contact-actions

Conversation

@ivankuznetsov

@ivankuznetsov ivankuznetsov commented Jul 31, 2026

Copy link
Copy Markdown

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. trash moves 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 check
  • make race-test
  • make build check-surface
  • Unit coverage for every SDK endpoint, invalid and multiple IDs, Trash, and SDK errors

Summary 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 by hey-sdk.

  • New Features
    • Commands: paper-trail, feed, set-aside, reply-later, trash, ignore (use as hey <command> <posting-id>).
    • Each command accepts exactly one posting ID to avoid partial mutations on failure.
    • trash moves to Trash only; it does not permanently delete.
    • Updated help, README, and skills/hey to mark these as state-changing and require ID confirmation and explicit approval.

Written for commit e28f857. Summary will update on new commits.

Review in cubic

Copilot AI review requested due to automatic review settings July 31, 2026 00:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_notes describe 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_notes describe 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_notes describe 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_notes describe 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_notes describe 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 {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants