slack-term 1.39.1 → 1.40.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 +1 -1
- package/SKILL.md +24 -2
- package/dist/cli.js +175 -161
- package/package.json +1 -1
- package/ts/attachments.ts +71 -0
- package/ts/cli.ts +265 -16
- package/ts/slack.ts +56 -11
- package/ts/slackTodos.ts +85 -0
- package/ts/stdout.ts +59 -0
- package/ts/urlGuard.ts +162 -10
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ slack search "deploy" --count 50
|
|
|
91
91
|
slack send "#general" "Hello team"
|
|
92
92
|
# Prints who you're acting as (From: @handle (Uxxxx) — Workspace) + a destination
|
|
93
93
|
# preview + confirm code; rerun with --code=<code> to actually send. Every gated write
|
|
94
|
-
# (send/edit/delete/upload/schedule/channel create/lists/drafts) shows that From: line and
|
|
94
|
+
# (send/edit/delete/upload/schedule/channel create/rename/lists/drafts) shows that From: line and
|
|
95
95
|
# binds it into the code, so a profile switch mid-flow invalidates it instead of acting
|
|
96
96
|
# as the wrong account.
|
|
97
97
|
slack send "#general" "Hello team" --code=<code>
|
package/SKILL.md
CHANGED
|
@@ -120,7 +120,7 @@ plus `[as bot]` under `--as-bot`) and the resolved destination (`→ ... — THR
|
|
|
120
120
|
`→ ... — NEW top-level message`); verify both before re-running with `--code`.
|
|
121
121
|
|
|
122
122
|
**Every** gated write opens its preview with that same `From:` line — `send`, `edit`,
|
|
123
|
-
`delete`, `upload`, `schedule send`, `schedule rm`, `channel create`, `lists create/add/set/share`, `drafts edit`,
|
|
123
|
+
`delete`, `upload`, `schedule send`, `schedule rm`, `channel create`, `channel rename`, `lists create/add/set/share`, `drafts edit`,
|
|
124
124
|
`drafts delete` — and the identity is part of the confirm hash: switching
|
|
125
125
|
profile/token between preview and confirm invalidates the code instead of acting as
|
|
126
126
|
someone else. It matters most on `schedule send`, where the message goes out later,
|
|
@@ -135,7 +135,8 @@ UTC, and the two are easy to mix up. Check the side you meant before confirming.
|
|
|
135
135
|
member in plain text (honorifics like `山田さん` / `王老师`, or `Hi Dave`) without a
|
|
136
136
|
matching `<@USERID>` tag, it prints `⚠ possible untagged mention: …` alongside the
|
|
137
137
|
confirm code. It never blocks — third-party/external references are expected to trip it.
|
|
138
|
-
|
|
138
|
+
It stays quiet for people Slack notifies anyway: in a thread reply, anyone who started or
|
|
139
|
+
replied in that thread; in a 1:1 DM, the other member. To actually notify someone, write `@handle` (auto-converted to `<@USERID>`; see below).
|
|
139
140
|
|
|
140
141
|
When the target is a **thread**, the confirm preview shows the thread's recent messages
|
|
141
142
|
(not the channel's last message) and prints `⚠ possible duplicate: …` if your text is
|
|
@@ -274,6 +275,22 @@ Reason flags stack independently of progress and of each other: ❗ `exclamation
|
|
|
274
275
|
`slack thread`/`slack read` before replying to avoid duplicates; consolidate multiple
|
|
275
276
|
points into one message.
|
|
276
277
|
|
|
278
|
+
### todos — Slack's To-dos tab (read-only)
|
|
279
|
+
|
|
280
|
+
Not `slack todo`: that tracks tasks as reactions. `slack todos` reads Slack's own
|
|
281
|
+
**personal** To-dos tab (the successor of "Later"), the list in the sidebar.
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
slack todos # open to-dos, soonest due first (OVERDUE marked)
|
|
285
|
+
slack todos --filter completed # also: saved (everything saved), archived
|
|
286
|
+
slack todos --json -n 20 # one object per item: due, done, permalink, text
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
There is no public API: it uses the desktop client's internal `saved.list`, so
|
|
290
|
+
it needs the **xoxc session** (`slack auth login`) and shows only your own
|
|
291
|
+
to-dos. Bots can't see them. Slack can change this endpoint without notice.
|
|
292
|
+
Adding and completing to-dos is not supported yet.
|
|
293
|
+
|
|
277
294
|
## Output formatting
|
|
278
295
|
|
|
279
296
|
- DM channels render as `@DisplayName`; public channels as `#channel-name`.
|
|
@@ -283,6 +300,11 @@ points into one message.
|
|
|
283
300
|
- Attachments show a `📎 <name> (<size>) [<file-id>]` line under the message; `--json`
|
|
284
301
|
adds a `files[]` array (`id`, `name`, `mimetype`, `size`, `url_private_download`,
|
|
285
302
|
`permalink`) only on messages that have attachments. Fetch one with `slack download <file-id>`.
|
|
303
|
+
- Forwarded / shared messages (Slack's "Forward", or a pasted message link) show under the
|
|
304
|
+
comment as `↪ shared message from @<author> in <#C…> · <ts>`, the original text quoted
|
|
305
|
+
with `│`, and its permalink. Legacy bot attachments show as `▸ <title>`; web-page link
|
|
306
|
+
previews are left out. `--json` adds `attachments[]` (`shared`, `unfurl`, `author_id`,
|
|
307
|
+
`author_name`, `channel_id`, `ts`, `title`, `text`, `permalink`) only when present.
|
|
286
308
|
|
|
287
309
|
## Getting a Slack token (first-time setup)
|
|
288
310
|
|