slack-term 1.43.0 → 1.45.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 CHANGED
@@ -123,8 +123,14 @@ slack react "<permalink>" eyes --remove # take a reaction back
123
123
 
124
124
  # Ask a question with its choices pre-seeded as 1️⃣..🔟 reactions — answering is
125
125
  # one tap on an existing pill, no emoji picker. Same two-step confirm gate as send.
126
- # A ❓ "その他 (other)" pill always follows the choices: pressing it means "none of
127
- # these" and the answer comes as a reply (exit 5), not as the ❓ itself.
126
+ # A ➕ "その他 (other)" pill always follows the choices: pressing it means "none of
127
+ # these" and the answer comes as a reply (exit 5), not as the ➕ itself. (Pills posted
128
+ # before ➕ carry ❓ there; they are still read, collected and voided the same way.)
129
+ # --explain (or SLACK_TERM_ASK_EXPLAIN=1) adds an ℹ️ "説明して (explain)" pill after ➕:
130
+ # pressing it asks YOU to explain in the thread and is never an answer — the question
131
+ # stays open. --wait/--waitFor say so on stderr and may post ONE thread note (once per
132
+ # question) saying an explanation is coming; --explain-exit makes that exit 7.
133
+ # --pending only reports a ℹ️ press — it posts nothing.
128
134
  # The instructions are posted in ja or en: --lang / SLACK_TERM_LANG, else the
129
135
  # answerers' Slack locale, else the question's own language, else $LANG, else ja.
130
136
  slack ask "@bob" "本番に出してよい?" "出してよい" "待って"
@@ -146,7 +152,7 @@ slack ask "#eng" "@here 誰か見れる?" "見る" "あとで" # anyo
146
152
  # With no choices the question asks for a free-text reply and the reply is the answer.
147
153
  # In a DM a plain reply counts; in a channel only reactions and thread replies do.
148
154
  # Once answered, the question is edited to "✅ …回答済み > <answer>" — the body/background
149
- # and the CHOSEN option line stay; the other options, ❓ line and instructions go. The
155
+ # and the CHOSEN option line stay; the other options, ➕ line and instructions go. The
150
156
  # unpressed seeds are removed, leaving the chosen pill visible.
151
157
  #
152
158
  # Thread notes (audience replies that are not the answer, even after ✅) go to
@@ -357,9 +363,15 @@ into a second board.
357
363
 
358
364
  ### tail — real-time message stream
359
365
 
360
- `slack tail` polls a channel every 3 seconds (configurable via `--interval`) and
361
- prints new messages as they arrive, in the same `[ts] @handle: text` format as
362
- the `read` command.
366
+ `slack tail` prints new messages in a channel as they arrive, in the same
367
+ `[ts] @handle: text` format as the `read` command.
368
+
369
+ - **Transport: RTM WebSocket** (default) when the token is a desktop session
370
+ (`xoxc-` + cookie) and none of `--since`, `--timeout`, `--exit-on-message` is
371
+ given. If RTM can't connect it says `RTM unavailable — switching to polling.`
372
+ - **Fallback: polling** every `--interval` ms (default `60000` = 60 s; e.g.
373
+ `--interval=3000` for near-real-time at the cost of more API calls). Used for
374
+ other tokens, with any of the three flags above, or with `--no-rtm`.
363
375
 
364
376
  ```sh
365
377
  slack tail "#general" # follow new messages from now
package/SKILL.md CHANGED
@@ -174,10 +174,23 @@ without losing clicks. A reaction is durable state anyone can read back later.
174
174
  destination resolve with the bot token (so the bot needs `users:read`).
175
175
  - **Answer paths**: a pill, or free text. In a DM a plain reply counts; in a channel only
176
176
  reactions and thread replies do (a channel carries unrelated traffic).
177
- - **❓ is the standing "other" choice.** Every question with choices lists it last
178
- (`1️⃣ … 2️⃣ … 3️⃣ … ❓ その他 — スレッドで返信`) and seeds it after the keycaps. Pressing it
177
+ - **➕ is the standing "other" choice.** Every question with choices lists it last
178
+ (`1️⃣ … 2️⃣ … 3️⃣ … ➕ その他 — スレッドで返信`) and seeds it after the keycaps. Pressing it
179
179
  is not an answer — `--wait` notes it on stderr and keeps waiting for the reply, which
180
- arrives as free text (exit `5`).
180
+ arrives as free text (exit `5`). Questions posted before 2026-10-14 carry ❓ as this
181
+ pill (line and seed); they keep working, and a ❓ press counts as "other" on either kind.
182
+ The head marker stays `:question:` — only the pill moved. A free-text question has no
183
+ other choice and still seeds ❓.
184
+ - **ℹ️ is the "explain first" pill** — offered with `--explain` (or
185
+ `SLACK_TERM_ASK_EXPLAIN=1`; `--no-explain` overrides), listed under ➕ and seeded after
186
+ it. ➕ means "none fit, my answer follows"; ℹ️ means "I can't answer yet — explain".
187
+ It **never answers or closes** the question: no ✅, the pills stay. `--wait`/`--waitFor`
188
+ print who pressed it on stderr (`--json`: `explain: [user ids]`) and may post ONE thread
189
+ note per question saying an explanation is coming (the thread is the record — re-presses
190
+ and re-runs post nothing more). Then explain in the thread and keep collecting.
191
+ `--explain-exit` stops with exit `7` (stdout empty; `--json` `status: "explain"`) on the
192
+ run that posts that note, so a `--timeout 0` poller hears about it once. Only the
193
+ question's audience counts; bots and the asker are ignored.
181
194
  - **The instructions are posted in `ja` or `en`.** `--lang` (or `SLACK_TERM_LANG`) decides;
182
195
  otherwise the answerers' Slack locale when they all share one, else the language the
183
196
  question is written in, else the system locale, else `ja`. The confirm gate prints the
@@ -187,7 +200,7 @@ without losing clicks. A reaction is durable state anyone can read back later.
187
200
  - **Exit codes** are the contract: `0` answered (the answer alone on stdout), `2` nobody
188
201
  replied, `3` transport/config failure, `4` a reply matched several choices (stdout
189
202
  empty), `6` the question was **voided** (stop waiting), `5` a **free-text reply** that picked none of the offered choices — the reply
190
- text is on stdout. Everything human-facing goes to stderr, so
203
+ text is on stdout. `7` (only with `--explain-exit`) — ℹ️ pressed, explain and collect again. Everything human-facing goes to stderr, so
191
204
  `ANS=$(slack ask … --wait)` is safe.
192
205
  - **A reply that chooses nothing is delivered, but is not a decision.** When choices were
193
206
  offered, only a reaction, the choice text, or its number is a decision (`0`). A reply
@@ -208,7 +221,7 @@ never get the same note twice. Only the question's audience counts; the asker, b
208
221
  bystanders are never notes.
209
222
 
210
223
  **Answering keeps the context.** The ✅ rewrite keeps the question's body (its background)
211
- and the chosen option; only the options not chosen, the ❓ line and the instructions go.
224
+ and the chosen option; only the options not chosen, the ➕ (or ❓) line and the instructions go.
212
225
  The head is unchanged (`:white_check_mark:` prefix, question, stamp, quoted answer), so
213
226
  anything that keys on the prefix or re-reads the answer works on old and new ✅ bodies alike.
214
227
 
@@ -218,7 +231,11 @@ anything that keys on the prefix or re-reads the answer works on old and new ✅
218
231
  (repeatable `--void=`; alias `slack ask void <link…>`; same `--code` gate; own questions
219
232
  only, `--as-bot` for the bot's). The text becomes `:no_entry_sign:` + reason with the body
220
233
  kept, our pills come off, and a 🚫 reaction is added. Three states, three prefixes:
221
- `:question:` open, `:white_check_mark:` answered, `:no_entry_sign:` void. `--wait` /
234
+ `:question:` open, `:white_check_mark:` answered, `:no_entry_sign:` void (the text prefix;
235
+ the open question's marker REACTION is ➕ on a question with choices, ❓ on free text and
236
+ on questions posted before ➕ — search `has::question: OR has::heavy_plus_sign:`; ➕ is a common
237
+ emoji, so that can match unrelated messages — `slack ask --ls` reads the local sent-log
238
+ and is unaffected). `--wait` /
222
239
  `--waitFor` on a void question **exit 6** (`--json` → `status: "void"`): stop waiting.
223
240
  Answered questions cannot be voided.
224
241
 
@@ -254,7 +271,8 @@ an answer can be pressed and nobody ever hears about it.
254
271
  collected, and lists the ones somebody answered — grouped by the asking session, with
255
272
  the agent pid and whether it is still alive (pid running, started before the ask, same
256
273
  CLI), and per item the exact `collect:` line to run (cursor included). It is read-only —
257
- nothing is posted, edited, stamped or relayed. Collecting is that `slack ask --waitFor=…`
274
+ nothing is posted, edited, stamped or relayed (an ℹ️ explain request is reported on
275
+ stderr, but its thread note is left to `--wait`/`--waitFor`). Collecting is that `slack ask --waitFor=…`
258
276
  line: an answer it hands over (exit 0) takes the ask off the list; a free-text reply it
259
277
  hands over (exit 5) is not reported again, but a pill pressed after it is.
260
278