From 898a0f84a1a8d668b0a8bf3c5a330930cf6ab396 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Sat, 30 May 2026 10:46:29 -0700 Subject: [PATCH] feat(message): schedule Slack messages --- README.md | 36 ++- llms.txt | 2 +- skills/agent-slack/SKILL.md | 26 +- skills/agent-slack/references/commands.md | 19 ++ skills/agent-slack/references/output.md | 11 + src/cli/message-actions.ts | 50 +++- src/cli/message-command.ts | 28 ++- src/cli/message-scheduled-actions.ts | 100 ++++++++ src/cli/message-scheduled-command.ts | 67 ++++++ src/slack/scheduled-messages.ts | 277 ++++++++++++++++++++++ test/message-send.test.ts | 234 ++++++++++++++++++ 11 files changed, 841 insertions(+), 9 deletions(-) create mode 100644 src/cli/message-scheduled-actions.ts create mode 100644 src/cli/message-scheduled-command.ts create mode 100644 src/slack/scheduled-messages.ts diff --git a/README.md b/README.md index a70b9e3..82d6b64 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ nix run github:stablyai/agent-slack - **Read**: fetch a message, browse channel history, list full threads - **Search**: messages + files (with filters) - **Artifacts**: auto-download snippets/images/files to local paths for agents -- **Write**: reply, edit/delete messages, add reactions (bullet lists auto-render as native Slack rich text) +- **Write**: send now or schedule delivery, edit/delete messages, add reactions (bullet lists auto-render as native Slack rich text) - **Channels**: list conversations, create channels, and invite users by id/handle/email - **Canvas**: fetch Slack canvases as Markdown @@ -73,7 +73,10 @@ agent-slack ├── message │ ├── get # fetch 1 message (+ thread meta ) │ ├── list # fetch thread or recent channel messages -│ ├── send [text] # send / reply (supports --attach, --blocks, --reply-broadcast) +│ ├── send [text] # send / reply / schedule (supports --attach, --blocks) +│ ├── scheduled +│ │ ├── list # list pending scheduled messages +│ │ └── cancel # cancel a pending scheduled message │ ├── draft [text] # open Slack-like editor in browser │ ├── edit # edit a message │ ├── delete # delete a message @@ -219,6 +222,8 @@ After sending, the editor shows a "View in Slack" link to the posted message. ```bash agent-slack message send "https://workspace.slack.com/archives/C123/p1700000000000000" "I can take this." agent-slack message send "#alerts-staging" "here's the report" --attach ./report.md +agent-slack message send "#announcements" "Deploy starts at 6pm." --schedule "" +agent-slack message send "U05BRPTKL6A" "Heads up before standup" --schedule-in "monday 9am" agent-slack message edit "https://workspace.slack.com/archives/C123/p1700000000000000" "I can take this today." agent-slack message delete "https://workspace.slack.com/archives/C123/p1700000000000000" agent-slack message react add "https://workspace.slack.com/archives/C123/p1700000000000000" "eyes" @@ -239,6 +244,8 @@ Send options for `message send`: - `--attach ` upload a local file (repeatable; `` is optional when attaching files) - `--blocks ` send raw [Block Kit](https://docs.slack.dev/block-kit/) blocks from a JSON file (or `-` for stdin). Bypasses the automatic markdown-to-rich-text conversion, unlocking header/divider/section/table blocks and other structured layouts. Cannot be combined with `--attach`. - `--reply-broadcast` when replying in a thread, also post the reply to the parent channel (Slack's "Also send to #channel" checkbox). For channel targets, pair with `--thread-ts`; for URL targets, the thread context is derived from the message. Not supported for DM targets; cannot be combined with `--attach`. +- `--schedule