@eliya-oss/agent-slack 0.1.5 → 0.1.7
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/.agents/cli-api.md +11 -11
- package/CHANGELOG.md +13 -1
- package/README.md +4 -4
- package/dist/application/commands.js +2 -2
- package/dist/cli/metadata.js +25 -25
- package/dist/output/envelope.js +1 -1
- package/dist/output/human.js +1 -1
- package/package.json +1 -1
- package/skills/agent-slack/SKILL.md +7 -7
package/.agents/cli-api.md
CHANGED
|
@@ -50,12 +50,12 @@ agent-slack auth logout --profile work
|
|
|
50
50
|
|
|
51
51
|
Auth behavior:
|
|
52
52
|
|
|
53
|
-
- Primary setup: `agent-slack auth login` uses the bundled Agent Slack public Client ID, opens Slack in the browser with PKCE, and stores a local
|
|
54
|
-
- Users can also provide an existing
|
|
53
|
+
- Primary setup: `agent-slack auth login` uses the bundled Agent Slack public Client ID, opens Slack in the browser with PKCE, and stores a local Slack profile.
|
|
54
|
+
- Users can also provide an existing Slack bot token with `--token`.
|
|
55
55
|
- A normal user should not create a Slack app or provide client credentials.
|
|
56
|
-
- Developer fallback: OAuth mode can use
|
|
57
|
-
- OAuth opens the Slack OAuth URL in the default browser by default. Use `--no-open` to print the URL only, or `--auth-url-out PATH` for headless agents
|
|
58
|
-
- PKCE uses `user_scope=...`;
|
|
56
|
+
- Developer fallback: OAuth mode can use Slack app credentials. The **Client ID** and **Client Secret** come from the Slack app's **Basic Information > App Credentials** section.
|
|
57
|
+
- OAuth opens the Slack OAuth URL in the default browser by default. Use `--no-open` to print the URL only, or `--auth-url-out PATH` for headless agents.
|
|
58
|
+
- PKCE uses `user_scope=...`; OAuth with app credentials uses `scope=...` for bot scopes.
|
|
59
59
|
- Default local callback: `http://localhost:45454/oauth/slack/callback`.
|
|
60
60
|
- Stores profiles outside the project directory. The default store is `~/.config/agent-slack/profiles.json`; set `AGENT_SLACK_TOKEN_STORE=keychain` on macOS to keep token secrets in Keychain and only profile metadata on disk.
|
|
61
61
|
- Supports multiple profiles and workspaces.
|
|
@@ -111,7 +111,7 @@ agent-slack conversation history CHANNEL_ID [--oldest TS] [--latest TS] [--all]
|
|
|
111
111
|
agent-slack conversation context CHANNEL_ID [--since 24h] [--include users,reactions,files,threads]
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
`conversation context`
|
|
114
|
+
`conversation context` returns normalized messages, hydrated users, thread refs, file refs, reactions, and permalinks in one deterministic payload for agents.
|
|
115
115
|
|
|
116
116
|
### Threads and messages
|
|
117
117
|
|
|
@@ -172,8 +172,8 @@ cat payload.json | agent-slack api call conversations.history -
|
|
|
172
172
|
|
|
173
173
|
Rules:
|
|
174
174
|
|
|
175
|
-
- `--payload`, `@file`, and `-` pass
|
|
176
|
-
- Convenience flags may be added later, but
|
|
175
|
+
- `--payload`, `@file`, and `-` pass JSON matching Slack's API fields.
|
|
176
|
+
- Convenience flags may be added later, but JSON payloads keep full Web API coverage.
|
|
177
177
|
- `--raw` returns Slack's exact response body.
|
|
178
178
|
- Without `--raw`, responses use the CLI envelope below.
|
|
179
179
|
- `--all --format ndjson` streams item records for cursor-paginated methods.
|
|
@@ -252,7 +252,7 @@ Schema output includes:
|
|
|
252
252
|
|
|
253
253
|
- command description and examples
|
|
254
254
|
- positional args and flags
|
|
255
|
-
-
|
|
255
|
+
- payload schema when known
|
|
256
256
|
- required Slack method/scopes
|
|
257
257
|
- output schema
|
|
258
258
|
- pagination behavior
|
|
@@ -286,8 +286,8 @@ agent-slack api call some.newMethod --payload @request.json --json
|
|
|
286
286
|
|
|
287
287
|
## Build Order
|
|
288
288
|
|
|
289
|
-
1.
|
|
290
|
-
2. Generic `api call`,
|
|
289
|
+
1. Slack profiles, keychain storage, and `auth test/status/scopes`.
|
|
290
|
+
2. Generic `api call`, JSON payload input, JSON envelope, structured errors.
|
|
291
291
|
3. `describe --json` and generated method catalog.
|
|
292
292
|
4. Conversation, thread, user, file, and search convenience commands.
|
|
293
293
|
5. Agent context commands with hydration and NDJSON streaming.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @eliya-oss/agent-slack
|
|
2
2
|
|
|
3
|
+
## 0.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Polish CLI, README, bundled skill, and agent docs copy.
|
|
8
|
+
|
|
9
|
+
## 0.1.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Clean up the command catalog output-mode copy.
|
|
14
|
+
|
|
3
15
|
## 0.1.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -12,7 +24,7 @@
|
|
|
12
24
|
|
|
13
25
|
- Add Slack PKCE browser login.
|
|
14
26
|
|
|
15
|
-
No-flag `auth login` now uses the bundled Agent Slack public Client ID with Slack OAuth PKCE for browser
|
|
27
|
+
No-flag `auth login` now uses the bundled Agent Slack public Client ID with Slack OAuth PKCE for browser login without a client secret. Token setup and OAuth with app credentials remain available for bot-token, development, and self-hosted workflows.
|
|
16
28
|
|
|
17
29
|
## 0.1.3
|
|
18
30
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Agent Slack
|
|
4
4
|
|
|
5
|
-
Slack context for AI agents
|
|
5
|
+
Slack context for AI agents via the `agent-slack` CLI.
|
|
6
6
|
Short alias: `aslk`.
|
|
7
7
|
|
|
8
8
|
```bash
|
|
@@ -31,7 +31,7 @@ Browser login:
|
|
|
31
31
|
agent-slack auth login
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
Agent Slack opens Slack in the browser with PKCE and stores a local
|
|
34
|
+
Agent Slack opens Slack in the browser with PKCE and stores a local Slack profile. Users do not create Slack apps or handle Slack client secrets.
|
|
35
35
|
|
|
36
36
|
Token setup:
|
|
37
37
|
|
|
@@ -43,10 +43,10 @@ Developer/self-hosted fallback:
|
|
|
43
43
|
|
|
44
44
|
1. Create a Slack app at <https://api.slack.com/apps>.
|
|
45
45
|
2. Add the needed scopes under **OAuth & Permissions**.
|
|
46
|
-
3. Install it to your workspace and copy the
|
|
46
|
+
3. Install it to your workspace and copy the bot token.
|
|
47
47
|
4. Run `agent-slack auth login --token "$SLACK_BOT_TOKEN" --scopes ...`.
|
|
48
48
|
|
|
49
|
-
OAuth with `--client-id` and `--client-secret` is only for
|
|
49
|
+
OAuth with `--client-id` and `--client-secret` is only for development and self-hosted setups.
|
|
50
50
|
|
|
51
51
|
## Skill
|
|
52
52
|
|
|
@@ -200,8 +200,8 @@ const authCommand = async (parsed, services) => {
|
|
|
200
200
|
const clientSecret = flagString(parsed, "client-secret") ?? process.env.AGENT_SLACK_CLIENT_SECRET ?? process.env.SLK_CLIENT_SECRET ?? process.env.SLACK_CLIENT_SECRET;
|
|
201
201
|
const byoOAuth = flagBoolean(parsed, "oauth");
|
|
202
202
|
if (byoOAuth && (clientId === undefined || clientSecret === undefined)) {
|
|
203
|
-
throw new UsageError("
|
|
204
|
-
suggestion: "Use --token with an existing
|
|
203
|
+
throw new UsageError("Slack OAuth with app credentials needs both --client-id and --client-secret.", {
|
|
204
|
+
suggestion: "Use --token with an existing Slack bot token, or pass both app credentials from Basic Information > App Credentials."
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
const scopes = splitCsv(flagString(parsed, "scopes"));
|
package/dist/cli/metadata.js
CHANGED
|
@@ -8,7 +8,7 @@ export const CLI_VERSION = packageJson.version ?? "0.0.0";
|
|
|
8
8
|
export const commandMetadata = [
|
|
9
9
|
{
|
|
10
10
|
path: ["describe"],
|
|
11
|
-
summary: "
|
|
11
|
+
summary: "Print the full command catalog as JSON.",
|
|
12
12
|
flags: ["--json"],
|
|
13
13
|
safety: "read",
|
|
14
14
|
output: "command metadata",
|
|
@@ -16,7 +16,7 @@ export const commandMetadata = [
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
path: ["completion"],
|
|
19
|
-
summary: "Generate shell completion
|
|
19
|
+
summary: "Generate a shell completion script.",
|
|
20
20
|
args: ["bash|zsh"],
|
|
21
21
|
safety: "read",
|
|
22
22
|
output: "shell completion script",
|
|
@@ -24,7 +24,7 @@ export const commandMetadata = [
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
path: ["auth", "status"],
|
|
27
|
-
summary: "Show the active Slack
|
|
27
|
+
summary: "Show the active Slack profile.",
|
|
28
28
|
flags: ["--profile", "--json"],
|
|
29
29
|
safety: "read",
|
|
30
30
|
output: "profile status",
|
|
@@ -44,7 +44,7 @@ export const commandMetadata = [
|
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
path: ["auth", "scopes"],
|
|
47
|
-
summary: "Show granted
|
|
47
|
+
summary: "Show scopes granted to the active profile.",
|
|
48
48
|
flags: ["--profile", "--json"],
|
|
49
49
|
safety: "read",
|
|
50
50
|
output: "scope list",
|
|
@@ -52,7 +52,7 @@ export const commandMetadata = [
|
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
path: ["auth", "profiles", "list"],
|
|
55
|
-
summary: "List local
|
|
55
|
+
summary: "List local Slack profiles.",
|
|
56
56
|
flags: ["--json"],
|
|
57
57
|
safety: "read",
|
|
58
58
|
output: "profile list",
|
|
@@ -60,7 +60,7 @@ export const commandMetadata = [
|
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
path: ["auth", "logout"],
|
|
63
|
-
summary: "Delete a local
|
|
63
|
+
summary: "Delete a local Slack profile.",
|
|
64
64
|
flags: ["--profile", "--json"],
|
|
65
65
|
safety: "destructive",
|
|
66
66
|
output: "deleted profile status",
|
|
@@ -68,7 +68,7 @@ export const commandMetadata = [
|
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
path: ["auth", "test"],
|
|
71
|
-
summary: "
|
|
71
|
+
summary: "Test the active Slack profile.",
|
|
72
72
|
methods: ["auth.test"],
|
|
73
73
|
scopes: [],
|
|
74
74
|
safety: "read",
|
|
@@ -77,7 +77,7 @@ export const commandMetadata = [
|
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
path: ["team", "get"],
|
|
80
|
-
summary: "Show workspace
|
|
80
|
+
summary: "Show Slack workspace details.",
|
|
81
81
|
methods: ["team.info"],
|
|
82
82
|
scopes: ["team:read"],
|
|
83
83
|
safety: "read",
|
|
@@ -95,7 +95,7 @@ export const commandMetadata = [
|
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
path: ["enterprise", "get"],
|
|
98
|
-
summary: "Show enterprise
|
|
98
|
+
summary: "Show enterprise and workspace identity.",
|
|
99
99
|
methods: ["team.info"],
|
|
100
100
|
scopes: ["team:read"],
|
|
101
101
|
safety: "read",
|
|
@@ -163,7 +163,7 @@ export const commandMetadata = [
|
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
165
|
path: ["api", "call"],
|
|
166
|
-
summary: "Call
|
|
166
|
+
summary: "Call a Slack Web API method with a JSON payload.",
|
|
167
167
|
args: ["METHOD", "PAYLOAD_STDIN_MARKER"],
|
|
168
168
|
flags: ["--payload", "--profile", "--token", "--all", "--raw", "--format", "--allow-write", "--yes", "--json"],
|
|
169
169
|
safety: "unknown",
|
|
@@ -175,7 +175,7 @@ export const commandMetadata = [
|
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
path: ["api", "methods", "list"],
|
|
178
|
-
summary: "List bundled Slack
|
|
178
|
+
summary: "List bundled Slack Web API metadata.",
|
|
179
179
|
flags: ["--family", "--json"],
|
|
180
180
|
safety: "read",
|
|
181
181
|
output: "method metadata list",
|
|
@@ -211,7 +211,7 @@ export const commandMetadata = [
|
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
path: ["conversation", "context"],
|
|
214
|
-
summary: "
|
|
214
|
+
summary: "Build channel context for agents.",
|
|
215
215
|
args: ["CHANNEL_ID"],
|
|
216
216
|
methods: ["conversations.history", "conversations.replies", "users.info"],
|
|
217
217
|
scopes: ["channels:history", "users:read"],
|
|
@@ -241,7 +241,7 @@ export const commandMetadata = [
|
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
path: ["message", "permalink"],
|
|
244
|
-
summary: "
|
|
244
|
+
summary: "Get a Slack permalink for a message.",
|
|
245
245
|
flags: ["--channel", "--ts", "--json"],
|
|
246
246
|
methods: ["chat.getPermalink"],
|
|
247
247
|
safety: "read",
|
|
@@ -250,7 +250,7 @@ export const commandMetadata = [
|
|
|
250
250
|
},
|
|
251
251
|
{
|
|
252
252
|
path: ["search", "context"],
|
|
253
|
-
summary: "Search Slack for
|
|
253
|
+
summary: "Search Slack for relevant context.",
|
|
254
254
|
flags: ["--query", "--content-types", "--json"],
|
|
255
255
|
methods: ["assistant.search.context"],
|
|
256
256
|
scopes: ["search:read.public", "search:read.private"],
|
|
@@ -312,7 +312,7 @@ export const renderHumanHelp = (path) => {
|
|
|
312
312
|
return [
|
|
313
313
|
PRIMARY_COMMAND_NAME,
|
|
314
314
|
"",
|
|
315
|
-
"
|
|
315
|
+
"Slack context CLI for agents.",
|
|
316
316
|
"",
|
|
317
317
|
"Commands:",
|
|
318
318
|
...commands.map((item) => ` ${item.path.join(" ").padEnd(28)} ${item.summary}`)
|
|
@@ -326,32 +326,32 @@ const renderAuthLoginHelp = () => [
|
|
|
326
326
|
"Browser login",
|
|
327
327
|
" agent-slack auth login",
|
|
328
328
|
"",
|
|
329
|
-
" Opens Slack in the browser with PKCE and stores a local
|
|
330
|
-
"
|
|
329
|
+
" Opens Slack in the browser with PKCE and stores a local Slack profile.",
|
|
330
|
+
" The CLI never stores a Slack app secret.",
|
|
331
331
|
"",
|
|
332
332
|
"Token setup",
|
|
333
333
|
" agent-slack auth login --token \"$SLACK_BOT_TOKEN\" --scopes channels:read,channels:history,users:read",
|
|
334
334
|
"",
|
|
335
|
-
" Stores an existing
|
|
335
|
+
" Stores an existing bot token as a local Slack profile.",
|
|
336
336
|
"",
|
|
337
|
-
"Developer fallback:
|
|
337
|
+
"Developer fallback: Slack app credentials",
|
|
338
338
|
" agent-slack auth login --oauth --client-id \"$SLACK_CLIENT_ID\" --client-secret \"$SLACK_CLIENT_SECRET\"",
|
|
339
339
|
"",
|
|
340
340
|
"Options",
|
|
341
341
|
" --profile NAME Save as a named profile.",
|
|
342
|
-
" --token TOKEN Store an existing
|
|
343
|
-
" --scopes LIST
|
|
344
|
-
" --user-scopes LIST
|
|
345
|
-
" --oauth Use Slack OAuth with
|
|
342
|
+
" --token TOKEN Store an existing Slack bot token.",
|
|
343
|
+
" --scopes LIST Scopes to request (PKCE) or record (token setup).",
|
|
344
|
+
" --user-scopes LIST User scopes to request during OAuth.",
|
|
345
|
+
" --oauth Use Slack OAuth with app credentials.",
|
|
346
346
|
" --client-id VALUE Override the Slack app Client ID.",
|
|
347
347
|
" --client-secret VALUE Slack app Client Secret.",
|
|
348
348
|
" --no-open Print OAuth URL instead of opening the browser.",
|
|
349
349
|
" --auth-url-out PATH Write OAuth URL for headless flows.",
|
|
350
|
-
" --json Emit
|
|
350
|
+
" --json Emit machine-readable JSON.",
|
|
351
351
|
"",
|
|
352
352
|
"Notes",
|
|
353
353
|
" Normal users should not create a Slack app or handle client credentials.",
|
|
354
|
-
"
|
|
354
|
+
" App credentials are only for development and self-hosted setups.",
|
|
355
355
|
""
|
|
356
356
|
].join("\n");
|
|
357
357
|
export const renderCompletion = (shell) => {
|
package/dist/output/envelope.js
CHANGED
|
@@ -46,7 +46,7 @@ export const errorEnvelope = (error) => {
|
|
|
46
46
|
const suggestionFor = (tag) => {
|
|
47
47
|
switch (tag) {
|
|
48
48
|
case "NotAuthenticated":
|
|
49
|
-
return "Run agent-slack auth login or
|
|
49
|
+
return "Run agent-slack auth login, or use --token with an existing Slack bot token.";
|
|
50
50
|
case "MissingScope":
|
|
51
51
|
return "Reinstall or reauthorize the Slack app with the missing scope.";
|
|
52
52
|
case "SlackRateLimited":
|
package/dist/output/human.js
CHANGED
|
@@ -55,7 +55,7 @@ const renderCommandCatalog = (catalog, paint) => {
|
|
|
55
55
|
"",
|
|
56
56
|
`${paint("dim", "Use")} ${paint("cyan", `${catalog.name} <command> [--json]`)}`,
|
|
57
57
|
...(aliases === undefined ? [] : [`${paint("dim", "Alias")} ${aliases}`]),
|
|
58
|
-
`${paint("dim", "Output")}
|
|
58
|
+
`${paint("dim", "Output")} readable in terminals; JSON for pipes and --json`,
|
|
59
59
|
"",
|
|
60
60
|
...groups.flatMap((group) => renderCommandGroup(group, paint)),
|
|
61
61
|
"",
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-slack
|
|
3
|
-
description: "Use when Codex needs Slack context through the `agent-slack` CLI: authenticate, inspect profiles/scopes, read channels, messages, threads, files, users, search context, or call Slack Web API methods with
|
|
3
|
+
description: "Use when Codex needs Slack context through the `agent-slack` CLI: authenticate, inspect profiles/scopes, read channels, messages, threads, files, users, search context, or call Slack Web API methods with JSON or NDJSON output."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# agent-slack CLI
|
|
7
7
|
|
|
8
|
-
Use `agent-slack` as the Slack context boundary. `aslk` is the short alias. Prefer read-only commands
|
|
8
|
+
Use `agent-slack` as the Slack context boundary. `aslk` is the short alias. Prefer read-only commands. The CLI can only return data allowed by the active token, scopes, channel membership, workspace policy, and Slack plan.
|
|
9
9
|
|
|
10
10
|
## Workflow
|
|
11
11
|
|
|
12
12
|
1. Check availability: `agent-slack describe --json`.
|
|
13
13
|
2. Check auth: `agent-slack auth status --json`.
|
|
14
|
-
3. If auth is missing, ask the user to run `agent-slack auth login`. It opens Slack in the browser with PKCE and stores a local
|
|
14
|
+
3. If auth is missing, ask the user to run `agent-slack auth login`. It opens Slack in the browser with PKCE and stores a local Slack profile.
|
|
15
15
|
4. Use specific read commands before raw API calls.
|
|
16
16
|
5. Use `--json` for bounded results and `--format ndjson` for large context streams.
|
|
17
17
|
6. Read structured errors from stderr; do not parse progress text from stdout.
|
|
@@ -24,7 +24,7 @@ Browser login:
|
|
|
24
24
|
agent-slack auth login
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Agent Slack opens Slack in the browser with PKCE and stores a local
|
|
27
|
+
Agent Slack opens Slack in the browser with PKCE and stores a local Slack profile. Users should not create a Slack app or handle `client-id`/`client-secret`.
|
|
28
28
|
|
|
29
29
|
Token setup:
|
|
30
30
|
|
|
@@ -32,13 +32,13 @@ Token setup:
|
|
|
32
32
|
agent-slack auth login --token "$SLACK_BOT_TOKEN" --scopes channels:read,channels:history,users:read --json
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
This stores an existing Slack
|
|
35
|
+
This stores an existing Slack bot token as a local profile.
|
|
36
36
|
|
|
37
37
|
Developer/self-hosted fallback:
|
|
38
38
|
|
|
39
39
|
1. Create or open a Slack app at https://api.slack.com/apps.
|
|
40
|
-
2. Go to **OAuth & Permissions**, add the needed bot scopes, install the app to the workspace, and copy the
|
|
41
|
-
3. For OAuth auth, get the **Client ID** and **Client Secret** from **Basic Information
|
|
40
|
+
2. Go to **OAuth & Permissions**, add the needed bot scopes, install the app to the workspace, and copy the bot token.
|
|
41
|
+
3. For OAuth auth, get the **Client ID** and **Client Secret** from **Basic Information > App Credentials** in that Slack app, then run:
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
44
|
agent-slack auth login --oauth --client-id "$SLACK_CLIENT_ID" --client-secret "$SLACK_CLIENT_SECRET" --json
|