feat(message): Slack-native drafts — message drafts list/create/update/delete#112
Open
mikaelq wants to merge 1 commit into
Open
feat(message): Slack-native drafts — message drafts list/create/update/delete#112mikaelq wants to merge 1 commit into
mikaelq wants to merge 1 commit into
Conversation
Add 'message drafts <list|create|update|delete>' backed by Slack's undocumented drafts.* session endpoints, so agents can read and write drafts that show up natively in the user's Slack client. The existing 'message draft' browser editor is unchanged. References stablyai#83 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Implements #83 (option 1: separate plural
draftssubcommand, keeping the existingmessage draftbrowser editor unchanged).What
New
message draftssubcommand group backed by Slack's undocumenteddrafts.*session endpoints (the same API the official clients use), so agents can read and write drafts that show up natively in the user's Slack client:createaccepts the usual targets:#channel/name, channel id, user id (opens a DM), or a message URL (drafts a thread reply, same semantics asmessage send).rich_textconversion (textToRichTextBlocks), so lists/bold/code/mentions render natively.updatereplaces the body but preserves the draft's destination and attached files unless overridden; the conflict-detectionclient_last_updated_tsis auto-fetched forupdate/deletewhen omitted (including Slack's 7-digit fractional-padding quirk).listresolves channel/DM display names best-effort.later,unreads); noted in the docs.Structure
Follows the
message scheduledpattern:src/slack/drafts.ts(API layer) +src/cli/message-drafts-actions.ts/message-drafts-command.ts(CLI layer). Docs updated in README,skills/agent-slack/SKILL.md, andreferences/commands.md.Testing
test/drafts.test.ts(wire payloads, ts padding, parsing, auto-fetch/error paths); full suite, typecheck, lint, and format all pass.Closes #83
🤖 Generated with Claude Code