# clisbot v0.1.41

Released: 2026-04-19

`v0.1.41` makes operator-facing behavior more truthful and much easier to reason about.

The two biggest themes in this release are:

- Slack and Telegram DM policy now have a stricter, safer contract
- operator CLI targeting for loops and message replies is clearer, more explicit, and closer to the real channel model

## In One Line

`clisbot` now does a better job separating admission from behavior in DMs, and it is much clearer how operators should target Slack threads, Slack DMs, and Telegram topics from the CLI.

## What Feels Different

### 1. DM behavior is safer and less ambiguous

- DM admission is now owned by `dm:*`, so one wildcard route controls who is allowed into Slack or Telegram direct messages.
- Exact DM routes such as `dm:U123` or `dm:1276408333` stay behavior-oriented instead of silently carrying access-control semantics.
- Pairing approval is now scoped by `channel + botId`, so approving a user on one bot no longer leaks admission onto another bot.
- Route CLI guardrails now reject invalid DM auth mutations on exact DM routes instead of letting operators create misleading config.

### 2. Loop CLI targeting is much more explicit

- `clisbot loops` now supports Slack channel or group routing, Slack DM routing, existing Slack threads, and Slack-created fresh threads through one shared addressing path.
- Telegram loop targeting now uses `--topic-id` instead of overloading `--thread-id`.
- Slack now supports `--new-thread` for managed loop creation in both channels and DMs.
- Scoped loop `status` and `cancel` behave correctly for Slack DM threads instead of collapsing onto the wrong surface.
- Telegram forum-group behavior is documented more honestly: omitting `--topic-id` targets the parent chat surface, and sends then follow Telegram's normal no-`message_thread_id` behavior, which means General topic delivery when that forum has one.

### 3. Message-tool reply guidance is more accurate

- Agent reply prompts now show `--topic-id` for Telegram instead of implying a generic thread flag.
- `message send` and `message poll` help now spell out the Slack or Telegram split directly:
  - `--thread-id` for Slack threads
  - `--topic-id` for Telegram topics
- Operator docs now explain `--target` more clearly for Slack channels, groups, DM user ids, and DM channel ids.

### 4. Operator guidance around CLI runners is stronger

- `README.md` now includes CLI-specific operator notes for Codex, Claude, and Gemini.
- New per-CLI guides were added for:
  - `docs/user-guide/codex-cli.md`
  - `docs/user-guide/claude-cli.md`
  - `docs/user-guide/gemini-cli.md`
- DX docs now include a more repeatable trust and readiness report flow for attached CLI runners, especially around Codex and Claude workspace trust behavior.

## Highlights

- DM wildcard auth and exact-DM behavior overrides now work together without mixing admission and mode state.
- Pairing approval writes to the correct bot-scoped DM wildcard route.
- Loop CLI now has a shared targeting path for Slack and Telegram instead of fragmented special cases.
- Slack can provision a new managed loop thread directly from the operator CLI.
- Telegram loop and message surfaces consistently use `--topic-id`.
- Help, user guide, control docs, and agent prompt injection were aligned to the same targeting contract.

## Schema And Contract Notes

Schema version is now `0.1.41`.

The DM contract from `0.1.39` to `0.1.41` is:

- keep provider defaults `bots.<provider>.defaults.directMessages."dm:*"` as the provider-level DM fallback
- keep bot-local `bots.<provider>.<botId>.directMessages."dm:*"` as the bot-level DM fallback
- treat `bots.<provider>.<botId>.directMessages."dm:<userId>"` as behavior-only override
- do not store DM admission fields on exact DM routes:
  - `policy`
  - `allowUsers`
  - `blockUsers`
  - effective DM enabled-state semantics
- pairing approval now populates the requesting bot's `directMessages."dm:*".allowUsers`

Historical template backup:

- `config/clisbot.json.v0.1.39.template`

Current template:

- `config/clisbot.json.template`

## Upgrade Notes

- If you previously relied on exact DM routes for `policy`, `allowUsers`, or `blockUsers`, move those values onto `dm:*`.
- Existing exact DM behavior overrides continue to work for fields like `agentId`, `streaming`, `responseMode`, `additionalMessageMode`, `followUp`, `verbose`, and `timezone`.
- Pairing approval no longer writes to the old provider-wide allow-from store as the admission source of truth; the approved user is applied to the requesting bot's DM wildcard route.
- If you automated Telegram CLI replies or operator workflows using `--thread-id`, switch them to `--topic-id`.
- If you want a fresh managed Slack loop thread, use `--new-thread` rather than inventing a placeholder thread ts yourself.

## Validation

Validated with the full repo gate:

- `bun run check`

And supported by targeted regressions for:

- config normalization and template versioning
- DM route resolution
- route CLI guardrails
- pairing storage and pairing CLI approval flow
- loop CLI routed create, status, cancel, and Slack DM thread targeting
- message CLI Telegram topic targeting
- agent prompt reply-command rendering

## Recommended Docs After This Release

- [Release Notes Index](README.md)
- [User Guide](../user-guide/README.md)
- [CLI Commands](../user-guide/cli-commands.md)
- [Codex CLI Guide](../user-guide/codex-cli.md)
- [Claude CLI Guide](../user-guide/claude-cli.md)
- [Gemini CLI Guide](../user-guide/gemini-cli.md)
- [Loops CLI](../features/control/loops-cli.md)
