Skip to content

0.18.0: thread mode#84

Merged
llblab merged 1 commit into
mainfrom
dev
Jun 30, 2026
Merged

0.18.0: thread mode#84
llblab merged 1 commit into
mainfrom
dev

Conversation

@llblab

@llblab llblab commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

This release adds BotFather private-chat Thread Mode as a first-class multi-instance mode while keeping classic private DM as the base single-instance mode.

It also makes Thread Mode capability switching hot, keeps activity indication native-only through Telegram active/typing status, removes the separate telegram.json bus switch, and hardens threaded routing, lifecycle, diagnostics, transport, and validation coverage.

Why

Operators use pi-telegram in two legitimate shapes: a simple single-session bot for server/control workflows, and a multi-thread bot for development across several live Pi sessions. The release lets Telegram's own bot mode choose that shape without extra config or hidden process spawning.

User-visible behavior

  • Classic private DM remains the base mode for ordinary single-instance use.
  • When BotFather Thread Mode is enabled, one leader owns Telegram transport and visible follower Pi sessions join through /telegram-connect with their own thread.
  • Thread Mode can hot-upgrade or return to classic mode without /reload as Telegram capability changes.
  • Long-running work and compaction use only Telegram-native active/typing status; no extra progress/thinking chat surfaces are added.
  • Thread-scoped replies, drafts, files, voice, buttons, menus, reactions, guest messages, and direct tools preserve their target thread.

Changed areas

  • lib/polling.ts, lib/threads.ts, lib/bus-*, lib/routing.ts: Thread Mode capability, leader/follower routing, target bindings, and hot switching.
  • lib/runtime.ts, lib/lifecycle.ts, lib/bindings.ts, lib/commands.ts: native typing/activity and compaction status ownership.
  • lib/telegram-api.ts: Bot API transport with IPv4 fallback and redacted diagnostics.
  • Docs/package metadata: release docs, backlog cleanup, and 0.18.0 changelog.

Risk Notes

  • Thread Mode depends on Telegram/BotFather private-chat thread capability and client behavior; classic private DM remains the base mode when Threads are not available.
  • Native Windows Thread Mode live smoke remains tracked in BACKLOG.md; named-pipe transport paths are implemented and covered where the suite can run them.
  • Same-thread Telegram /new remains blocked on upstream Pi API support.

Validation

  • npm run validate — passed
  • git diff --check — passed

@llblab llblab merged commit 0cb140d into main Jun 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant