agent-slack 0.4.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -8
- package/dist/index.js +1457 -1916
- package/dist/index.js.map +25 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,8 +4,10 @@ Slack automation CLI for AI agents (TypeScript + Bun).
|
|
|
4
4
|
|
|
5
5
|
Guiding principle:
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **
|
|
7
|
+
- **Token-efficient** — (compact JSON, minimal duplication, and empty/null fields pruned) so LLMs can consume results cheaply.
|
|
8
|
+
- **Zero-config auth** — Auth just works if you have Slack Desktop (with fallbacks available). No Python dependency.
|
|
9
|
+
- **Human-in-the-loop** — When appropriate (not in CI environments), loop humans in. Ex: `message draft`
|
|
10
|
+
<img width="1228" height="741" alt="image" src="https://github.com/user-attachments/assets/92ecbb71-18ca-4516-a874-c83c154b0709" />
|
|
9
11
|
|
|
10
12
|
## Getting started
|
|
11
13
|
|
|
@@ -26,8 +28,8 @@ npm i -g agent-slack
|
|
|
26
28
|
- **Read**: fetch a message, browse channel history, list full threads
|
|
27
29
|
- **Search**: messages + files (with filters)
|
|
28
30
|
- **Artifacts**: auto-download snippets/images/files to local paths for agents
|
|
29
|
-
- **Write**: reply, edit/delete messages, add reactions
|
|
30
|
-
- **Channels**: create channels and invite users by id/handle/email
|
|
31
|
+
- **Write**: reply, edit/delete messages, add reactions (bullet lists auto-render as native Slack rich text)
|
|
32
|
+
- **Channels**: list conversations, create channels, and invite users by id/handle/email
|
|
31
33
|
- **Canvas**: fetch Slack canvases as Markdown
|
|
32
34
|
|
|
33
35
|
## Agent skill
|
|
@@ -53,17 +55,18 @@ bash ./scripts/install-skill.sh
|
|
|
53
55
|
|
|
54
56
|
```text
|
|
55
57
|
agent-slack
|
|
56
|
-
├── update
|
|
58
|
+
├── update # self-update (detects npm/bun/binary)
|
|
57
59
|
├── auth
|
|
58
60
|
│ ├── whoami
|
|
59
61
|
│ ├── test
|
|
60
62
|
│ ├── import-desktop
|
|
61
63
|
│ ├── import-chrome
|
|
64
|
+
│ ├── import-firefox
|
|
62
65
|
│ └── parse-curl
|
|
63
66
|
├── message
|
|
64
67
|
│ ├── get <target> # fetch 1 message (+ thread meta )
|
|
65
68
|
│ ├── list <target> # fetch thread or recent channel messages
|
|
66
|
-
│ ├── send <target> <text> # send / reply (
|
|
69
|
+
│ ├── send <target> <text> # send / reply (supports --attach)
|
|
67
70
|
│ ├── draft <target> [text] # open Slack-like editor in browser
|
|
68
71
|
│ ├── edit <target> <text> # edit a message
|
|
69
72
|
│ ├── delete <target> # delete a message
|
|
@@ -71,6 +74,7 @@ agent-slack
|
|
|
71
74
|
│ ├── add <target> <emoji>
|
|
72
75
|
│ └── remove <target> <emoji>
|
|
73
76
|
├── channel
|
|
77
|
+
│ ├── list # list conversations (user-scoped or all)
|
|
74
78
|
│ ├── new # create channel
|
|
75
79
|
│ └── invite # invite users to channel
|
|
76
80
|
├── user
|
|
@@ -94,7 +98,7 @@ Notes:
|
|
|
94
98
|
On macOS, authentication happens automatically:
|
|
95
99
|
|
|
96
100
|
- Default: reads Slack Desktop local data (no need to quit Slack)
|
|
97
|
-
-
|
|
101
|
+
- Fallbacks: if that fails, tries Chrome/Firefox extraction
|
|
98
102
|
|
|
99
103
|
You can also run manual imports:
|
|
100
104
|
|
|
@@ -102,6 +106,7 @@ You can also run manual imports:
|
|
|
102
106
|
agent-slack auth whoami
|
|
103
107
|
agent-slack auth import-desktop
|
|
104
108
|
agent-slack auth import-chrome
|
|
109
|
+
agent-slack auth import-firefox
|
|
105
110
|
agent-slack auth test
|
|
106
111
|
```
|
|
107
112
|
|
|
@@ -197,6 +202,7 @@ After sending, the editor shows a "View in Slack" link to the posted message.
|
|
|
197
202
|
|
|
198
203
|
```bash
|
|
199
204
|
agent-slack message send "https://workspace.slack.com/archives/C123/p1700000000000000" "I can take this."
|
|
205
|
+
agent-slack message send "#alerts-staging" "here's the report" --attach ./report.md
|
|
200
206
|
agent-slack message edit "https://workspace.slack.com/archives/C123/p1700000000000000" "I can take this today."
|
|
201
207
|
agent-slack message delete "https://workspace.slack.com/archives/C123/p1700000000000000"
|
|
202
208
|
agent-slack message react add "https://workspace.slack.com/archives/C123/p1700000000000000" "eyes"
|
|
@@ -210,9 +216,22 @@ agent-slack message edit "#general" "Updated text" --workspace "myteam" --ts "17
|
|
|
210
216
|
agent-slack message delete "#general" --workspace "myteam" --ts "1770165109.628379"
|
|
211
217
|
```
|
|
212
218
|
|
|
213
|
-
|
|
219
|
+
Attach options for `message send`:
|
|
220
|
+
|
|
221
|
+
- `--attach <path>` upload a local file (repeatable)
|
|
222
|
+
|
|
223
|
+
### List, create, and invite channels
|
|
214
224
|
|
|
215
225
|
```bash
|
|
226
|
+
# List conversations for current user (users.conversations)
|
|
227
|
+
agent-slack channel list
|
|
228
|
+
|
|
229
|
+
# List conversations for a specific user
|
|
230
|
+
agent-slack channel list --user "@alice" --limit 50
|
|
231
|
+
|
|
232
|
+
# List all workspace conversations (conversations.list)
|
|
233
|
+
agent-slack channel list --all --limit 100
|
|
234
|
+
|
|
216
235
|
# Create a public channel
|
|
217
236
|
agent-slack channel new --name "incident-war-room"
|
|
218
237
|
|
|
@@ -231,6 +250,8 @@ agent-slack channel invite --channel "incident-war-room" --users "partner@vendor
|
|
|
231
250
|
|
|
232
251
|
Notes:
|
|
233
252
|
|
|
253
|
+
- `channel list` returns a single page plus `next_cursor`; use `--cursor` to fetch the next page.
|
|
254
|
+
- `channel list --all` and `channel list --user` are mutually exclusive.
|
|
234
255
|
- `--external` maps to `conversations.inviteShared` and expects email targets.
|
|
235
256
|
- External invites default to restricted mode (`external_limited=true`); add `--allow-external-user-invites` to disable that restriction.
|
|
236
257
|
- External invites require Slack Connect permissions/scopes in your workspace.
|