slack-term 1.49.0 → 1.50.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
@@ -353,6 +353,32 @@ slack alias import allowlist.tsv --channel D00000001 --lane-dir design=~/ws/x/tr
353
353
  - `owner: <dir>` names the allowlist's owner. `--shared` writes run only from under that directory, and are refused for everyone when no owner is named. Every lane runs as the same uid, so only the CLI can tell them apart.
354
354
  - `auto_subscribe` subscribes a new top-level message in that channel to this dir as `t-<ts>`.
355
355
 
356
+ ### Identities — `slack @<who> <command>`
357
+
358
+ When several identities exist (bots and people), name the one a command acts as:
359
+
360
+ ```sh
361
+ slack @deploy-bot send '#chan:<ts>' 'deployed' # as the deploy-bot bot (like --as-bot, with its own token)
362
+ slack @form-bot ask @alice "ship?" yes no
363
+ slack @alice read '#general' # as a person's session
364
+ ```
365
+
366
+ The names live in `identities:` in `.slack-term/settings.yml` or `~/.config/slack-term/settings.yml`. Each name points to **where** a token lives (an env var, optionally in an env file, or a `slack auth` profile), never the token itself:
367
+
368
+ ```yaml
369
+ identities:
370
+ deploy-bot: { kind: bot, env_file: ~/.config/slack-cli/deploy-bot.env } # reads SLACK_BOT_TOKEN from it
371
+ ops-bot: { kind: bot, env_file: ~/.config/slack-cli/ops-bot.env }
372
+ alice: { kind: user, profile: acme }
373
+ ```
374
+
375
+ **A write that would go out as a person's session is refused** (exit 2) unless it names `@who`, `--as-bot` or `--as-user`, in two cases:
376
+
377
+ - from inside an agent (`AY_AGENT_ID`, `AGENT_YES_PID` or `CLAUDECODE` set);
378
+ - when two or more identities are configured.
379
+
380
+ This closes the trap where an agent's `slack ask` without `--as-bot` was posted as the person.
381
+
356
382
  ### Language packs (locales/*.json)
357
383
 
358
384
  slack-term's own text (help, errors, logs, hints) is English. Language packs hold only two things: text it posts to **people**, and patterns it looks for in **their** messages.