Restrict posting actions to email threads
Summary
hey move, hey trash, and hey ignore now require the exact flag --kind topic. Missing and non-email kinds fail before config, authentication, or any SDK request, while existing bulk-ID behavior stays unchanged.
Fresh main already contains the posting actions from #173, #175, and #176. This rebase drops PR #152's superseded command implementations and applies only the email-thread safety guard to the current commands. The CLI does not manage HEY World posts.
Validation
make fmt-checkmake vetgo test ./internal/...make tidy-checkmake check-surfacego test -race -count=1 ./internal/...make build- A malformed-config regression proves kind validation runs before root setup
- Compound Engineering review completed; its
idversustopic_idwording finding was fixed and regression-tested
Risk
--kind is a caller-supplied safety assertion, not an authorization boundary. The server remains responsible for rejecting an ID that is invalid for an action.
Summary by cubic
Restricts move, trash, and ignore to email threads and fails fast on non-email kinds. Previously these commands ran with any box item ID; now they require --kind topic and reject world/post and other kinds before config, auth, or any request.
- Callers must pass
--kind topicwith box item IDs (id) forhey move,hey trash, andhey ignore.spamandstop-ignoringare unchanged. - Adds
emailPostingArgsto validate the kind early and return clearer errors, including a specific message for HEY World posts. - Updates CLI help, README,
.surface, breadcrumbs, and examples to show--kind topic; help notes clarify usingidvstopic_idand how to sourceidfrom box/label/search JSON. - Adds unit tests verifying early kind validation (even with malformed config) and updated help content.