@eliya-oss/agent-slack 0.1.10 → 0.1.12

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.
@@ -12,6 +12,7 @@ Non-goal for v0: agent-side summarization. The CLI returns clean context; agents
12
12
 
13
13
  - Noun-verb commands: `agent-slack conversation history`, `agent-slack thread get`, `agent-slack api call`.
14
14
  - JSON is always available with `--json`; non-TTY stdout defaults to JSON.
15
+ - Output is token-efficient by default: read commands return slim normalized shapes, and JSON is serialized compactly (no indentation). `--pretty` restores indentation; `--full` returns raw Slack objects.
15
16
  - Data goes to stdout. Progress, warnings, and errors go to stderr.
16
17
  - Every command supports `--help --json`; every group supports `describe --json`.
17
18
  - Large reads support `--cursor`, `--limit`, `--all`, and `--format ndjson`.
@@ -22,9 +23,10 @@ Non-goal for v0: agent-side summarization. The CLI returns clean context; agents
22
23
 
23
24
  ```bash
24
25
  agent-slack [--profile NAME] [--team TEAM_ID] [--token user|bot|admin|app]
25
- [--json] [--format json|ndjson|table] [--fields FIELD[,FIELD...]]
26
+ [--json] [--format json|ndjson|table] [--pretty] [--full]
27
+ [--fields FIELD[,FIELD...]]
26
28
  [--limit N] [--cursor CURSOR] [--all]
27
- [--include users,reactions,files,permalinks,threads]
29
+ [--include users,threads,permalinks]
28
30
  [--no-cache] [--trace]
29
31
  ```
30
32
 
@@ -109,7 +111,7 @@ agent-slack conversation list --types public_channel,private_channel,mpim,im [--
109
111
  agent-slack conversation get CHANNEL_ID
110
112
  agent-slack conversation members CHANNEL_ID [--all]
111
113
  agent-slack conversation history CHANNEL_ID [--oldest TS] [--latest TS] [--all]
112
- agent-slack conversation context CHANNEL_ID [--since 24h] [--include users,reactions,files,threads]
114
+ agent-slack conversation context CHANNEL_ID [--since 24h] [--include users,threads,permalinks]
113
115
  ```
114
116
 
115
117
  `conversation context` returns normalized messages, hydrated users, thread refs, file refs, reactions, and permalinks in one deterministic payload for agents.
@@ -117,7 +119,7 @@ agent-slack conversation context CHANNEL_ID [--since 24h] [--include users,react
117
119
  ### Threads and messages
118
120
 
119
121
  ```bash
120
- agent-slack thread get --channel CHANNEL_ID --ts MESSAGE_TS [--include users,reactions,files,permalinks]
122
+ agent-slack thread get --channel CHANNEL_ID --ts MESSAGE_TS [--include users,permalinks]
121
123
  agent-slack message get --channel CHANNEL_ID --ts MESSAGE_TS
122
124
  agent-slack message permalink --channel CHANNEL_ID --ts MESSAGE_TS
123
125
  ```
@@ -182,6 +184,38 @@ Rules:
182
184
 
183
185
  ## Output Contract
184
186
 
187
+ ### Serialization
188
+
189
+ JSON is serialized compactly by default (no indentation) to minimize an agent's
190
+ token cost. `--pretty` restores 2-space indentation for humans. Human TTY
191
+ rendering is unchanged.
192
+
193
+ ### Normalization
194
+
195
+ Read commands return slim normalized shapes by default, carrying the fields an
196
+ agent needs to reason and dropping Slack boilerplate. `--full` bypasses
197
+ normalization and returns the raw Slack objects.
198
+
199
+ - **message**: `user` (or `bot_id`/`username`), `ts`, `text`, and, when present,
200
+ `thread_ts`, `reply_count`, `reactions` (`[{name, count}]`), `files`
201
+ (`[{id, name, mimetype, size}]`), `subtype`, `edited`. Drops `blocks`,
202
+ `client_msg_id`, `team`, and reaction user lists.
203
+ - **user**: `id`, `name`, `real_name` (display name), and, when present,
204
+ `is_bot`, `deleted`, `title`. Drops all `image_*` URLs, `color`, `status_*`,
205
+ `tz`, and team fields.
206
+ - **file**: `id`, `name`, `mimetype`, `size`, and `permalink` when present.
207
+ Drops thumbnails and private URLs.
208
+ - **conversation**: `id`, `name`, `is_private`, `is_archived`, `topic`,
209
+ `purpose`, `num_members` when present.
210
+ - `conversation context` dedupes thread roots already present in `messages` and
211
+ hydrates every unique author, including those who appear only in replies.
212
+
213
+ ### Scope warnings
214
+
215
+ When a scope the active token lacks would make a result more complete or
216
+ efficient (for example `users:read` for author hydration), the CLI adds a
217
+ message to `warnings` instead of failing silently.
218
+
185
219
  Default JSON envelope:
186
220
 
187
221
  ```json
@@ -212,7 +246,7 @@ Structured error on stderr:
212
246
  {
213
247
  "ok": false,
214
248
  "error": {
215
- "type": "rate_limited",
249
+ "type": "SlackRateLimited",
216
250
  "title": "Slack rate limit reached",
217
251
  "slack_error": "ratelimited",
218
252
  "retriable": true,
@@ -230,7 +264,7 @@ Exit codes:
230
264
  - `2`: usage or validation error
231
265
  - `3`: not found
232
266
  - `4`: auth or permission denied
233
- - `5`: conflict or invalid Slack state
267
+ - `5`: unsafe method blocked
234
268
  - `6`: rate limited
235
269
 
236
270
  Rate-limit behavior:
@@ -264,13 +298,13 @@ Schema output includes:
264
298
  Read a thread:
265
299
 
266
300
  ```bash
267
- agent-slack thread get --channel C123 --ts 1710000000.000100 --include users,reactions,files,permalinks --json
301
+ agent-slack thread get --channel C123 --ts 1710000000.000100 --include users,permalinks --json
268
302
  ```
269
303
 
270
304
  Prepare channel-summary input:
271
305
 
272
306
  ```bash
273
- agent-slack conversation context C123 --since 24h --include users,reactions,files,threads --format ndjson
307
+ agent-slack conversation context C123 --since 24h --include users,threads,permalinks --json
274
308
  ```
275
309
 
276
310
  Search before reading:
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @eliya-oss/agent-slack
2
2
 
3
+ ## 0.1.12
4
+
5
+ ### Patch Changes
6
+
7
+ - c48375b: The CLI now starts far faster. Every invocation used to load hundreds of separate module files, dominating the run time of even quick commands like `auth status`. The CLI now ships as a single bundled file, cutting cold start from over a second to about 45ms on a typical machine.
8
+
9
+ No commands or output change.
10
+
11
+ ## 0.1.11
12
+
13
+ ### Patch Changes
14
+
15
+ - e01fe7d: Read commands now return slim, token-efficient output by default. Messages, users, files, and conversations are normalized to the fields that matter, and JSON is serialized compactly. On a real 30-day channel read this cut the payload by about 85% (6.4x smaller) with no loss of meaning.
16
+
17
+ - `--full` returns the raw Slack objects when you need them.
18
+ - `--pretty` restores indentation for humans.
19
+ - `conversation context` now hydrates authors that appear only in thread replies, and warns via `warnings` when `users:read` is missing instead of returning bare IDs.
20
+ - `thread get --include users,permalinks` now hydrates author names and per-message links (previously the flag was accepted but ignored).
21
+
22
+ Note: this changes the default output shape of read commands. Pass `--full` to get the previous raw Slack objects.
23
+
3
24
  ## 0.1.10
4
25
 
5
26
  ### Patch Changes
package/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  # agent-slack
4
4
 
5
- Slack context for AI agents via the `agent-slack` CLI.
6
- Short alias: `aslk`.
5
+ Read your Slack workspace from the command line: threads, channels, users, files, and search.
6
+ Built so your AI agents can read Slack too. Short alias: `aslk`.
7
7
 
8
8
  <pre align="center">npm install -g @eliya-oss/agent-slack</pre>
9
9