agent-slack 0.2.14 → 0.4.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 +88 -13
- package/dist/index.js +2902 -548
- package/dist/index.js.map +31 -21
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -7,17 +7,9 @@ Guiding principle:
|
|
|
7
7
|
- **token-efficient output by default** (compact JSON, minimal duplication, and empty/null fields pruned) so LLMs can consume results cheaply.
|
|
8
8
|
- **zero-config auth** -- Auth just works if you have Slack Desktop (with fallbacks available). No Python dependency.
|
|
9
9
|
|
|
10
|
-
##
|
|
11
|
-
|
|
12
|
-
- **Read**: fetch a message, browse channel history, list full threads
|
|
13
|
-
- **Search**: messages + files (with filters)
|
|
14
|
-
- **Artifacts**: auto-download snippets/images/files to local paths for agents
|
|
15
|
-
- **Write**: reply in thread, add reactions
|
|
16
|
-
- **Canvas**: fetch Slack canvases as Markdown
|
|
10
|
+
## Getting started
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
Recommended (Bun install script):
|
|
12
|
+
Install via Bun (recommended):
|
|
21
13
|
|
|
22
14
|
```bash
|
|
23
15
|
curl -fsSL https://raw.githubusercontent.com/stablyai/agent-slack/master/install.sh | sh
|
|
@@ -29,6 +21,15 @@ OR npm global install (requires Node >= 22.5):
|
|
|
29
21
|
npm i -g agent-slack
|
|
30
22
|
```
|
|
31
23
|
|
|
24
|
+
## At a glance
|
|
25
|
+
|
|
26
|
+
- **Read**: fetch a message, browse channel history, list full threads
|
|
27
|
+
- **Search**: messages + files (with filters)
|
|
28
|
+
- **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
|
+
- **Canvas**: fetch Slack canvases as Markdown
|
|
32
|
+
|
|
32
33
|
## Agent skill
|
|
33
34
|
|
|
34
35
|
This repo ships an agent skill at `skills/agent-slack/` compatible with Claude Code, Codex, Cursor, etc
|
|
@@ -60,9 +61,15 @@ agent-slack
|
|
|
60
61
|
│ ├── get <target> # fetch 1 message (+ thread meta )
|
|
61
62
|
│ ├── list <target> # fetch thread or recent channel messages
|
|
62
63
|
│ ├── send <target> <text> # send / reply (does the right thing)
|
|
64
|
+
│ ├── draft <target> [text] # open Slack-like editor in browser
|
|
65
|
+
│ ├── edit <target> <text> # edit a message
|
|
66
|
+
│ ├── delete <target> # delete a message
|
|
63
67
|
│ └── react
|
|
64
68
|
│ ├── add <target> <emoji>
|
|
65
69
|
│ └── remove <target> <emoji>
|
|
70
|
+
├── channel
|
|
71
|
+
│ ├── new # create channel
|
|
72
|
+
│ └── invite # invite users to channel
|
|
66
73
|
├── user
|
|
67
74
|
│ ├── list
|
|
68
75
|
│ └── get <user>
|
|
@@ -127,10 +134,12 @@ agent-slack message get "#general" --ts "1770165109.628379"
|
|
|
127
134
|
agent-slack message list "#general" --thread-ts "1770165109.000001"
|
|
128
135
|
```
|
|
129
136
|
|
|
130
|
-
If you have multiple workspaces configured and you use a channel **name** (`#channel` / `channel`), you must pass `--workspace` (or set `SLACK_WORKSPACE_URL`)
|
|
137
|
+
If you have multiple workspaces configured and you use a channel **name** (`#channel` / `channel`), you must pass `--workspace` (or set `SLACK_WORKSPACE_URL`).
|
|
138
|
+
`--workspace` accepts a full URL or a unique substring selector:
|
|
131
139
|
|
|
132
140
|
```bash
|
|
133
141
|
agent-slack message get "#general" --workspace "https://stablygroup.slack.com" --ts "1770165109.628379"
|
|
142
|
+
agent-slack message get "#general" --workspace "stablygroup" --ts "1770165109.628379"
|
|
134
143
|
```
|
|
135
144
|
|
|
136
145
|
## Examples
|
|
@@ -149,6 +158,12 @@ agent-slack message list "https://workspace.slack.com/archives/C123/p17000000000
|
|
|
149
158
|
|
|
150
159
|
# Recent channel messages (browse channel history)
|
|
151
160
|
agent-slack message list "#general" --limit 20
|
|
161
|
+
|
|
162
|
+
# Recent channel messages that are marked with :eyes:
|
|
163
|
+
agent-slack message list "#general" --with-reaction eyes --oldest "1770165109.000000" --limit 20
|
|
164
|
+
|
|
165
|
+
# Recent channel messages that do not have :dart:
|
|
166
|
+
agent-slack message list "#general" --without-reaction dart --oldest "1770165109.000000" --limit 20
|
|
152
167
|
```
|
|
153
168
|
|
|
154
169
|
Optional:
|
|
@@ -158,6 +173,65 @@ Optional:
|
|
|
158
173
|
agent-slack message get "https://workspace.slack.com/archives/C123/p1700000000000000" --include-reactions
|
|
159
174
|
```
|
|
160
175
|
|
|
176
|
+
### Draft a message (browser editor)
|
|
177
|
+
|
|
178
|
+
Opens a Slack-like WYSIWYG editor in your browser for composing messages with full formatting support (bold, italic, strikethrough, links, lists, quotes, code, code blocks).
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Open editor for a channel
|
|
182
|
+
agent-slack message draft "#general"
|
|
183
|
+
|
|
184
|
+
# Open editor with initial text
|
|
185
|
+
agent-slack message draft "#general" "Here's my update"
|
|
186
|
+
|
|
187
|
+
# Reply in a thread
|
|
188
|
+
agent-slack message draft "https://workspace.slack.com/archives/C123/p1700000000000000"
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
After sending, the editor shows a "View in Slack" link to the posted message.
|
|
192
|
+
|
|
193
|
+
### Reply, edit, delete, and react
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
agent-slack message send "https://workspace.slack.com/archives/C123/p1700000000000000" "I can take this."
|
|
197
|
+
agent-slack message edit "https://workspace.slack.com/archives/C123/p1700000000000000" "I can take this today."
|
|
198
|
+
agent-slack message delete "https://workspace.slack.com/archives/C123/p1700000000000000"
|
|
199
|
+
agent-slack message react add "https://workspace.slack.com/archives/C123/p1700000000000000" "eyes"
|
|
200
|
+
agent-slack message react remove "https://workspace.slack.com/archives/C123/p1700000000000000" "eyes"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Channel mode requires `--ts`:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
agent-slack message edit "#general" "Updated text" --workspace "myteam" --ts "1770165109.628379"
|
|
207
|
+
agent-slack message delete "#general" --workspace "myteam" --ts "1770165109.628379"
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Create channels and invite users
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
# Create a public channel
|
|
214
|
+
agent-slack channel new --name "incident-war-room"
|
|
215
|
+
|
|
216
|
+
# Create a private channel
|
|
217
|
+
agent-slack channel new --name "incident-leads" --private
|
|
218
|
+
|
|
219
|
+
# Invite users by id, handle, or email
|
|
220
|
+
agent-slack channel invite --channel "incident-war-room" --users "U01AAAA,@alice,bob@example.com"
|
|
221
|
+
|
|
222
|
+
# Invite external Slack Connect users by email (restricted by default)
|
|
223
|
+
agent-slack channel invite --channel "incident-war-room" --users "partner@vendor.com" --external
|
|
224
|
+
|
|
225
|
+
# External invite with permission for invitees to invite others
|
|
226
|
+
agent-slack channel invite --channel "incident-war-room" --users "partner@vendor.com" --external --allow-external-user-invites
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Notes:
|
|
230
|
+
|
|
231
|
+
- `--external` maps to `conversations.inviteShared` and expects email targets.
|
|
232
|
+
- External invites default to restricted mode (`external_limited=true`); add `--allow-external-user-invites` to disable that restriction.
|
|
233
|
+
- External invites require Slack Connect permissions/scopes in your workspace.
|
|
234
|
+
|
|
161
235
|
### Message get vs list
|
|
162
236
|
|
|
163
237
|
**`message get`** fetches a single message. If the message is in a thread, it also returns thread metadata (reply count, participants) but **not** the full thread contents:
|
|
@@ -165,7 +239,7 @@ agent-slack message get "https://workspace.slack.com/archives/C123/p170000000000
|
|
|
165
239
|
```json
|
|
166
240
|
{
|
|
167
241
|
"message": { "ts": "...", "text": "...", "user": "U123", ... },
|
|
168
|
-
"thread": { "
|
|
242
|
+
"thread": { "ts": "...", "length": 6 }
|
|
169
243
|
}
|
|
170
244
|
```
|
|
171
245
|
|
|
@@ -185,6 +259,7 @@ When to use which:
|
|
|
185
259
|
- Use `get` to check a single message or see if there's a thread worth expanding
|
|
186
260
|
- Use `list` to read an entire thread conversation
|
|
187
261
|
- Use `list` on a channel (without `--thread-ts`) to browse recent channel messages
|
|
262
|
+
- Use `list` with `--with-reaction` / `--without-reaction` plus `--oldest` to filter channel history by reaction markers
|
|
188
263
|
|
|
189
264
|
### Files (snippets/images/attachments)
|
|
190
265
|
|
|
@@ -210,7 +285,7 @@ agent-slack search files "testing" --content-type snippet --limit 10
|
|
|
210
285
|
Tips:
|
|
211
286
|
|
|
212
287
|
- For reliable results, include `--channel ...` (channel-scoped search scans history/files and filters locally).
|
|
213
|
-
- Use `--workspace
|
|
288
|
+
- Use `--workspace <url-or-unique-substring>` when using `#channel` names across multiple workspaces.
|
|
214
289
|
|
|
215
290
|
<!-- AI search (assistant.search.*) is described in design.doc but not currently implemented. -->
|
|
216
291
|
|