slack-term 1.13.0 → 1.15.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 +22 -3
- package/SKILL.md +15 -4
- package/dist/cli.js +87 -60
- package/package.json +6 -3
- package/ts/auth.ts +268 -13
- package/ts/botdoctor.ts +96 -0
- package/ts/cli.ts +375 -57
- package/ts/profiles.ts +165 -36
- package/ts/rtm.ts +197 -0
- package/ts/slack-app.ts +207 -3
- package/ts/slack.ts +138 -4
- package/ts/tail.ts +120 -10
package/README.md
CHANGED
|
@@ -11,7 +11,8 @@ byte-for-byte by [`tests/parity.sh`](tests/parity.sh).
|
|
|
11
11
|
- **Messages** — Browse recent messages across joined channels
|
|
12
12
|
- **Tail** — Stream new messages from a channel in real time (like `tail -f`)
|
|
13
13
|
- **Search** — Full-text search across the workspace
|
|
14
|
-
- **Send** — Send messages to channels or
|
|
14
|
+
- **Send** — Send messages to channels, DMs, or threads with a confirm-hash safety gate (prevents accidental sends); targeting a message permalink replies in that message's thread
|
|
15
|
+
- **Edit / Delete** — Rewrite or remove a sent message, guarded by the same confirm-hash gate
|
|
15
16
|
- **Dump** — Bulk-export channel history as markdown
|
|
16
17
|
|
|
17
18
|
### Output formatting
|
|
@@ -58,8 +59,16 @@ slack search "deploy" --count 50
|
|
|
58
59
|
|
|
59
60
|
# Send a message (two-step confirm — quote #channel)
|
|
60
61
|
slack send "#general" "Hello team"
|
|
61
|
-
# Prints preview + confirm
|
|
62
|
-
slack send "#general" "Hello team" --
|
|
62
|
+
# Prints a destination preview + confirm code; rerun with --code=<code> to actually send
|
|
63
|
+
slack send "#general" "Hello team" --code=<code>
|
|
64
|
+
|
|
65
|
+
# Reply in a thread — #chan:<thread_ts>, or just paste a message permalink
|
|
66
|
+
slack send "#general:1700000000.000100" "Replying in thread"
|
|
67
|
+
slack send "https://acme.slack.com/archives/C0123456789/p1700000000000100" "Replying in thread"
|
|
68
|
+
|
|
69
|
+
# Edit or delete a sent message (same confirm-code gate)
|
|
70
|
+
slack edit "<permalink>" "fixed wording"
|
|
71
|
+
slack delete "<permalink>"
|
|
63
72
|
|
|
64
73
|
# Bulk export channel history
|
|
65
74
|
slack dump --days 7 --filter eng
|
|
@@ -69,6 +78,7 @@ slack tail "#general"
|
|
|
69
78
|
slack tail "#general" --since=10m # backfill last 10 minutes first
|
|
70
79
|
slack tail "#general" --thread=<ts> # follow a single thread
|
|
71
80
|
slack tail "#general" --me # only messages that mention you
|
|
81
|
+
slack tail "@bob" --exit-on-message --timeout 30m # wait for a reply, then exit
|
|
72
82
|
```
|
|
73
83
|
|
|
74
84
|
### tail — real-time message stream
|
|
@@ -84,6 +94,15 @@ slack tail "#symval" --thread=1700000000.000100 # one thread only
|
|
|
84
94
|
slack tail "#symval" --me # only messages mentioning you
|
|
85
95
|
```
|
|
86
96
|
|
|
97
|
+
For automation, `--exit-on-message` stops as soon as the first message from
|
|
98
|
+
**someone else** arrives (your own posts are ignored), and `--timeout <dur>`
|
|
99
|
+
(e.g. `30m`, `2h`) auto-stops after the deadline with exit code 0. Together they
|
|
100
|
+
make a "wait for a reply, then act" primitive that won't hang:
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
slack tail "@matsuda" --exit-on-message --timeout 30m --interval 15000
|
|
104
|
+
```
|
|
105
|
+
|
|
87
106
|
**Note:** Cross-channel mention streaming (`--me` without a target) is not yet
|
|
88
107
|
supported — a target channel is required.
|
|
89
108
|
|
package/SKILL.md
CHANGED
|
@@ -55,14 +55,25 @@ slack read @username
|
|
|
55
55
|
|
|
56
56
|
# Send a message (two-step confirm)
|
|
57
57
|
slack send "#general" "Hello team"
|
|
58
|
-
# Prints preview + a confirm
|
|
59
|
-
slack send "#general" "Hello team" --
|
|
58
|
+
# Prints a destination preview + a confirm code. Re-run with --code=<code> to actually send:
|
|
59
|
+
slack send "#general" "Hello team" --code=<code>
|
|
60
|
+
|
|
61
|
+
# Reply in a thread — #chan:<thread_ts>, or paste a message permalink:
|
|
62
|
+
slack send "#general:1700000000.000100" "Replying in thread"
|
|
63
|
+
slack send "https://acme.slack.com/archives/C0123456789/p1700000000000100" "Replying in thread"
|
|
64
|
+
|
|
65
|
+
# Edit or delete a sent message (same confirm-code gate)
|
|
66
|
+
slack edit "<permalink>" "fixed wording"
|
|
67
|
+
slack delete "<permalink>"
|
|
60
68
|
|
|
61
69
|
# Bulk export a channel's history
|
|
62
70
|
slack dump "#channel-name"
|
|
63
71
|
```
|
|
64
72
|
|
|
65
|
-
Targets for `send`
|
|
73
|
+
Targets for `send` are `#channel`, `@user`, `#channel:<thread_ts>`, or a Slack URL —
|
|
74
|
+
a message permalink replies in that message's thread; a channel-only URL posts top-level.
|
|
75
|
+
The confirm preview prints the resolved destination (`→ ... — THREAD REPLY` or
|
|
76
|
+
`→ ... — NEW top-level message`); verify it before re-running with `--code`.
|
|
66
77
|
|
|
67
78
|
## Output formatting
|
|
68
79
|
|
|
@@ -122,7 +133,7 @@ slack news --limit 1
|
|
|
122
133
|
- **`token_revoked`** — app uninstalled; reinstall from the app page.
|
|
123
134
|
- **Token starts with `xoxb-`** — that's a Bot Token. Add scopes under **User Token Scopes** instead, reinstall, and copy the **User OAuth Token**.
|
|
124
135
|
- **Send is rejected with "use #channel or @user"** — the CLI enforces human-readable targets. Use `#channel-name` or `@display-name`, not raw IDs.
|
|
125
|
-
- **Confirm
|
|
136
|
+
- **Confirm code mismatch on `send`** — the message text or destination changed between preview and confirm. Re-run without `--code` for a fresh preview, and re-check the `→` destination line (THREAD REPLY vs NEW top-level message).
|
|
126
137
|
- **Enterprise Grid / admin-locked workspace** — custom app installation may need admin approval or be disabled outright.
|
|
127
138
|
|
|
128
139
|
## Safety
|