# Changelog (/en/docs/tg/changelog)

See what changed in releases: new capabilities, fixes and changes that may affect your commands. Start with your installed version, then use the linked guide for the feature you want to try.

Notable changes to `@wirecat/tg-cli`. One section per version, newest first; versions follow
[semantic versioning](https://semver.org), so before `1.0.0` the command interface may still change.

## 0.123.0 — 10.11.2026 [#01230--10112026]

### Added [#added]

- **`muted:` in search and stats, from `@wirecat/cli-core` 0.633.0.** `muted:false` leaves out the chats you muted, so
  `stats messages show -- 'date>=30d muted:false'` counts only what the sync still reads. `stats messages responses`
  and `stats messages waiting` take it too.
- **`store import`, from `@wirecat/cli-core` 0.633.0.** Loads made-up chats, people and messages from a file marked synthetic into a test store, such as Desktop's sandbox; it refuses the owner's real store.

## 0.122.0 — 10.11.2026 [#01220--10112026]

### Changed — may break callers [#changed--may-break-callers]

- **Built on cli-core 0.630.0** (was 0.624.0). The store moves to version 63 on first open. Each person's kind is
  kept on the person, and saving a chat's members leaves the rows of members who stayed, so memo's `people list`
  filters, counts and pages in SQL. People who wrote in a one-to-one chat or a small group now count as the owner's
  people, no rule joins anyone to the owner's person, and a name is matched across Cyrillic and Latin. A tool on an
  older cli-core that saves members clears the kept kinds, so tg, max and memo move together. What changed in between
  is in [cli-core's changelog](https://github.com/WireCatLabs/cli-core/blob/main/CHANGELOG.md).

## 0.121.0 — 09.11.2026 [#01210--09112026]

### Changed — may break callers [#changed--may-break-callers-1]

- **Built on cli-core 0.624.0** (was 0.619.0). The store moves to version 61 on first open (people ties, additive).
  What changed in between is in [cli-core's changelog](https://github.com/WireCatLabs/cli-core/blob/main/CHANGELOG.md).
- **`search messages --timeout 30s` may search for up to about 29 seconds.** It stopped at 2 seconds whatever time the
  run was given, so a valid query over a large store failed in WireCat Desktop. Without `--timeout` it stays 2 seconds,
  for agents and MCP too.
- **`schedule pause <name>` and `schedule resume <name>`** take a schedule off its timer and keep it; `schedule run`
  still runs it. `--at` repeats: `--at 08:30 --at 18:00` runs twice a day.

## 0.120.0 — 09.11.2026 [#01200--09112026]

### Changed — may break callers [#changed--may-break-callers-2]

- **`tg messages sync --all` leaves out the chats you muted.** An account with many muted groups no longer downloads
  them all. The answer counts them in `limited.muted`, and a note says how to read them. Messages already stored stay,
  and a chat you name (`tg messages sync <chat>`) or keep with `--full-history` is read as before. To read muted chats
  again, pass `--with-muted` for one run, or set `tg config set history_muted true`. From cli-core 0.619.0 (was
  0.618.0).
- **EmbeddingGemma is the default text model for search by meaning**, not e5-small. A computer that already has
  e5-small and not EmbeddingGemma keeps e5-small. `tg models download` no longer asks to accept its terms;
  `--accept-terms` is ignored.
- **`tg contacts link` run by an agent proposes the link instead of making it, and needs `--reason`.** Only the
  owner decides; an agent's `tg contacts unlink` is refused.

### Fixed [#fixed]

- **`bin/release` publishes when main has only `changes/` fragments and no `## Unreleased`.** With the version taken on
  npm it looked for `## Unreleased` to put the next version under, found none and stopped before publishing. It now adds
  the new version's heading above the newest one and collects the fragments into it.

## 0.119.0 — 09.11.2026 [#01190--09112026]

### Added [#added-1]

- **`tg account remove --keep-data|--delete-data`** logs the profile out on Telegram's side, then forgets it on this
  computer: its session files, its app id and hash and proxy password in the keyring, its bots' history sessions and
  what cli-core keeps for it. `--keep-data` leaves its messages searchable; `--delete-data` deletes them. A bot token
  stays, and so does every other profile. A run with moved folders forgets its own copy and never logs out for the owner.
- **`tg models set` and `tg models add`** from cli-core 0.609.0: choose the local embedding model every WireCat
  CLI uses, and add one of your own from Hugging Face. A question with a time in it (`HH:MM`, `10:30`) is searched by
  its words again.
- **tg ships `contracts/wirecat.json`, which says which hosts it talks to over HTTP.** WireCat Desktop reads it to
  show you, before you install, what tg touches: `api.telegram.org` (bots) and `my.telegram.org` (registering your
  app), plus the proxy you set. Your account's own connection to Telegram (MTProto) is not HTTP and is not in that
  list.
- **A pull request adds its changelog entries as a fragment, `changes/<branch>.md`.** Open pull requests no longer
  conflict under `## Unreleased`. `pnpm docs:check` checks each fragment, and `bin/release` collects them into the
  version's section. An entry under `## Unreleased` still works during the move.

### Changed — may break callers [#changed--may-break-callers-3]

- **tg now writes the shared store at version 59, and an older WireCat CLI refuses it until it is upgraded.** Run
  `<cli> upgrade` for each WireCat CLI on the same store. From cli-core 0.615.0, whose message templates live in the
  store.

### Fixed [#fixed-1]

- **`tg serve` exits when the build it runs is out of date, so its service starts the new one.** Every minute it
  checks whether the shared store moved to a format this build can no longer write, or whether a newer tg is
  installed. If so it logs `serve.outdated` and exits with code 3, and the systemd unit (`Restart=on-failure`)
  starts the installed version. Before, a serve could run for a day on the old build and store nothing.
- **After `tg store recover run`, the next ordinary sync fetches again what the damage may have taken.** The recovery
  marks what each chat held from a day before the last deep check that passed as not fetched, so a sync no longer
  jumps over a hole inside a chat. From cli-core 0.618.0 (was 0.616.0).

### Security [#security]

- **The chat with BotFather is kept out of search.** It holds every bot token BotFather sent, so search over all chats
  (`memo search` too), search by meaning and `memo context` leave it out; `tg messages list` and a search that names
  the chat still read it. Takes effect with the cli-core release that reads `Chat.searchable`, at the next sync of the
  chat list; that release also masks bot tokens in every chat.
- **tg's HTTP reaches only the hosts it declares.** Every Bot API call and every step of app registration goes
  through cli-base's `hostFetch`. It refuses any other host before a byte is sent, checks each redirect and drops
  the `Authorization` header on a redirect to another site. Through a SOCKS5 or HTTP proxy the check still holds.
  It does not cover MTProto, which GramJS sends over its own sockets to Telegram's data centres, or an MTProxy.
  From cli-base 0.87.0 (was 0.80.8) and cli-core 0.615.0 (was 0.609.0).

## 0.118.0 — 08.11.2026 [#01180--08112026]

### Added [#added-2]

- **`tg config set` takes `crm.<provider>:<account>.links` and `crm.<provider>:<account>.company-types`**, the
  store settings a CRM tool's sync reads (cli-core 0.606.0).

### Changed — may break callers [#changed--may-break-callers-4]

- **tg opens the store that memo and the other WireCat tools now migrate, and moves it to store version 57.** A store
  at version 56 or later is refused by tg 0.117.0 and older, and by every tool built on a cli-core older than 0.606.0,
  with a request to upgrade. Upgrade tg, max and memo together (cli-core 0.606.0, 0.607.0).
- **`--offline` on a command that needs Telegram answers `permission_error` (`offline.refused`), exit code 5.**
  `chats inspect`, `chats send-as`, `topics` and `upgrade` answered `validation_error`, exit code 2. A script that
  checks for exit code 2 there needs the new code (cli-core 0.607.0).
- **`contacts context` and `contacts prepare` read only accounts of the profile's own scope.** A personal profile no
  longer shows a linked person's mail, messages, events or meetings from work accounts, and a work profile none from
  personal ones. The answer's new `accounts` lists every account read, with its scope (cli-core 0.605.0).
- **A name typed with е finds the chat or person named with ё.** A name that matched one chat or person exactly may
  now match two (`Алена` and `Алёна`); tg then refuses it and lists both, as for any other ambiguous name
  (cli-core 0.601.0).
- **Searches read more queries as plain words.** A `?` that ends a word is a question mark, so `invoice?` finds
  "invoice". Text with a colon, a URL, a bracket or an unbalanced quote (`meeting at 10:30`) is searched as words
  where it was refused (cli-core 0.602.0, 0.604.0).

### Fixed [#fixed-2]

- **A damaged store file stops writes and names `tg store recover`.** A run that hit SQLite's "database disk image is
  malformed" crashed as `internal_error`; it now answers `configuration_error` (`store.damaged`), and later commands
  that write refuse until a deep check or a recovery passes. Reads still work (cli-core 0.605.0).
- **People you separated stay apart.** A third identity with the same e-mail address could join two people again
  after you moved them apart (cli-core 0.605.0).

## 0.117.0 — 07.11.2026 [#01170--07112026]

### Changed — may break callers [#changed--may-break-callers-5]

- **`schedule agent` and `schedule command` take `--deliver-to <route>`, no longer `--to <route>`.** In tg `--to`
  already names a message's recipient. `schedule list` names the routes `deliver_to`; schedules saved with `--to`
  keep delivering (cli-core 0.600.0).

### Fixed [#fixed-3]

- **Opening the store no longer drops SQLite's file locks.** It used to open the file with truncate, which released the
  POSIX locks other processes held, so two writers could overlap (cli-core 0.599.0).
- **A write that Ctrl-C or Telegram's own server failure cut short ends as `outcome_unknown`.** A bot's write cut by
  a stop said `cancelled`, and one answered with HTTP 5xx said `provider_unavailable`, as did an account write that
  Telegram failed with an internal error. Telegram may have carried each of them out, and a caller told "cancelled"
  could send the message twice. A read keeps `cancelled` and `provider_unavailable`.
- **An account write that Telegram fails with an internal error is sent once, not again and again.** mtcute repeated
  every request Telegram answered with 500, -500 or -503, with no limit, so a create, join, edit or delete could be
  carried out twice. A write now goes once and ends as `outcome_unknown`; a read is still asked again, and a
  `FLOOD_WAIT` is still waited out. A -500 or -503 now reads as `provider_unavailable`, not as a refusal.
- **A bot's refused request no longer repeats Telegram's own text.** That text may quote a chat's title or
  somebody's message, so the error now says what happened in fixed words, chosen by Telegram's error code, and names
  a new supergroup id or a wait only from Telegram's documented fields. "chat not found" is now `validation_error`,
  as Telegram answers it with 400; it was `not_found`, picked from the words.
- **`tg account update` that Telegram failed with an internal error ends as `outcome_unknown`.** The name, bio or
  photo may have been changed, and it said `provider_unavailable`.

## 0.116.0 — 05.11.2026 [#01160--05112026]

### Fixed [#fixed-4]

- **A Bot API call no longer keeps the finished command in memory for 30 seconds.** Its time limit was a timer that
  ran to the end even after Telegram answered, and it held everything the command had loaded. A process making
  many calls in a row, such as `tg bot watch` or `tg bot mcp`, grew by megabytes per call.
- **`tg account list` no longer shows a bot as an account that is not signed in.** A name that only the bot side
  uses is left out; a name that is your account and a bot too says `bot: true`. `tg mcp serve --profiles all` leaves
  bots out the same way (cli-core 0.567.0).
- **A QR login says when the code was scanned.** Telegram then takes ten seconds or more to move the login to the
  account's data centre, and tg printed nothing until it asked for the 2FA password or finished. It now prints
  `scan accepted, finishing sign-in`, with `--json` as the stderr line
  `{"event":"progress","step":"scanned","message":"scan accepted, finishing sign-in"}`, which WireCat Desktop shows.

### Added [#added-3]

- **`tg config migrate` writes each setting the file lacks into `defaults` at its default, and every write tg makes
  to the file adds them too.** You then find and edit `limit`, `sends_per_hour`, `record` and the rest in
  `config.json` without the docs. Your values, their order and keys tg does not know stay; `config unset` does not
  put back what it removed, and a plain read never rewrites the file. `tg config show` gives each setting's default
  and what it does (cli-core 0.563.0).
- **From cli-core 0.563.0:** `config repair` mends the settings file's JSON syntax; `stats messages responses` and
  `stats messages waiting`; `tasks status`, `tasks review` and `tasks acknowledge`; `tasks add --open-new`.
- **From cli-core 0.564.0–0.567.0:** `store chats status` counts the chats the archive holds back to the first
  message, in part, or not at all; `stats tasks show` takes a query and counts the tasks opened and closed
  in a period (`-- created>=30d`); `has:transcript` finds voice messages that have a transcription.
- **`tg bot list` needs no profile word** (`tg <profile> bot list` still works; cli-core 0.567.0).

### Changed — may break callers [#changed--may-break-callers-6]

- **A new error code, `conflict` (exit 15), is in `tg commands --json` and the MCP tools' error schema**
  (cli-base 0.77.1). It means a write was refused because what it changes moved on since it was read. A change to a
  task that someone else changed since you read it now fails with it, not `configuration_error`, exit 3; the reason
  stays `task.stale` (cli-core 0.567.0).
- **`search all` ranks every source as one list, searches mail by meaning too, and finds records for a question
  typed as a sentence** (cli-core 0.564.0). Before, each source's hits took turns, and a question found only records
  that held every one of its words.

## 0.115.0 — 03.11.2026 [#01150--03112026]

### Added [#added-4]

- **`wcat tg` runs the tool, and `wcat --help` lists it.** The package installs `wcat-tg` beside `tg`, and
  `wcat-tg --wcat-describe` prints the tool's name, version and description for `wcat`.

The entries below shipped in 0.114.0 and were missing from its notes, or described wrongly there.

### Changed — may break callers [#changed--may-break-callers-7]

- **`server install` fails where `systemctl --user` (or `launchctl enable`) does not work**, after it wrote the unit,
  instead of answering success. On macOS `server stop` only unloads the agent: it starts again at the next login, as a
  systemd unit does; `server uninstall` stops that. (cli-core 0.552.0)

### Fixed [#fixed-5]

- **The 0.114.0 notes said `--full-history` reads past the history limits for one run.** It reads one named chat:
  `messages sync <chat> --full-history` reads that chat past the limits and keeps it in full from then on.
- **`search messages --brief` keeps only the reference, chat, time, sender, excerpt and score.** It printed every field.
  (cli-core 0.551.0)
- **An MCP call whose answer names a step only the person can take no longer fails as a bug.** (cli-core 0.551.0)

## 0.114.0 — 02.11.2026 [#01140--02112026]

### Added [#added-5]

- **`projects evidence` and `projects status` take `--purpose`** to pick the linked chats they read:
  `--purpose sales,work` or `--purpose all`. A chat left out is listed with its message count and the command that
  reads it. (cli-core 0.553.0)
- **`projects evidence --include-proposed`** also reads chats and members proposed for the project and not yet
  confirmed, and marks what they brought. `--compact` now prints rows for `projects evidence`. (cli-core 0.553.0)
- **`serve` reads back what arrived while it was off.** Telegram's own catch-up gives up on a gap it finds too long
  after a long downtime. 30 seconds after connecting, `serve` now reads back each chat that has newer messages than
  the store held when it started: at most 7 days back, 500 messages a chat and 5 minutes in all. After more than a
  week offline, run `tg <profile> messages sync --all` once. (cli-core 0.552.0)
- **`server install` enables the service**, so `serve` starts at every login and after a reboot. A service an older
  tg installed is not enabled: run `tg <profile> server install` again. `server status` says `starts_at_login`.
  A service installed from a development checkout is written but not enabled. (cli-core 0.552.0)
- **`messages sync` keeps to the history limits**: by default it skips a group of more than 50 people
  (`history_group_members_max`) and reads a group 365 days back and a one-to-one chat 1095 days back
  (`history_group_days`, `history_dialog_days`), and says what it left out under `limited`. `--full-history` reads
  past them for one run; raise the settings to keep reading big groups. Live messages are never dropped.
  (cli-core 0.551.0)
- **`tg <profile> projects status <project>`** says where a project stands, from the store alone. (cli-core 0.551.0)
- **`--compact`** prints one line per item for an agent, from the same answer `--json` prints. (cli-core 0.550.0)
- **`messages list` reads a window bounded on both sides**, offline too. (cli-core 0.547.0)
- **A command that takes a chat or a message also takes the reference other WireCat tools print**
  (`msg:…`, `chat:…`). (cli-core 0.546.0)

### Changed — may break callers [#changed--may-break-callers-8]

- **`projects evidence` and `projects status` read only work chats by default.** A linked chat with no purpose
  counts as work; one linked for `sales`, `support` or `other` is now left out unless `--purpose` names it or
  `--purpose all` is given. (cli-core 0.553.0)
- **A search that runs out of time fails with `timeout` and reason `query.time-limit`**, in about 2 s, instead of
  `validation_error` / `query.too-large` after running far past the limit. The query was valid; add `chat:` or `date:`
  to search less of the store. (cli-core 0.552.0)
- **A text of the form `<kind>:<no spaces>` given as a chat is read as a reference**, and a reference to another
  account or messenger is refused with its own reason. An option after `--` is read as an option. (cli-core 0.546.0)

### Fixed [#fixed-6]

- **A sync whose output reader goes away finishes its work.** A closed pipe used to abort it. (cli-core 0.552.0)
- **`messages delete` with no message id refuses before it connects.** (cli-core 0.551.0)
- **`page.next` of `messages list` runs as written, and an inclusive start keeps a message sent exactly at it.**
  (cli-core 0.547.0)
- **A timer's run that finds the keyring locked is temporary, not a failed sign-in.** A schedule that caught up at
  boot, before the login unlocked the keyring, ended with `authentication_error` (exit 4), as if the owner had to log
  in again. A run under a timer (`TG_SCHEDULED`) now ends as `serve` does: `provider_unavailable` (exit 12) with reason
  `credentials.unreachable`, which `schedule exec` (cli-core) tries again until the login. A command typed by hand
  still answers `authentication_error`, and a profile that never logged in here still exits 4.

## 0.113.0 — 02.11.2026 [#01130--02112026]

### Added [#added-6]

- **`tg <profile> messages download --offline` copies a file this computer already holds**, without connecting;
  `--attachment <n>` picks one file of a message, and a `msg:` locator can stand for the chat and message.
  (cli-core 0.532.0)
- **The first run of a new version refreshes the agent instructions an older one installed.** A stale
  `SKILL.md` copy (Claude Code, `~/.agents/skills`, Hermes) is rewritten once, with one line on stderr; a missing,
  unversioned or symlinked copy is left alone. `TG_NO_SKILL_REFRESH=1` turns it off. (cli-core 0.544.0)

### Security [#security-1]

- **An agent can no longer loosen permissions from its own shell.** `tg <profile> config set|unset permissions…`
  run by an agent (Hermes, OpenClaw, Claude Code and others that mark their shell) may only tighten a level, never
  loosen it, and `mcp.authority` and `bot.api` stay the owner's. So the read-only the desktop app sets holds, even
  when a chat message talks the agent into running `config set`. Change permissions in a terminal outside the agent.
  (cli-core 0.544.0)

## 0.112.0 — 01.11.2026 [#01120--01112026]

### Added [#added-7]

- **A forum topic's icon: `topics create --emoji <emoji>` and `topics edit --emoji <emoji>`.** The emoji must be in
  Telegram's default topic icon set, which every account may use, Premium or not; `tg <profile> topics icons list`
  shows it. Another emoji is refused, and the error lists the set. `topics edit --emoji none` removes the icon, and
  the topic shows its colored default again. (cli-core 0.531.0)
- **Tasks carry `project_key`, `project_name` and `created_by`**, and `schedule` commands gain real examples and
  argument help. (cli-core 0.531.0)

## 0.111.0 — 01.11.2026 [#01110--01112026]

### Added [#added-8]

- **`projects evidence --json` gives the sync command for each linked chat** as `linked_chats[].sync_command`: the
  line the text shows to sync a chat held in part, or null. (cli-core 0.517.0)

### Fixed [#fixed-7]

- **`projects evidence` no longer says "held from <date> only"** for a chat that reaches its first message: it says
  "held from its first message, behind since <date>", or "with gaps". `messages sync` progress says how far back it
  got as a date ("back to <date>"), not as a message key. (cli-core 0.517.0)
- **The agent skill starts a search with `search messages`, and adds notes and Drive documents only when the owner
  asks** (`search all`). It also says that over MCP `ask` does not ask: the owner turns on write approval in their
  client. ClawHub's review flagged both in skill 1.0.1.

## 0.110.0 — 01.11.2026 [#01100--01112026]

### Added [#added-9]

- **`tg <profile> projects evidence <project>`** (cli-core `projectsCommand`). It shows what this account's stored
  messages hold about a project: its name, key, aliases, words, contacts, confirmed members and confirmed linked
  chats. **`--sync-first`** (off by default, not on MCP) first syncs the linked chats the store does not hold back to
  `--since-time`, one at a time, inside `--sync-time` (3 minutes in all). A chat the time cuts stays partial, with
  its `missing` and `next`. The `messages` permission guards it. (cli-core 0.511.0)
- **`messages sync --json` prints its progress on stderr**, counts only (cli-core 0.507.0). tg now needs
  `@wirecat/cli-base` 0.68.1, as cli-core 0.507.0 asks.

### Changed — may break callers [#changed--may-break-callers-9]

- **`search messages --discover` searches by meaning when the query uses `-`, `NOT`, `OR`, groups, phrases or
  `exact:`** (cli-core 0.506.0). Such a query ran strict search alone. Now its words still match the whole query
  (`discovery.method: "lexical-strict"`), and messages near in meaning to its wanted words join them. Every hit found
  by meaning, and every reply and follow-up added, matches every field of the query and every excluded word.

### Fixed [#fixed-8]

- **`search messages --discover` with a narrow filter (`chat:`, `date:`) ranks that filter's own messages by
  meaning** when it holds at most 100,000 messages, instead of the 100 nearest overall, so it fills its page
  (cli-core 0.506.0).
- **`search messages --discover` works on a read-only store** (cli-core 0.506.0).
- **A long rebuild in one process no longer makes another process's write fail with "database is locked"**
  (cli-core 0.506.0).

## 0.109.0 — 31.10.2026 [#01090--31102026]

### Added [#added-10]

- **`search messages` and `search notes` say how many match in all: `page.total`** (cli-core 0.501.0). `--json` adds
  `page.total: { value, relation }`, shaped as Elasticsearch's `hits.total`: `eq` is the exact count, `gte` a lower
  bound (counting stops at 10,000). The terminal adds `showing 1–20 of 144` under the hits.
- **`search messages --discover` shows follow-ups**, later messages that may cancel or change a hit, and no longer
  fails on a question with a time or a ratio ("until 22:00?") (cli-core 0.492.0, 0.496.0).
- **`messages list --offline`, `search messages` and `search all` say when the store holds a chat only in part**,
  with the `messages sync` step that would fill it (cli-core 0.493.0).
- **Voice messages can be transcribed by OpenAI: `transcribeWith: "openai"`**, with the key from
  `models keys set openai` (cli-core 0.499.0).

### Changed — may break callers [#changed--may-break-callers-10]

- **tg requires cli-base 0.67.0** (cli-core 0.501.0).
- **`search messages`, `search all` and `messages list --offline` answer `meta.complete: false`** when a chat they
  read is held only in part, with `missing` and `next` naming it (cli-core 0.493.0). A script that read
  `meta.complete` as "every source answered" now also sees the archive's gaps.
- **An unknown `transcribeWith` in a profile refuses to transcribe** with `validation_error`, naming the four values;
  any value other than `local` used to mean asking Telegram first (cli-core 0.499.0).

### Fixed [#fixed-9]

- **`search notes` keeps the query's fields for notes found by meaning, and ranks a narrow filter's own notes by
  meaning** (cli-core 0.496.0, 0.501.0).

### Security [#security-2]

- **A run with moved folders no longer copies the owner's sign-in into the keyring when it refreshes a token**
  (cli-core 0.494.0).

## 0.108.0 — 31.10.2026 [#01080--31102026]

### Changed — may break callers [#changed--may-break-callers-11]

- **Notes, documents, annotations and contact notes are found by part of a word, in any letter case.** `tg personal
  search notes 'ontra'` now finds «Contract», and a mixed-case Cyrillic word is no longer missed. The title is searched
  too, not only the text, and a search answers in milliseconds. A query of one or two characters is refused with
  "search needs at least three characters", as message search is. The first run after the update upgrades the store
  (version 40) and fills the new index in batches; until then older notes are matched as before. An older `tg` does not
  index new notes in an upgraded store, so update every CLI that shares it (cli-core 0.491.0).

## 0.107.0 — 30.10.2026 [#01070--30102026]

### Fixed [#fixed-10]

- **Chat titles and contact names match in any case and any alphabet.** `tg personal chats list 'title:*ТАРТ*'` now finds
  «Тартус»; before, only Latin letters ignored case. The same holds for contact names and for the names of projects,
  tags, mail subjects, mailboxes and labels that the shared store keeps. The first run after the update upgrades the
  store (version 38) and fills the new lowercase copies of what it already holds. An older `tg` keeps working on the
  upgraded store, and tells you to update (cli-core 0.484.0).

## 0.106.0 — 29.10.2026 [#01060--29102026]

### Added [#added-11]

- **`contacts sync` saves each contact's phone** when Telegram shows it, so `contacts show --offline` answers it. An
  online `contacts show` saves the phone it reads too. Needs cli-core 0.479.0 (store version 37).
- **A shared contact card shows its name and whole phone**, online and from the store (`--offline`). `contacts show`
  carries the profile `contacts info` gave, and `--hide-phone` leaves the number out of `account show`,
  `account update` and `contacts show`. Needs cli-core 0.477.0.
- **`tg <profile> reactions list <chat> <message>` shows who reacted to a message**, newest first, with the reaction and
  when. `reaction:<emoji>` keeps one emoji, `--limit` and `--cursor` page it. It reads only, so a read-only profile
  and MCP can use it (permission key `reactions.list`). Where Telegram hides the list — a channel
  (`reactions.broadcast`) or a chat that turned it off (`reactions.list-hidden`) — it fails with that reason instead of
  an empty list. Needs cli-core 0.477.0.

### Changed — may break callers [#changed--may-break-callers-12]

- **Phone numbers are shown whole**, and `contacts info` is `contacts show`. `--show-phone` is gone: a script that
  passes it fails as an unknown option, so drop it. The MCP tool `contacts info` is gone too; `contacts show` takes
  its place, and a saved permission `contacts.info` is refused with the `config unset` that removes it.

### Fixed [#fixed-11]

- **`inbox`, `review`, `search messages` and `search all` answers carry `sender_is_me`**, as 0.473.0 promised, so a
  script can tell the owner's own messages from others in them too (cli-core 0.478.0).

## 0.105.0 — 29.10.2026 [#01050--29102026]

### Changed — may break callers [#changed--may-break-callers-13]

- **The agent skill is listed on ClawHub as `wirecat-tg`.** Install it with
  `openclaw skills install @wirecat/wirecat-tg`. The `tg-cli` listing is no longer updated.
  `tg skill install` still writes `skills/tg-cli/`.

### Fixed [#fixed-12]

- **The help and [the command reference](/llms.mdx/docs/tg/commands/content.md) show `tg mcp serve --profiles work,personal`** without a
  profile in front. 0.104.0 showed `tg personal mcp serve --profiles work,personal`, which `tg` refuses ("name one
  profile or --profiles, not both"); the `--profiles all` examples of `mcp revoke` and `mcp config` had the same
  mistake. After `tg upgrade`, the hint to restart a background server of several profiles keeps its `--profiles`
  (cli-core 0.474.0).

## 0.104.0 — 29.10.2026 [#01040--29102026]

### Changed — may break callers [#changed--may-break-callers-14]

- **An MCP server serves only the profiles you name.** `tg mcp serve` with no profile now refuses (exit 2) and lists
  your profiles. Name one (`tg work mcp serve`), a list (`tg mcp serve --profiles work,personal`) or every profile
  (`tg mcp serve --profiles all`); the line on stderr at start names the profiles served. The same choice applies to
  `--http`, `mcp revoke`, `mcp config` and `mcp server start|stop|status`. An app entry that runs `tg mcp serve` with
  no profile stops working: print it again with `tg mcp config --profiles all`, or name a profile. A background
  server of every profile started by an older `tg` is stopped by `tg upgrade`; start it again with
  `tg mcp server start --profiles all`. The MCP Registry entry now runs `tg mcp serve --profiles all` (cli-core
  0.470.0).

### Added [#added-12]

- **Every message `tg` prints has `sender_is_me`**, true for a message you sent, in `messages list`, `show`,
  `context`, search windows and `inbox` (cli-core 0.473.0).
- **`tg runs show` keeps the network's error code of a failed run** (`error.cause_code`, such as `ETIMEDOUT`), never
  the server's text (cli-core 0.473.0).

### Fixed [#fixed-13]

- **`--offline --transcribe` says which voice messages it did not transcribe.** They are in `missing`, with the
  `tg <profile> messages transcribe <chat> <id>` command to run (cli-core 0.473.0).
- **Each MCP tool call has its own `run_id`** in its answer and in `tg runs` (cli-core 0.471.0).

## 0.103.0 — 27.10.2026 [#01030--27102026]

### Changed — may break callers [#changed--may-break-callers-15]

- **cli-core 0.469.0 and cli-base 0.65.0.** cli-core 0.469 accepts only cli-base 0.65, so both pins move together.
  cli-base 0.65 knows the verbs `serve` and `revoke`, so their lint baseline entries are gone, and its `cli-dev bundle`
  finds a server started with a flag before `mcp serve`. From cli-core 0.468, an MCP server offers a command that only
  fetches into the store through its read tool.

### Fixed [#fixed-14]

- **`tg --version` answers before any of the bundle loads.** The bundle is now built by cli-base's shared
  `cli-dev bundle` instead of tg's own `scripts/bundle.ts`; the chunks and every output are the same. A server started
  with a flag before `mcp serve` (`tg work --read-only mcp serve`) now loads every chunk soon after it starts, as a
  plain `mcp serve` does, so an in-place upgrade cannot pull a chunk from under it.

## 0.102.0 — 27.10.2026 [#01020--27102026]

### Changed — may break callers [#changed--may-break-callers-16]

- **Every run is now kept, the ones that worked too.** A run that worked is kept 7 days
  (`keep_successful_runs_for_days`), a failed one 30 (`keep_runs_for_days`), and the runs folder stays under 200 MB
  (`runs_size_limit_mb`). With `record_input` on, as by default, a `send` that worked now keeps what you typed (the
  message, a chat named by its title) in a run readable only by you, on this computer, for 7 days.
  `record_input failed` keeps it only in a run that failed; `record false` keeps failed runs only; `--no-record`
  keeps nothing. `watch`, `serve` and `mcp serve` keep a run that worked only with `--record`. A run now says who
  asked for it: the command line, an MCP app (and its tool call), or WireCat Desktop (cli-core 0.467.0).

### Added [#added-13]

- **`tg runs show` lists each request Telegram got, with its timing, retries and waits.** A command's run now has a
  line for every call to Telegram, for an account and for a bot: the method (`messages.getHistory`, `sendMessage`),
  how long it took, and how it ended. When Telegram asks to wait (`FLOOD_WAIT`, or a Bot API `429`) and `tg` waits
  and tries again, the run shows the refused call, then the retry as attempt 2 with the time waited. Message text,
  names, phone numbers and the bot token are never written.

## 0.101.0 — 27.10.2026 [#01010--27102026]

### Changed — may break callers [#changed--may-break-callers-17]

- **The MCP server is `tg <profile> mcp serve`; `tg <profile> mcp` alone prints help.** Browser logins are
  forgotten with `tg <profile> mcp revoke` instead of `mcp --revoke`. A bot's server is `tg <name> bot mcp serve`.
  An app entry that runs `tg personal mcp` must change to `tg personal mcp serve`: run `tg personal mcp add <app>`
  or `tg personal mcp config` again. `mcp server start` and the entries `mcp config` prints already run the new
  command (cli-core 0.463.0).
- **`tg skill show|status|install --json` print `{ item, meta }`.** The skill's fields moved under `item`; the
  Windows installer reads them from there (cli-core 0.462.0).
- **Search hits of every kind, and `tg topics show`, name the fields an agent must read as data** (`untrusted`, for
  example `["title"]` on a forum topic). A caller that checks them against an older, strict copy of the schema
  refuses the new field (cli-core 0.464.0).
- **`tg account list` says whether each profile is signed in on this computer** (`signed_in`). A caller that checks
  the items against an older, strict copy of the schema refuses the new field (cli-core 0.466.0).

### Added [#added-14]

- **`tg search all` also finds calendar events in the shared store**, marked as untrusted text for agents, and
  `contacts context|prepare` name one more field (cli-core 0.453.0–0.461.0).
- **`tg upgrade` restarts the browser MCP server it started and names the agent sessions still on the old version.**
  After an install, each `tg mcp serve --http` that `tg mcp server start` launched starts again on the same port,
  address and limits (`mcp_servers`, old → new version); one started by hand is left running and named. Agent
  sessions over stdio still on the old version are listed (`stale_sessions`): restart them from your agent app. This
  works from the next upgrade on (cli-core 0.464.0).

### Fixed [#fixed-15]

- **`tg mcp serve` with no profile marks the profiles that are not signed in.** It listed every profile with an
  account file, so an app could pick one with no session and fail. Each profile is now labelled
  (`default — not signed in`) in the app's menu and in the description, and a call for one that is not signed in
  answers how to sign it in: `tg <profile> setup`, or from WireCat Desktop. The MCP registry entry and the Glama
  image start `tg mcp serve`.
- **The login page of the browser MCP server says each code works for one login.** After an app logs in, a new code
  appears in WireCat Desktop and in `tg mcp server status`; typing the old one again said only "Wrong code"
  (cli-core 0.466.0).

## 0.100.0 — 27.10.2026 [#01000--27102026]

### Fixed [#fixed-16]

- **Commands start about 0.2 s sooner: the package runs from a bundle.** A command loaded about 1,110 module files
  before doing any work; it now loads about 55 that hold the same code. `tg messages list --help` went from 389 to
  192 ms, and from 534 to 272 ms on the first run after an install or a reboot. A command that connects still loads
  Telegram's client library as before. Output is unchanged. The package is larger: 3.0 MB to download instead of
  0.5 MB, 16 MB on disk instead of 4 MB. A running `tg serve`, `watch` or MCP server loads all of its code a few
  seconds after it starts, so upgrading `tg` under it does not leave it unable to find a file it had not used yet.
- **Tg's agent skill publishes to ClawHub as `tg-cli` again.** ClawHub keeps skill names per publisher, so
  `wirecat/tg-cli` is tg's own name even though another publisher has a `tg-cli` too, and every WireCat tool's skill
  now uses its plain name. `tg skill install` still writes `skills/tg-cli/`.

## 0.99.0 — 27.10.2026 [#0990--27102026]

### Fixed [#fixed-17]

- **With no session, the error and the MCP instructions also offer WireCat Desktop.** `no session`, `not logged in`
  and missing app keys now say: run the command in a terminal, or sign in from WireCat Desktop (Tools → Telegram →
  Manage). Over MCP the agent is told never to ask for codes or passwords (cli-core 0.452.0).
- **Tg's agent skill publishes to ClawHub as `wirecat-tg`.** The ClawHub name `tg-cli` belongs to another publisher,
  so tg's skill could not be listed under it. `tg skill install` still writes `skills/tg-cli/`.

## 0.98.0 — 27.10.2026 [#0980--27102026]

### Fixed [#fixed-18]

- **Meaning search and `--discover` run on the native ONNX Runtime on Windows too (cli-core 0.451.0).** After
  `tg <profile> models download`, text models and the reranker use the native library on Windows x64 and arm64, as
  they already did on Linux and macOS: 2–3× faster than WebAssembly. The download takes `onnxruntime.dll` from the
  `onnxruntime-node` npm package (113.5 MB, once, checked by sha256). Picture models (CLIP, SigLIP2) now use the
  native library as well, wherever it is installed. Results are the same.

## 0.97.0 — 27.10.2026 [#0970--27102026]

### Added [#added-15]

- **`tg mcp` with no profile serves every profile, on stdio and with `--http` (cli-core 0.450.0).** An AI app needs one
  connector for Telegram, not one per profile. Each tool (`tg_tools_search`, `tg_read`, `tg_write`) takes a required
  `profile` (every profile here, no default) and the agent is told to ask when you did not name the account. The call
  runs in that profile's own `tg <profile> mcp`, started on first use and closed after 10 idle minutes, so each
  profile's permissions, session and audit log apply as before. `tg mcp --revoke`, `tg mcp config` and
  `tg mcp server start|stop|status` work without a profile too, with their own login. `--public-url` takes a path,
  `https://<name>.ts.net/tg`, so the tools share one tunnel address. The MCP Registry entry starts `tg mcp`.
  `tg <profile> mcp` is unchanged.

### Changed — may break callers [#changed--may-break-callers-18]

- **tg needs cli-base 0.63.0 (cli-core 0.450.0).** Nothing tg uses changed in it.

## 0.96.0 — 27.10.2026 [#0960--27102026]

### Fixed [#fixed-19]

- **Every command spends less time getting ready (cli-base 0.62.0, cli-core 0.449.0).** The check of shared commands now
  describes each command once, not again for every group above it. A warm `run(["--version"])` went from 49 to 29 ms.
  It catches the same changes as before.
- **Commands outside `bot api` start faster: its 185 generated Bot API commands are built only when needed.** `tg messages list`, `tg --help` and the other commands no longer load about 1.5 MB of generated code. `bot api`, `bot --help`, `bot mcp`, `commands`, `complete`, `help`, `mcp`, `serve`, `config` and `doctor` still build the group, and so does any command when the config saves a `bot.api` permission. Output is unchanged.
- **Search by meaning and `search messages --discover`'s reranker run 2–3× faster on Linux and Apple-silicon Macs after the next `tg models download` (cli-core 0.448.0).** The download installs a native ONNX Runtime, and the models run on it; without it they run as before. The reranker now reads only the start of the message a hit replies to (cli-core 0.447.0).

## 0.95.0 — 26.10.2026 [#0950--26102026]

### Added [#added-16]

- **`tg <profile> session start --json --answer-stdin` signs in without a terminal, for WireCat Desktop (cli-core 0.443.0).** Each question is a `needs` line on stderr (`{"event":"needs","field","secret","prompt","hint"}`: `api_id`, `api_hash`, `phone`, `code`, `password`) and its answer is one line on stdin; my.telegram.org is an `open_url` line. Without `--answer-stdin`, a run with no terminal still refuses, so an agent's shell never waits on a question. Answers are never printed and never kept in a run record.

- **`tg <profile> mcp server start|stop|status` runs the HTTP MCP server in the background (cli-core 0.445.0).** `start` takes `--public-url`, `--port` and `--permission` as `mcp --http` does and returns once the server listens; `status` gives the port, the address, the one-time login code and the apps that logged in; `stop` ends only the server it started. WireCat Desktop starts and stops it from the tool's Manage panel.

### Changed — may break callers [#changed--may-break-callers-19]

- **A run record keeps the command line as typed (cli-core 0.439.0 to 0.447.0).** `runs show` and `run.json` carry `argv`, the words after `tg`, with secrets `[redacted]` (a secret-named option, a password in a URL, a known token format, a random-looking string) and a phone number never kept. `tg <profile> config set record_input false` keeps `[redacted]` in place of every typed value that may be text. Recorded events still hold ids, never a chat's title or a message's text.

## 0.94.0 — 26.10.2026 [#0940--26102026]

### Added [#added-17]

- **`tg skill install --for hermes` gives Hermes Agent the skill, and `tg skill status` says what Hermes reads (cli-base 0.59.0).** It adds `~/.agents/skills` to Hermes's `skills.external_dirs` through `hermes config set`, keeping the folders already listed, or copies the file into Hermes's home when that fails. With no Hermes installed it fails with `not_found` and writes nothing. A bare `tg skill install` and `--for all` still write only the Claude Code and `~/.agents/skills` copies. `skill status --json` gains `hermes` beside `targets`.
- **A run started by OpenClaw or Hermes Agent names that agent (cli-core 0.437.0).** `runs show` gives `agent` as `openclaw` for a command OpenClaw's agent ran, with `from_chat: true` when a chat message started it; a Hermes run carries its session, so a task claim from Hermes is held per session.
- **The `tg-cli` skill tells OpenClaw and ClawHub that it needs `tg`, and how to install it** (`metadata.openclaw`: `requires.bins` and the npm package `@wirecat/tg-cli`). With `tg` missing from PATH, OpenClaw marks the skill not ready and offers to install the package. Claude Code and Codex ignore the block.

## 0.93.0 — 25.10.2026 [#0930--25102026]

### Added [#added-18]

- **`store reset --dry-run` lists what a reset would empty and deletes nothing** (cli-core 0.429.0): the store's files and bytes, every data table with its rows, whether a backup comes first, and whether a serve or another process has the file open.
- **`search messages --discover` also finds messages close in meaning** once e5-small is downloaded and `conversations rebuild` has given messages their own vectors (cli-core 0.432.0). Each hit's `discovery.found_by` says which search found it. Until then discovery searches by words as before and says why. Nothing is downloaded and no text leaves the computer.
- **`search messages --discover` reranks its first 50 hits once a reranker is downloaded (cli-core 0.435.0).** A local model reads the question with each hit, and its score is mixed with discovery's own; the hits after the first 50 keep their order. The default is mMARCO (136 MB, `tg models download mmarco`); the profile setting `search_reranker` picks `bge-reranker-v2-m3` (588 MB) or `off`. Each reranked hit has `discovery.reranker_score`; `score` stays discovery's. Without the model, discovery keeps its order and says `not reranked: …` (in `--json` and MCP: `missing` and `next`). A search never downloads a model and never sends text anywhere; `--exact`, `--newest` and strict queries are untouched.
- **`search all` finds messages by meaning too, once e5-small is downloaded and messages have their vectors (cli-core 0.435.0).** The meaning hits are merged with the word hits into one messages list; each item's `foundBy` says which search found it. A query with NOT, or with a filter under OR or in a group, stays words only. Without the model or the vectors, `search all` reads words as before and says why. `--exact` and `--backend server` stay words only.

### Changed — may break callers [#changed--may-break-callers-20]

- **A failed `bot` command's run names the Bot API call that failed.** `runs show` and `runs list` give its `error.http` the `method` and `endpoint_template` beside the status — `{ "method": "POST", "endpoint_template": "/:token/sendMessage", "status": 400 }` — where before they had only the status. The token is always written `:token`: Telegram puts it in the address, and the real one never reaches a run or a trace. Bot requests in `--trace` and in a recorded run carry the same two fields, and a pretty trace line shows them after the method's name (`← getMe  POST /:token/getMe  401 …`). A script that parses `--trace` text sees that extra column.
- **tg needs Node 22.19+ or 24+ (was 22.16+).** The Bot API proxy support uses undici 8, which requires Node 22.19. Bun is unaffected.
- **The shared store moves to version 34 (cli-core 0.434.0).** Search by meaning ranks through a vector index kept in the store, built on the first open by this version. Once this version opens the store, a CLI on cli-core 0.433.0 or older refuses it and asks to be upgraded, so upgrade every WireCat CLI that shares the store together. When the index's SQLite extension is missing or does not load, opening the store fails with `store.vector-extension-missing` or `store.vector-extension-failed`: reinstall tg. `store check` reports `vector_indexes` and fails when an index is out of step.
- **`tg upgrade --help` shows only `tg upgrade --check` as its example (cli-core 0.433.0).** The bare `tg upgrade` example is gone: copied and run, it upgraded.
- **Analysis through Anthropic sends the key as `Authorization: Bearer` (cli-core 0.433.0).** It used to send `X-Api-Key`. A gateway at a custom `models.<purpose>.base_url` that reads `X-Api-Key` must read `Authorization` instead.

### Fixed [#fixed-20]

- **Hermes Agent installs the `tg-cli` skill without a security warning.** Its install scan held the skill at "caution" because one sentence named the SSH folder by its path, although the sentence says tg refuses to send it. The sentence now says "SSH keys"; what tg refuses is unchanged.
- **A bot's file upload through a SOCKS5 or HTTP proxy sends the file.** Before, the proxied request carried the text `[object FormData]` instead of the form, so Telegram refused photos, documents and voice notes sent with `--proxy`.
- **A bare `--version` answers before the program loads**: the bin starts through `@wirecat/cli-core/cli/start` (cli-core 0.429.0).
- **A stored vector goes once no text in the store uses it (cli-core 0.435.0).** An image whose picture changed and a purged chat (`store clear --left`, a chat merged into another) left vectors behind, and no longer do. `store rebuild` drops the ones older versions left (`unused_vectors_dropped`), and `store check` counts them (`vectors.unused`).
- **`conversations embeddings clear --chat` drops the chat's message vectors too (cli-core 0.435.0)**, not only its conversations'.

## 0.92.0 — 25.10.2026 [#0920--25102026]

### Changed — may break callers [#changed--may-break-callers-21]

- **Permissions are checked under each command's full key (cli-core 0.421.0).** `messages sync` is checked as `messages.sync` and `bot messages sync` as `bot.messages.sync`; a level on `messages` or `bot.messages` still applies to them. A saved key is read only as written, so `chats.mute` no longer covers `chats unmute`.
- **A saved permission key that names no command is refused, for bot commands too.** For a key under a known resource, every command except `config show`, `set` and `unset` stops with a `configuration_error` that names the key and the `config unset` that removes it.
- **`tg <profile> search mail` is an unknown command.** Mail is searched with `memo search mail`.
- **`doctor --json` reports the config file's problems as `config.issues` (cli-core 0.423.0).** `config.error` is gone. Each issue has a `kind` (`invalid_json`, `unknown_setting`, `unknown_permission`, `missing_setting` or `invalid_value`), the `file`, the `profile` and `key` where they apply, `line` and `column` for invalid JSON, a sentence that says what the value has to be (never the value), and `fix`, the `config unset` command that removes it. `doctor` lists every problem in the file, still exits 0, and still answers when the JSON is broken. A profile lock, a flag or an environment variable the settings refuse is reported in `settings.error`.
- **`default_profile`, `analysis_provider`, `analysis_model` and `analysis_base_url` are unknown settings, and `TG_ANALYSIS_PROVIDER`, `TG_ANALYSIS_MODEL` and `TG_ANALYSIS_BASE_URL` are not read.** A file that has one is refused like any unknown setting, with the `config unset` that removes it. Analysis is set with `models.analysis.provider`, `models.analysis.model` and `models.analysis.base_url` (`TG_MODELS_ANALYSIS_*`); `--model` and `--base-url` of `conversations links rebuild` override those.
- **A command refused for a problem in the config file names the first problem and the command that removes it**, and says how many more `doctor` lists. `config show`, `set` and `unset` run on such a file, and `config unset` removes a setting no schema knows. An unknown permission key in any section of the file is refused, not only in the sections the command reads.
- **`config set` saves `config.json` readable by you only (`0600`) (cli-core 0.428.0, cli-base 0.57.0).** It used to rewrite the file as `0644`. Anything that reads the config as another user — a system-wide service, a container under another uid — can no longer read it after the next save; run it as the owner, or give it its own config.
- **A run record names how it was started and why it failed (cli-core 0.425.0).** `run.json`, `runs list`, `runs show` and `search runs` gain `cli_command` (the whole command, `tg messages list`), `argv` with every value that may be content written `[redacted]`, `agent` (the coding agent and its session, where it gives one) and, for a failed run, `error`. A run with no profile named leaves `profile` out instead of recording `default` (cli-core 0.424.0).
- **The first screen says zm and drive are "searchable with your other WireCat data"** (cli-core 0.426.0), and `guide`'s example names a real scenario instead of `<name>`.

### Added [#added-19]

- **`tg skill status` and `tg skill show --for claude|agents`** (cli-base 0.56.0, through cli-core 0.427.0). `skill status` says, for Claude Code and for `~/.agents`, whether the installed SKILL.md matches this version; `skill show --for` prints the copy installed there.
- **`tg store tables list` lists every table of the local archive** with its kind and rows; `--full` adds each table's size (cli-core 0.427.0). `store info` also says which tools opened the store, its journal mode, pages, migrations and last backup, and counts by provider, chat kind, account, year and attachment kind.

### Security [#security-3]

- **`doctor` reports a `config.json` or config folder that other users can read, with the `chmod` that fixes it (cli-core 0.428.0).** `files.problems` lists the config file (wants `0600`) and its folder (wants `0700`), also when `TG_CONFIG_DIR` names the folder, and stderr prints `to make it private: chmod 600 '<path>'`. `files` is in the answer also with no profile named and when the settings are refused. Nothing is changed on disk; Windows is not checked.

### Fixed [#fixed-21]

- **Every command starts faster: Telegram's client library is loaded only when a command connects.** `tg --version`, `--help`, `config show` and `runs list` loaded about 1,900 module files, 650 of them mtcute's; now about 1,100.
- **A deny saved on a sync command now stops it.** `permissions.messages.sync: deny` can be saved and is honoured, and `permissions.bot.messages.sync: deny` is no longer ignored. A denied `bot.messages` also stops `bot messages list` and `bot messages sync` before they connect.
- **A crash in the middle of a command is reported like any other failure.** It used to print Node's stack trace; now it prints the `internal_error` failure (`command.crashed`) — one line at a terminal, the JSON error object otherwise — and still exits 1. A stack trace tells a script nothing it can act on, and can carry text that should not reach the screen. A script that read the stack trace on stderr reads the error object instead.

## 0.91.0 — 25.10.2026 [#0910--25102026]

### Changed — may break callers [#changed--may-break-callers-22]

- **The shared store moves to version 33 (cli-core 0.420.0).** Once this version opens the store, a CLI on an older cli-core refuses it and asks to be upgraded, so upgrade every WireCat CLI that shares the store together.

## 0.90.0 — 25.10.2026 [#0900--25102026]

### Changed — may break callers [#changed--may-break-callers-23]

- **`tg <bot> bot store fetch` is now `tg <bot> bot messages sync`, and the `bot store` group is gone.** It reads a channel's or supergroup's older messages into the bot's local copy, which is what the personal `messages sync` does, so it carries the same name; `store` is for the local database. The options are unchanged. The old path answers with a pointer to the new one. A saved `permissions.bot.store.fetch` is refused until you rename it to `permissions.bot.messages.sync`.

## 0.89.0 — 25.10.2026 [#0890--25102026]

### Changed — may break callers [#changed--may-break-callers-24]

- **A banned Telegram account returns `permission_error` (exit 5).** A new login cannot lift a ban; this uses the same reason/code contract as the other CLIs.

- **Shared CLI contracts now require explicit provider overrides.** Command discovery exports the inherited definitions, schemas, error reasons and exact accepted differences. Contact activity uses `scope:` and `at:` queries; diagnostic run searches use `started_at:` bounds instead of time flags. Unknown chat rosters and unrestricted webhook type lists are omitted instead of `null`.

### Security [#security-4]

- **Dependency resolutions exclude vulnerable Zod and Vite versions.** Local and fresh production audits use the fixed versions.

## 0.88.0 — 24.10.2026 [#0880--24102026]

### Added [#added-20]

- `messages send --draft` saves text in the chat for you to review and send from Telegram. It supports formatting, replies and forum topics, uses the separate `drafts` permission, and never sends a message. Empty drafts and send-only options are refused.

### Fixed [#fixed-22]

- `watch --events` and `serve` receive reaction snapshots delivered as message edits, including reaction removal. Reaction counts stay current even when Telegram does not send a standalone reaction update.

## 0.87.0 — 24.10.2026 [#0870--24102026]

### Fixed [#fixed-23]

- The MCP guides describe permission-keyed writes and the separate opt-in for raw Bot API calls.
- The catch-up scenario uses `chats mark-read` as a separate command. Installation guidance explains
  how to recover when pnpm's global bin directory is missing from PATH.
- Permission-denied commands remain discoverable in CLI help and MCP with current availability, reasons and permission keys. Bot configuration stays bot-scoped, and calls still enforce current permissions.
- **`chats members check --help` gives tg's description again**: what `--deep` reads and that it sends ids to the
  public ban lists. Since 0.86.0 it showed the shared wording, which leaves both out.

## 0.86.0 — 24.10.2026 [#0860--24102026]

### Added [#added-21]

- **Send up to ten attachments as one album** by repeating `messages send --photo` or `--file`.
  Photos and videos can share an album; documents form a separate group. The caption belongs to the first
  item, and JSON includes every sent message. Each item counts toward the hourly send limit. Retrying an
  unscheduled send with the same operation id repeats the same per-item Telegram ids.

### Changed — may break callers [#changed--may-break-callers-25]

- **Shared commands have one name each, and the old names are gone** (cli-core 0.406.0). `contacts profile` is
  `contacts info`, `contacts timeline` is `contacts events`, `contacts alias set|rm` is `contacts aliases set|remove`.
  `chats link …` is `chats links …` and `chats link revoke` is `chats links remove`; `chats members audit` is
  `chats members check`; `chats requests accept|decline` is `chats requests confirm|reject`. `metadata get|refresh` is
  `metadata show|sync`, `tasks plan` is `tasks update`, `tags auto` is `tags rebuild`, `attachments text set` is
  `attachments update`, `store reindex` is `store rebuild`, `store gaps plan` is `store gaps show` and
  `stats messages counters refresh` is `stats messages counters sync`. `conversations build` is
  `conversations links rebuild`, `conversations embed status|clear` is `conversations embeddings status|clear`,
  `conversations batches next` is `conversations batches show` and `conversations consents revoke` is
  `conversations consents remove`. `models audio list` and `models text list` are `models list kind:audio|kind:text`,
  `models audio|text download` is `models download`, `models text key` is `models keys`. `doctor report create` is
  `doctor reports create` and `doctor report` is `doctor reports show`. `mcp setup` is `mcp add`, `mcp doctor` is
  `mcp check` and `commands schema` is `commands info`. An old name stops with the new one in the message; CLI and MCP
  use the same paths.
- **The hidden old option spellings are removed.** Use `--analysis-provider`, `--embedding-provider` or
  `--consent-provider` for `--provider`, `--answer-model` on `conversations links clear`, `--template-mode` on reply
  rules, `--claim` on `tags remove`, `--text-file` on `contacts notes`, and `kind:` in the `inbox` and `review` query.
- **A saved permission key with an old path stops every command with `configuration_error`** and names the key to
  rename it to, for example `permissions.conversations.embed` to `permissions.conversations.embeddings`. `config set`
  and `config unset` stop too, so rename the key by hand in `config.json`
  ([where it is](/llms.mdx/docs/tg/configuration-reference/content.md)).

## 0.85.0 — 24.10.2026 [#0850--24102026]

### Added [#added-22]

- **The first command at a terminal asks three questions once for every WireCat tool** (cli-core 0.404.0): which
  languages you write and speak, which other WireCat tools to install, and whether commands and agents may only read.
  Answered in any tool, they hold in all of them; "read only" caps every profile, over MCP too. `tg setup` asks them
  again. Agents, `--json`, `--no-input`, `CI` and `TG_READ_ONLY` are never asked.

## 0.84.0 — 24.10.2026 [#0840--24102026]

### Added [#added-23]

- **`permissions.mcp.authority` decides whether an MCP server offers the commands that change what a later run may
  do** (cli-core 0.400.0): `config set|unset`, `schedule command|agent|remove`, reply rules and consents, recipient lists,
  chat rules, `server install`, `skill install`, model keys, media archive timers and `flood clear`. It is `deny` by
  default, so an agent still cannot loosen its own limits until you run
  `tg <profile> config set permissions.mcp.authority allow` in a terminal (add `--bot` for a bot's server).
  [Permissions](/llms.mdx/docs/tg/permissions/content.md#let-an-agent-change-its-own-limits) and
  [the MCP guide](/llms.mdx/docs/tg/mcp/content.md#commands-that-change-what-a-later-run-may-do) explain it.

### Changed — may break callers [#changed--may-break-callers-26]

- **`tg mcp` offers the writes that had no permission key before, each `ask` by default** (cli-core 0.401.0): store
  backup, restore, migrate, repair, reset, clear, decrypt and copy deletion, server start/stop/restart, model downloads,
  `schedule run|exec`, `doctor report create` and `account sessions end`; the bot server offers `store fetch`. Over MCP
  `ask` goes ahead, so set a key to `readonly` or `deny` to hide a tool. `tasks duplicates` is `tasks duplicates list`.

- **`tg <profile> events list --json` writes times as ISO 8601 and ids as strings** (cli-core 0.401.0): `starts_at`,
  `ends_at`, `deleted_at`, `created_at` and `updated_at`, as every other answer does.
- **A bot's MCP server can offer `bot api`, behind `permissions.bot.api`** (cli-core 0.402.0). It is `deny` by default;
  `tg <profile> config set --bot permissions.bot.api allow` in a terminal turns it on.

- **`tg <profile> watch --jsonl` prints `{"type":"item","data":…}` lines and a final `{"type":"end","complete":true}`.**
  Read each message or event from `data`, and stop at the `end` line. Fields are snake_case. A timeout or a normal stop
  ends with `complete: true`; a failure ends with `complete: false` and its exit code.
- **`runs search` is now `search runs`.** Filters are terms in the query: `status:failed`, `error_code:timeout`,
  `operation:messages.download`, `profile:work`, next to plain words. Saved MCP requests use the new command path.
- **`stats` reports take their filters as query terms.** `--message-kind` is `message_kind:posts|comments|all`,
  `--min-messages 5` is `min_messages:5`, `--min-views` and `--max-replies` are `min_views:` and `max_replies:`,
  `--older-than 24h` is `older_than:24h`, and `--chat` is `chat:<chat>` on the rankings and reports; exact words use `exact:` in place of `--exact`. Update saved
  commands and MCP requests.

- **Options have one meaning each** (cli-core 0.399.0). Use `--analysis-provider` for analysis and `--embedding-provider`
  for vector search (`conversations build|embed|related|status`, `search conversations`), `--consent-provider` for
  `conversations consents revoke`, `--claim` for `tags remove`, `--answer-model` for `conversations links clear`,
  `--template-mode` for reply templates and `--text-file` for `contacts notes add|edit`. `inbox` and `review` take
  `kind:group,channel` in their query. The old spellings still work, hidden, for one release.

### Fixed [#fixed-24]

- **Voice-note search no longer finds a different real English or Spanish word for the one you typed** (cli-core
  0.402.0). A misheard spelling still turns up: "budget" finds "budjet", but "cost" no longer finds "cast".

- **Downloading media skips service events and keyboards** (cli-core 0.400.0). A chat with a group event or an inline
  keyboard no longer makes `attachments download` fail with `provider.invalid-response`.

## 0.83.0 — 23.10.2026 [#0830--23102026]

### Added [#added-24]

- **`tg <profile> messages press <chat> <message> <button>`, `chats start <bot>` and `chats app <bot>` work with bots.**
  `messages show` now numbers the inline buttons under a bot's message; `press` presses a callback button by its number
  or text. A button that asks for your 2FA password is refused, never pressed. `chats start` starts a bot as its Start
  button does (`--start <param>`, or a `t.me/<bot>?start=` link), and `chats app` prints the address of its mini app,
  which signs you in.
- **The skill tells an agent to search again in other words before saying something is not there.** A search
  finds the words it is given, and a paraphrase shares none with its answer.
- **`tg <profile> chats archive|unarchive|pin|unpin|mark-unread|mute|unmute <chat>`: your own chat list from the
  command line.** Telegram's archive, pinned chats, the unread dot and notifications, with `mute --until 2h` for a
  time and plain `mute` for good. They change only your list; nobody in the chat is told, and repeating one is safe.

- **Verified media backups.** `attachments download <dir>` archives available files across chats with size and
  SHA-256 manifests; `attachments check <dir>` verifies them offline. `attachments jobs` manages opt-in Linux
  daily timers. Completed copies survive interrupted runs and message-store deletion; interrupted files restart.
  `attachments move <dir> <archive-dir> --before-time <time>` moves older images into another verified archive,
  retaining relocation records so checks follow the copies and later downloads do not duplicate them.

- **`tg <profile> review --offline` reads the local store** (cli-core 0.398.0) instead of refusing. It shows only
  what was already synced and says so (`missing` in JSON, a warning on the terminal).
- **The MCP server offers more commands, each limited by the profile's permissions** (cli-core 0.398.0): `runs`,
  `store status|info|check|export|reindex`, `store jobs`, `attachments move`, `attachments jobs status`, `config show`,
  `commands schema`, `guide`, `skill show`, `doctor report`, the `models` lists, `replies status|test|consents show`,
  `schedule list`, `server status|logs`, and on the bot server `webhooks`, `commands set|clear`, `chats leave` and
  `chats admins`. [The MCP guide](/llms.mdx/docs/tg/mcp/content.md#commands-the-server-leaves-out) lists the few it leaves out, and why.

- Saved voice-note transcripts match word forms and spellings that speech recognition may have garbled.
  `text:` searches written text only; `exact:` disables expansion for that word.

### Changed — may break callers [#changed--may-break-callers-27]

- **`tg <profile> setup --json`: the command map is `item.commands`, not `item.next`.** The envelope's `next` is
  reserved for structured continuation steps, so the map of follow-up commands (`instructions`, `inbox`, `chats`,
  `history`, `history_status`, and `skill`, `mcp` when no agent skill was installed) moved to `item.commands`; the
  values are unchanged. Login details stay under `item.session`. What to do: read `item.commands.<name>` where you
  read `item.next.<name>`.

- MCP message deletion takes `message`, chat export takes `chat`, and duplicate-task operations take `task`
  and, for a pair, `other_task`. Update saved MCP requests using `messages`, `chats` or `dup`.
  CLI positional arguments keep their order.
- Command discovery (`commands` and `commands schema`) rejects `--jsonl`; use `--json` for its single document.

### Fixed [#fixed-25]

- **The docs and the skill say `search all` also asks Telegram.** By default it sends the query's words to
  Telegram's own search too (`--backend both`); `--offline` or `--backend archive` keeps the query on your computer.
  README, usage, search and the skill said it read only this computer.
- **Installation explains npm's install-script warnings.** npm 11.17 also prints `not yet covered by allowScripts`
  for `@wirecat/tg-cli` and `better-sqlite3`; both are harmless, and the guide says why.
- **`contacts prepare` is in the people guide and the skill**, and the comparison page covers tlgr and
  mcp-telegram, links the maintained tgcli and marks tgcli's several accounts.

- **A pasted `--help` example runs** (cli-core 0.398.0): an account command's example names the profile
  (`tg personal messages list Team`) instead of failing with "name a profile".
- **`search all --help` says it asks Telegram's server by default** and names `--offline` and `--backend archive`
  to keep the query local (cli-core 0.398.0).
- Message-search commands no longer list or delete saved meeting searches.
- Command corrections preserve the chosen profile; help shows concise descriptions and concrete examples.

## 0.82.0 — 23.10.2026 [#0820--23102026]

### Added [#added-25]

- **`tg <profile> contacts prepare <person>`: what to know before talking to someone** (cli-core 0.394.0). What
  `contacts context` gives, plus the one-to-one chats where their message is the newest the store holds, open tasks
  assigned to them, accepted facts about them and their projects, your notes about them, and their recent meetings —
  each with its reference, under one size budget, with `prepare.coverage` saying what each section left out and why.
  Tasks of another Telegram account, and facts on a project bound to one, stay out. `contacts.notes.list: deny`
  leaves the notes out and says so; `messages: deny` refuses the command, as it does `contacts context`.
- **Message search reads `"a b"~N`: the words at most N words apart in one message** (cli-core 0.391.0).
- **`bot watch --public-url <url> [--port <n>]` receives a bot's updates by webhook** (cli-core 0.391.0).

### Changed — may break callers [#changed--may-break-callers-28]

- **Reads never mark chats read** (cli-core 0.391.0). `messages list`, `inbox` and `review` no longer take
  `--mark-read` or `--no-mark-read`, and the `catch_up_marks_read` setting is refused. Why: a command that only read
  sent the other person a read receipt. What to do: remove `catch_up_marks_read`; run `tg <profile> chats mark-read
  <chat>` when you mean to mark a chat read.
- **An unknown key under `permissions` refuses messenger commands with `configuration_error`** (cli-core 0.391.0),
  typos such as `messages.sedn` included. It was a warning, and the restriction did not hold. What to do: correct the
  key or remove it with `config unset`.

### Fixed [#fixed-26]

- **A local read with an unknown profile lists the profiles on this computer** (cli-core 0.391.0), instead of
  suggesting to link a new account.

## 0.81.0 — 22.10.2026 [#0810--22102026]

### Added [#added-26]

- **JSON answers of commands with a date filter say how they read the date** (cli-core 0.385.0): `meta.window` gives
  the bounds used, in UTC, and `meta.timezone` names the zone a date typed without one was read in. This covers
  `store export`, `messages sync`, `stats chats show`, `stats chats retention`, `contacts context`,
  `search conversations`, `replies test`, `runs search`, `stats messages unanswered`, `stats contacts responses`,
  `stats chats newcomers`, `stats messages discussion`, and a `time:` or `date:` term in `chats events`,
  `chats members history`, `inbox` and `review`.

## 0.80.0 — 22.10.2026 [#0800--22102026]

### Changed — may break callers [#changed--may-break-callers-29]

- **A time typed without a zone is read in your zone, and a date alone means local midnight** (cli-core 0.379.0).
  This covers `messages send --at-time`, `chats link create` and `chats link update --expire-time`,
  `chats mute --until` and date-only `time>=` queries, such as `chats events Valencia time>=2026-09-20`. Before,
  some of them read a date alone as midnight UTC. A time with `Z` or an offset is read as before, and JSON and MCP
  output still give every time in UTC with `Z`.

### Fixed [#fixed-27]

- **`stats chats retention` and `chats stats show` read `--since-time`/`--until-time` in their `--timezone`**, and a
  date alone in retention's `--until-time` covers that whole local day (cli-core 0.380.0). `stats charts`, `contacts
  timeline` and the MCP `stats` tool name the zone in `meta.timezone` and give the UTC window in `meta.window`.

- **The QR login line names the zone of its time:** "valid until 22:00:00 Asia/Vladivostok". Before, it gave the
  computer's local time without saying so.
- **A frozen account's deletion date says it is a UTC date:** "deletes it on 2026-10-03 (UTC)". The `until` field
  is unchanged.

## 0.79.0 — 21.10.2026 [#0790--21102026]

### Fixed [#fixed-28]

- **An action Telegram keeps for Premium accounts now says so** ("that needs Telegram Premium on this account").
  Before, every such refusal, for example a reaction from a free account, said that Telegram transcribes only for
  Premium. `messages transcribe` keeps its own message about Premium and the free trial.
- **A locked or unreachable Linux keyring now warns and falls back to the credentials file** (cli-base 0.47.5). The
  keyring is read through the Secret Service only; before, a failure could end in silent storage in kernel memory,
  which is gone after a logout or reboot.

## 0.78.0 — 21.10.2026 [#0780--21102026]

### Changed — may break callers [#changed--may-break-callers-30]

- **Markdown headings are refused when sending (cli-core parser).** Send text now goes through cli-core's shared
  Markdown parser, as `max` does. A line that starts with `#` used to go out as typed; it now fails with a
  validation error, because Telegram has no headings. Write the line in bold instead. Nothing else changes.
- **A message that sends you to another command names it with your profile:** after a send or an edit with no answer
  from Telegram, "check `tg personal chats list`" replaces "check `tg chats list`", so it can be pasted as it
  stands. The words now come from cli-core.
- **Telegram's account and login refusals, a stopped watch and an unanswered write carry their own error
  `reason`** instead of the generic one for their code: `login.revoked`, `login.duplicated`, `account.deactivated`,
  `account.banned`, `account.frozen`, `account.limited` (were `auth.failed` or `access.denied`), `updates.stopped`
  (was `provider.unavailable`) and `write.unanswered` (was `outcome.unknown`). Codes, exit codes and messages are
  unchanged. Under `--debug`, the record's `cause` now gives the failure behind it, not only its code.

### Fixed [#fixed-29]

- **Search queries keep an `@` that is followed by a letter inside a term.** E-mail addresses without a dot after the
  `@` and chat ids no longer need quotes: `email:ana@example.com` works as typed.

## 0.77.0 — 20.10.2026 [#0770--20102026]

### Added [#added-27]

- **The store keeps a chat's history (store version 25, cli-core 0.366.0).** A change to a chat's id, title,
  membership or search visibility is kept in `chat_revisions` with the old and new value; a read by the id a chat
  was re-keyed from finds the chat it became. The store moves to version 25 when first opened; nothing is sent.

### Fixed [#fixed-30]

- **A chat you left is found by any of its ids** (cli-core 0.368.0) in `store export`, `store status`, `messages
  thread`, a search's `--chat` and `chat:`, tags, tasks and the other reads of its kept history. `chats track` and
  `store gaps plan` refuse it: "you left chat <id>".
- **`tg guide` lists memo's scenario under the same title as memo and the other tools:** "One person across every
  tool", capitalised. On cli-core 0.370.0 the scenario check in the tests also catches shell characters left
  outside quotes in a step.

## 0.76.0 — 19.10.2026 [#0760--19102026]

### Changed — may break callers [#changed--may-break-callers-31]

- **Without a terminal, the login QR code is printed as text for an agent to paste into the chat; `--qr-file` is
  gone.** An agent wrote a PNG and opened it in an image viewer, a window you can lose. Now `tg <profile> session
  start qr` and `setup` print the code on stderr as plain text (half blocks, no colours, drawn for a dark terminal
  theme), then tell the agent to paste it as a code block, exactly as printed, and to paste a renewed one and say the
  old one expired. With `--json` each code is also one stderr line,
  `{"event":"qr","qr":{"text","expires_at","scan"}}`. In a terminal the code is drawn as before. `--qr-file` is
  removed from `session start` and `setup`. Without a terminal a login still needs stored app keys and no 2FA, and
  is refused before it opens a browser; a phone login needs a terminal. Login stays off MCP: run the command
  ([when an agent runs the login](/llms.mdx/docs/tg/sessions/content.md#when-an-agent-runs-the-login)).

### Added [#added-28]

- **`store clear --left` names the chats it deletes** (cli-core 0.353.0): the refusal without `--allow-dangerous`
  lists the first 20, `--dry-run` lists them all, and the answer carries a `left` list (`id`, `title`, `messages`).

### Fixed [#fixed-31]

- **From cli-core 0.351.0–0.362.0:** `chats leave` and `chats join` update the store, and `chats show` finds a chat
  you left; a sent message is saved in the chat Telegram answered; a re-keyed chat keeps the stricter privacy of its
  two halves; a chat hidden from search stays out of every search that does not name it; a failed scheduled run's
  `last.json` keeps an error code, never a chat title; the first `serve` after an upgrade re-keys chats in short
  passes instead of locking the store.
- **`messages forward` answers, and saves, the forwarded copy in the chat it went to.** It took the first new message
  in Telegram's answer, which can belong to another chat; now it takes the one its send id names, in the target chat.
  Creating a forum topic reads its first message the same way.

## 0.75.0 — 19.10.2026 [#0750--19102026]

### Fixed [#fixed-32]

- **`setup`'s login step is headed "Link this device"** and no longer asks you to scan a QR code before one is
  drawn. The line under the code says where to scan; a narrow terminal shows only the hint to widen it.
- **A terminal too narrow for the QR code no longer asks you to scan it** (cli-core 0.350.0). `session start` and
  `setup` said where to scan in Telegram before the code; when the code did not fit, only the hint to widen the
  terminal or pass `--qr-file` followed. Now the scan line comes after the drawn code or the `--qr-file` note, and a
  narrow terminal shows only the hint.
- **`tg <profile> setup --help` shows the Global Options block again.** 0.74.0 dropped it when the usage line gained
  `<profile>`.
- **Hints in errors and notes name the profile**: "the store is behind this build — `tg personal store migrate`"
  instead of `tg store migrate`, which failed with "name a profile" when copied.

### Added [#added-29]

- **A next step in `--json` output and in an error carries `line`, the whole command to type with the profile**
  (cli-core 0.348.0): `"line": "tg personal mcp config"` beside `"command": "mcp config"`. A copied `command` alone
  failed with "name a profile". `command` is unchanged, and MCP answers leave `line` out.

## 0.74.0 — 19.10.2026 [#0740--19102026]

### Added [#added-30]

- **`tg guide` lists scenarios: the commands for a common task, in order, and why each.** Four ship with tg —
  `catch-up`, `find-what-was-said`, `searchable-files` and `agent-without-send` — and the list points at memo's
  `person-brief` for one person across every tool. `tg guide <name> --json` gives one as data. CI checks that every
  step is a tg command whose options and arguments parse.
- **Every command's `--help` ends with Returns, Next usually and Example** (cli-core 0.345.0), and
  `docs/commands.md` carries the same lines. The usage line shows `tg <profile> …`.

### Changed — may break callers [#changed--may-break-callers-32]

- **`npm install -g` installs the agent skill only when asked.** It wrote the skill into `~/.claude/skills` and
  `~/.agents/skills` by default, and npm hides a lifecycle script's output, so nobody was told. Now
  `TG_INSTALL_AGENT=all` (or an agent's name) installs it at install time; otherwise `tg <profile> setup` offers it,
  or `tg skill install --for all`. The Windows installer passes `all` itself and is unchanged.
- **`tg --help` and a bare `tg` show a short first screen** (cli-core 0.344.0): what tg is for, eight things it does
  that a plain client would not, the other WireCat tools, and where to go next. The full commander help with every
  command and option is at `tg --help-all`; the options alone at `tg help options`. A script that looked for a command
  or a global option in `tg --help` must read `--help-all`.
- **`tg commands` without `--json` prints a text list, by section, even when piped**: one line per command — usage,
  what it does, `(writes)` when it changes something. It printed the whole JSON document. `--json` and `--jsonl`
  print the same document as before; a script that parsed a bare `tg commands` must pass `--json`.
- **A chat's `provider_metadata` says `null` for a flag that is off or a username that is gone**: `isBot`,
  `isForum`, `pinned` and `username` were left out instead. cli-core's store will soon keep a key that is left out,
  so an unpinned chat or a dropped username would otherwise stay in the store, and `@old` would still find the chat.
  Every reader in tg and cli-core treats `null` as absent, but JSON output now shows these keys as `null`: a script
  that tests whether the key is present sees it.

### Security [#security-5]

- **The QR login is cli-core's `loginQr`, as in max and wa.** `--qr-file` is written as a temporary file created
  with mode `0600` and renamed over the path, instead of being written and then chmodded, and it is removed when
  the login is cut off by Ctrl+C, a cancel or `--timeout`, not only when it ends on its own. A terminal too narrow
  for the code draws nothing and says to widen it or pass `--qr-file`. Without a terminal, `session start` says
  "shows a QR code to scan — run it in a terminal, or pass --qr-file <png>".
- **Under the read-only lock and on a readonly profile, a write refuses before connecting; refusals appear in
  `sends list`** (cli-core 0.343.0).

### Fixed [#fixed-33]

- **`inbox` and `review` declare their output**, so `tg commands schema inbox` gives the message summary's fields and
  `--json=<fields>` refuses a name they do not have instead of printing empty items (cli-core 0.345.0).

## 0.73.1 — 18.10.2026 [#0731--18102026]

### Fixed [#fixed-34]

- **tg starts a little faster.** Built on cli-core 0.342.0 and cli-base 0.45.0: a command no longer parses the
  rule tables that only development checks use, which saved about 7–12 ms per start in the
  [measurement](https://github.com/WireCatLabs/cli-testing/tree/main/performance/startup/standards-split-before/README.md).

## 0.73.0 — 18.10.2026 [#0730--18102026]

### Added [#added-31]

- **Agents get every command the profile's levels allow over `tg mcp`** (cli-core 0.341.0). The server offered
  hand-written tools; it now builds them from the commands themselves and runs them in this process, 188 commands in
  all, `messages sync`, `contacts sync`, `mentions confirm`, `conversations embed` and `images embed` among the new
  ones. What an agent may not do is decided by the profile's levels: set the area to `readonly` or `deny`. The full
  list is pinned in `contracts/mcp-catalogue.json`.
- **`tg conversations rebuild`** builds again the conversations of chats that changed and embeds them with the model on
  this machine; it never asks Telegram, downloads no model and sends no text anywhere. It replaces the agent-only
  `conversations_refresh` tool.

### Changed — may break callers [#changed--may-break-callers-33]

- **`tg mcp` tool arguments are the command's options in snake_case**: `chat`, `limit`, `query`, `sync_first` and so
  on. An agent that remembered the old names asks `tg_tools_search` again.
- **An agent's `search messages` takes the query as text only**; the structured `ast` input is gone.
- **An agent cannot mark read or act as the owner**: `--mark-read` on `messages list`, `inbox` and `review` and
  `--as-owner` are not offered, the `catch_up_marks_read` setting does not apply to its runs, and its `--new`
  checkpoints are its own.
- **Under `TG_READ_ONLY`, local writes that delete or overwrite what you saved are refused** (cli-core 0.336.0,
  0.337.0): `searches create`, `searches delete`, `searches clear`, `contacts alias set|rm`, `contacts notes
  add|edit|remove`, `contacts link|unlink`, `tags add|auto|remove`, `mentions confirm|reject`, `attachments text set`,
  `chats tracking add|remove`, `conversations links add|clear`, `conversations consents revoke` and `tasks reject`,
  and their agent tools, exit 5. What the store rebuilds itself, syncs, `serve` and task bookkeeping still run.
- **While Telegram holds the account, no write goes out** (cli-core 0.334.0): reactions, marking read, quiet pins,
  title and profile changes are refused too; reads work. A ban with no end holds writes until `tg flood clear` or
  `tg doctor --online` finds the account well (`until: null` in JSON).
- **A send blocked on another process's lock exits 9 (`timeout`), not 1** (cli-core 0.338.0); nothing was sent, so it
  is safe to retry. `flood clear` too.
- **`tg upgrade --offline` exits 2** (cli-core 0.338.0) instead of asking npm anyway.
- **`conversations build`, `conversations embed` and `search conversations` say they can send text out**
  (cli-core 0.334.0, 0.336.0): with `--analyze`, `--provider` or a remote embedding model. Under `TG_READ_ONLY` they
  refuse before sending; a local model still works. They never run through `serve`.

### Fixed [#fixed-35]

- **`tg mcp` answers every call it received before stdin closed** instead of exiting with one still running.
  `tg bot mcp` does not yet.
- **An agent is not offered `offline` on a command that refuses it** (cli-core 0.335.0): `topics`, `chats events`,
  `chats inspect`, `chats members audit`, `chats members fetch` and the `chats folders` commands.
- **A held lock no longer stalls `tg serve`** (cli-core 0.340.0) for up to 5 seconds.
- **Two changes to the recipient list at once no longer undo each other** (cli-core 0.338.0).
- **`tg store gaps repair --background` runs its job** instead of failing at once (cli-core 0.339.0).
- **Hints from `server` and store maintenance commands name the profile** (cli-core 0.339.0).
- **`tg upgrade --check` runs under `TG_READ_ONLY`** (cli-core 0.338.0).
- **Model downloads never go through `tg serve`** (cli-core 0.336.0).
- **A store that failed to open is closed** (cli-core 0.332.0), so its folder can be deleted on Windows.

## 0.72.0 — 18.10.2026 [#0720--18102026]

### Added [#added-32]

- **`tg tasks agenda` lists what others owe you** (cli-core 0.328.0): open tasks someone else does, oldest first, with
  their assignees, in an "assigned" section and in `assigned` in JSON.

### Changed — may break callers [#changed--may-break-callers-34]

- **A command path given as one argument fails** (cli-core 0.328.0): `tg 'chats list' --help` printed the root help and
  exited 0; it now fails with the command line to run.
- **An interactive command without a terminal waits 5 minutes by default, not 30 seconds** (cli-core 0.328.0), so an
  agent's `tg session start --qr-file` is not cut off before the code is scanned. `--timeout` and `TG_TIMEOUT` still
  decide when given.
- **Under `TG_READ_ONLY`, a write that asks first stops with exit 5 before asking, not exit 7** (cli-core 0.329.0):
  `messages delete`, `topics delete`, `account sessions end`, `chats delete` and `chats clear` said "asks before it
  acts", as if `--allow-dangerous` would let them through. They now say "this process is read-only", as every other
  write does. Without the lock they ask as before.

### Fixed [#fixed-36]

- **Fewer false duplicate suggestions from reply chains** (cli-core 0.331.0): a reply that asks for something new no
  longer marks two tasks as maybe the same.
- **`tg chats list --json | head` ends quietly** (cli-core 0.328.0), through a running `serve` too, instead of printing
  a stack trace when the reader stops.

### Security [#security-6]

- **`tg session end` no longer logs out a running `tg serve`** (cli-core 0.328.0): with `serve` running for the
  profile, `session end` was handed to `serve` to run. It logged out the connection `serve` was using and deleted the
  session file `serve` still had open. Now `session start`, `session end` and `setup` never run through `serve`, and
  `session end` stops with exit 2 and says to run `tg <profile> server stop` first. Under `TG_READ_ONLY` all three still
  stop with exit 5, now with "it cannot log in or out".

## 0.71.0 — 17.10.2026 [#0710--17102026]

### Changed — may break callers [#changed--may-break-callers-35]

- **In a group tagged `watch-tasks`, any member's reply closes a question** (cli-core 0.325.0): a direct reply from
  someone other than the asker settles it; a later message that does not reply closes nothing.
- **`tg <bot> bot mcp` tools are the bot commands themselves** (cli-core 0.325.0): an agent's arguments are the
  command's own, in snake_case — `messages send` and `messages edit` take `md` or `html` in place of `format`,
  `messages delete` takes `messages` (a list), `search messages` takes `query`, `chats members remove` takes
  `person`. New: `chats rules show`, and `offline` on every read. Sending files, `--allow-dangerous` and
  `chats moderate --max-actions` stay with the owner. The catalogue is pinned in `contracts/bot-catalogue.snap`.

## 0.70.0 — 17.10.2026 [#0700--17102026]

### Added [#added-33]

- **`tg <profile> contacts link <person> me`** (cli-core 0.323.0): say that a contact is you — for an account of
  yours the store cannot match by itself, such as `zoom:<id>`.

### Fixed [#fixed-37]

- **Mentions find fewer wrong names** (cli-core 0.323.0). A word of a contact's name counts on its own only as a first
  name or a surname; a contact named like a company («Smart Agents») is found only by the whole name, and the polite
  «Ваш», «Вам», «Вас» never count. A saint's name in a place («Saint Michael's Bridge») and a city after «в»/«во»
  («во Владимире») are not names either.
- **Your own accounts are you** (cli-core 0.323.0): an account's own identity is linked to you on its next sync, so your
  name in your messages is no longer someone else's.
- **An address keeps its city** (cli-core 0.323.0): the same street in two cities is two places; an address written
  without a city still matches its place on that street.

After updating, read old messages again once: `tg <profile> mentions rebuild person-name place`.

### Security [#security-7]

- **`TG_READ_ONLY` now stops logging in and out, and changes to the message store**: `session start`, `session end`
  and `setup` refuse with `permission_error` before they connect, and so do `store reset`, `restore`, `clear`,
  `migrate`, `repair`, `copies delete` and `decrypt`. `session end` used to log out and delete the session under the
  lock.

## 0.69.0 — 17.10.2026 [#0690--17102026]

### Changed — may break scripts [#changed--may-break-scripts]

- **An agent can no longer delete for everyone** (cli-core 0.321.0). The MCP `messages delete` takes no
  `for_everyone`, and passing it is refused as an unknown argument; the owner still has
  `tg <profile> messages delete --for-everyone`.
- **`mcp --permission` only tightens** (cli-core 0.321.0). An override that would loosen the profile's level, such as
  `messages.send=allow` on a read-only profile, is refused at startup with the key it names; to allow more, change the
  profile's permissions. `--permission messages.send=deny` and other narrowing overrides work as before.

### Fixed [#fixed-38]

- **An agent's deny on `chats send-as` and `chats members list` now applies** (cli-core 0.321.0). Over MCP these
  commands read their levels from other keys, so `chats.send-as` and `chats.members.list` did not reach them.

## 0.68.0 — 17.10.2026 [#0680--17102026]

### Changed — may break scripts [#changed--may-break-scripts-1]

- **Tasks open only where something is asked of you** (cli-core 0.318.0). In a one-to-one chat every question
  you did not answer opens one, as before; in a group only a question in reply to your message and a mention of
  you; in a channel or Saved Messages nothing. On the owner's store, 300 posts of one channel would have opened 85.
- **`tasks apply` is now `tasks scan`** (cli-core 0.320.0); MCP `tasks_scan`, permission key `tasks.scan`.
- **No setting picks a profile any more** (cli-core 0.319.0). A command names its profile with the first word or
  `TG_PROFILE`. A config file that still has `default_profile` stops a command that names no profile, with the profile
  to type and `tg config unset default_profile`; `tg config set default_profile` is refused. A profile called `default`
  is an ordinary name: `tg default mcp config` names its server `tg-default`, not `tg`.

### What's new [#whats-new]

- **Tasks have assignees** (cli-core 0.320.0): `tasks add` and `tasks plan` take `--assignee sender` (whoever sent
  the message) or `--assignee person:<id>`; `none` clears it. `tasks list "assignee:any state:open"` is what others
  owe you.
- **`tg <profile> tags add --chat <group> watch-tasks`** records every question in that group as a task, whoever it
  is for.

### Fixed [#fixed-39]

- **`tg upgrade`'s "held back" hint names the package and keeps pnpm's release-age exemption** (cli-core 0.320.0).

## 0.67.0 — 17.10.2026 [#0670--17102026]

### Security [#security-8]

- Internal attachment references stay out of JSON, JSON lines, MCP and live-event output (Core0.315.0); provider media keys and credentials remain inside the client.

- WhatsApp state files cannot be uploaded as attachments (Core 0.314.0), including configured state paths and symbolic links. Ordinary neighbouring files remain allowed.

## 0.66.0 — 17.10.2026 [#0660--17102026]

### Changed — may break scripts [#changed--may-break-scripts-2]

- **The first sync opens no task from history** (cli-core 0.309.0). After an account's first sync, the task rules
  open at most `task_first_pass_per_chat` tasks per chat, and the default is 0. The sync answer's `tasks` counts
  what it held back (`held`, `held_chats`), and a note names `tasks apply`. Later syncs still open tasks from new
  messages. `tg <profile> config set task_first_pass_per_chat 50` brings back the old behaviour.

### What's new [#whats-new-1]

- **`tg <profile> tasks apply <chat...>`** (cli-core 0.309.0): the task rules over a chat's newest stored messages
  (`--last`, 50 by default), for a chat whose history you want as tasks. It lists what would open and changes
  nothing unless `--yes`. Local store only. MCP: `tasks_apply`.

- **Mentions find street addresses, and names of people the store does not know yet** (cli-core 0.308.0).
  `tg <profile> mentions places` lists confirmed addresses across every account. The store moves to version 18,
  with a `places` table, the first time a command opens it.

### Fixed [#fixed-40]

- **`tg upgrade` through pnpm installs the newest version** (cli-base 0.40.2). pnpm 11 installs only versions a day
  old, so the upgrade could install an older `tg` than the one you had. It now exempts `@wirecat/*` from that wait;
  every other package keeps it.
- `mentions` help summaries fit the shared 80-character limit (cli-core 0.311.0).
- **The duplicate check compares tasks by when their messages were sent** (cli-core 0.310.0), not by when a task
  was written. Tasks written from history in one go no longer all look alike.
- **Old messages fetched into a quiet chat open no tasks** (cli-core 0.309.0): a sync pass skips a chat with
  nothing sent since the last one.
- **No `[client] cannot reach Telegram` lines while tg cannot connect.** 0.64.0 began printing each of mtcute's
  background errors as one line; while the network is down, that is one line per connection attempt. They show only
  with `--verbose` now. A request that fails still reports its own error.

## 0.65.0 — 17.10.2026 [#0650--17102026]

### What's new [#whats-new-2]

- **A closed task's card shows the task that follows it up** (cli-core 0.305.0). `tasks show` prints
  `task:<id> follow-up-of this task`, and `--json` and MCP return `linked_from`. Before, only the new task named the
  closed one.

### Changed — may break scripts [#changed--may-break-scripts-3]

- **The daily "a newer version exists" line also stays quiet for `--json=…`, `--timeout=…` and the other quiet options
  written with `=`** (cli-core 0.307.0). Before, only the bare option silenced it. tg now takes this notice from
  cli-core, shared with max and memo.

### Fixed [#fixed-41]

- **`tg setup --app auto` reads the app keys from the redesigned my.telegram.org.** The site now shows the
  api_hash as dots and keeps its value in the page's copy and show buttons, so 0.64.0 stopped with "could not read
  its keys". The keys are read from there now (checked on the real page), a create counts as done when the site
  answers OK, and the site's own error text is shown instead of its JSON.

- **A broken config file is named in a short error** (cli-core 0.304.0): the first bad key, never its value.

## 0.64.0 — 16.10.2026 [#0640--16102026]

### What's new [#whats-new-3]

- **Imported Drive documents retain their Google URL and edit time in shared search** (cli-core 0.301.0). `--source drive:<profile>` selects a registered Drive profile; chat document lists can show the imported title after Drive sync links the stored messages.

- **The MCP server loads only when MCP is served** (cli-core 0.300.0), so other commands start with about a tenth
  fewer files to load.

### Fixed [#fixed-42]

- **`tg setup --app auto` no longer tries to create a second app when the account already has one.** It read the
  app's keys only from one exact page layout; when my.telegram.org showed the app's page in another shape, it took
  the account for one with no app and asked the site to create another (Telegram allows one per number). Keys are
  now read from the page's text, and an app page whose keys cannot be read stops with "use `--app browser`". An
  error from the site no longer quotes a whole page — which could hold the app's `api_hash` — only its title. The
  hint after a failed app step names the command that was run (`tg <profile> setup --app browser`), and too many
  tries at the site's code is `rate_limited`.

- **A login with a 2FA password no longer prints mtcute's "unhandled error: ConnectionClosedError" stack.** When a
  login succeeds, mtcute replaces its connections on purpose. The old connection then reported itself closed, and with no
  listener mtcute printed that as a red stack trace, with the account id, right after the hidden password prompt.
  tg now listens for these background errors: the expected close shows only with `--verbose`, and any other appears
  as one line in tg's own words.

- **`bin/release` restarts itself once when the release brings a newer `bin/release`**: folding the changelog and
  raising the version both fast-forward `main`, and the shell went on reading the old script from the byte it had
  reached, so the rest of the run was a mix of old and new text. It now starts the new script over with the same
  arguments; a second change during that run stops it with `run it again`. The restart also works when
  `bin/release` was started from another folder by a relative path. Only the repository's own release is affected;
  the published package does not change.

## 0.63.0 — 16.10.2026 [#0630--16102026]

### What's new [#whats-new-4]

- **`messages delete` takes message ids separated by commas as well as spaces** (cli-core 0.299.0).
- **tg starts about a fifth faster after its first run.** It keeps Node's compiled code in a cache, in the
  system's temporary folder (`NODE_COMPILE_CACHE` moves it): `tg --help` went from about 0.60 to 0.49 seconds.
- **The task category list lives in one file tg, MAX and memo share** (cli-core 0.298.0):
  `~/.config/WireCat/config.json`, section `task_categories`. It holds only your changes to the default list:
  `"garden": "plants | seedling, es:planta"` adds or replaces a category, `"religion": null` drops a default one,
  and categories a later release adds still arrive. `tasks categories` (MCP `tasks_categories`) names the file in
  `file`, and `config show` marks the categories that come from it. A file that is not valid JSON or names a bad
  category is refused with its path. A store moved by `MESSAGING_STORE` reads the `config.json` beside it;
  `WIRECAT_CONFIG_DIR` moves the file.

### Changed — may break scripts [#changed--may-break-scripts-4]

- **`config set task_categories.<name>` and `config unset task_categories.<name>` now write
  `~/.config/WireCat/config.json` instead of the store**, keeping the file's other sections;
  `config unset task_categories` drops the section. A list that an older tg saved in the store moves into the file
  on the next `config set` or `unset` of a category; until then the store's list still applies. Older tg builds do
  not read the file.

## 0.62.0 — 16.10.2026 [#0620--16102026]

### What's new [#whats-new-5]

- **An agent's close can wait for you** (cli-core 0.295.0): `tasks close` run by an AI agent (`AI_AGENT` or
  `CLAUDECODE` set) states its certainty with `--certainty <0..1>`. Below the store's threshold
  (`config set task_agent_close_min`, 0.8 by default), or with `config set task_agent_close off`, the task stays open
  with a close suggestion; `tasks list close:suggested` and `tasks agenda` show it. Confirm it with
  `tasks close <task>` or refuse it with the new `tasks reject <task>`. `--as-owner` closes as you.
- **A new task about a task closed in the last 14 days opens as its follow-up**, linked `follow-up-of` the closed
  one, instead of being refused as a duplicate. It is still refused while an open task may be the same job.
- **`tasks categories` names categories that left the list** while tasks still carry them, with open and total
  counts (`unlisted`); `tasks agenda` lists the ones open tasks carry (`unlisted_categories`).

### Changed — may break scripts [#changed--may-break-scripts-5]

- **An agent's `tasks close` must pass `--certainty`** (MCP `tasks_close`: the required `certainty`), or it fails
  with `task.certainty-required`. Below the threshold the answer has `state: open` and `close_suggestion` set
  instead of a closed task. A script run from an agent's terminal that closes tasks needs `--certainty`, or
  `--as-owner` when the owner asked for the close.
- **`tasks add` may now refuse a task whose message shares words with an open task's message** (exit code 2,
  `task.duplicate-candidates`): the duplicate check also reads a task's source message and its newest linked
  messages, so a rule's task with an empty title is compared by its message. Repeat with `--into <task>` or `--new`.
- **59 default task categories instead of 7**, such as `bills`, `health`, `travel`, `fitness` and `subscriptions`;
  `tasks categories` prints each with its meaning and trigger words. The old seven keep their names, so stored
  tasks stay valid, but a rule now picks the narrower name: a utility bill is `bills`, not `money`. A filter such as
  `category:personal` therefore catches fewer new tasks. A store that saved its own list keeps it;
  `config unset task_categories` takes the new default. A list holds up to 80 categories.

### Fixed [#fixed-43]

- **Spanish task text is read better**: a rule's category matches other forms of a Spanish trigger word
  (`pagues` hits `pagar`), and the duplicate check reads Spanish due dates such as `mañana` or `el viernes`.

## 0.61.0 — 16.10.2026 [#0610--16102026]

### Changed — may break scripts [#changed--may-break-scripts-6]

- **`tg mcp` and `tg bot mcp` no longer take the retired access flags** `--allow-send`, `--allow-mark-read`,
  `--allow-delete`, `--allow-moderate`, `--confirm-send`, `--allow-dangerous` and `--http-confirmation` (cli-core
  0.292.0). An app entry that still passes one stops starting with "unknown option": remove the flag; the profile's
  permissions decide, as they already did.

### Fixed [#fixed-44]

- **Release scripts report observed lock holders separately from stale release labels.** Shared
  diagnostics no longer attribute a live lock to a previous run; wait for the holders to finish, then
  retry.

- **A login that fails while opening no longer leaves the Telegram client open**: when loading the logged-in user
  fails, the adapter closes the client and the session file before the error reaches the command.

## 0.60.0 — 15.10.2026 [#0600--15102026]

### Changed — may break scripts [#changed--may-break-scripts-7]

- **Task and server commands take the shared vocabulary's names**, with no alias (cli-core 0.288.0, cli-base 0.33.0):
  `tasks similar` → `tasks related`; `tasks duplicates unsure` → `tasks duplicates defer` (permission key
  `tasks.duplicates.defer`; the stored decision is still `unsure`); `tasks add --attach` → `--into`; `tasks claim
  --for` → `--lease`; `tasks agenda --due` → `--due-within`; `server logs --lines` → `--limit` (`-n` stays). The MCP
  tools follow: `tasks_related`, `tasks_duplicates_defer`, `into`, `lease`, `due_within`.
- **`tasks agenda` and `tasks duplicates` filter with query fields, not flags**: `tasks agenda --tag <name>` →
  `tag:<name>`, `--category <name>` → `category:<name>`, `--claimed` → `claimed:any`; `tasks duplicates --unsure` →
  `decision:unsure`. Over MCP, `tasks_agenda` and `tasks_duplicates` take `query` instead.

## 0.59.0 — 15.10.2026 [#0590--15102026]

### Changed — may break scripts [#changed--may-break-scripts-8]

- **Flags take the shared vocabulary's names**, with no alias (cli-core 0.287.0): `chats members audit|fetch --budget` →
  `--max-pages`; `messages sync --estimate` → `--dry-run`; `contacts context --refresh`, `bot contacts show
  --refresh` and `tags auto --refresh-metadata` → `--sync-first`; `search conversations --refresh` → `--catch-up`;
  `attachments show --if-sha256` → `--expected-fingerprint`; `replies edit --chats|--not-chats|--people|--not-people`
  → `--allow-chats|--deny-chats|--allow-people|--deny-people`; `schedule agent|command --once` → `--at-time`;
  `bot chats moderate --no-ban` → `--no-block`; `chats mark-read --until` → `--until-id`; `tasks add|plan --check` →
  `--remind-time`; `store export --to` → `--output-dir` and `--kind` → `--include`; `bot store fetch --from` →
  `--until-id`. The MCP tools' inputs follow: `max_pages`, `until_id`, `expected_fingerprint`, `sync_first`,
  `remind_time`.

## 0.58.0 — 15.10.2026 [#0580--15102026]

### What's new [#whats-new-6]

- **Tasks that may be one job** (cli-core 0.285.0): `tasks similar <task>` scores the tasks that may be the same
  job; `tasks duplicates [--unsure]` lists the pairs the rules found, `tasks merge <task> --into <other>` joins them
  and `tasks unmerge` undoes it; `tasks duplicates reject|unsure` decides a pair. `tasks agenda` takes `--category`
  and `--tag`, and `config set task_categories.<name>` edits the category list for the whole store.
- **Mentions** (cli-core 0.285.0): `mentions domains` lists the sites links point to; `mentions list --new` shows
  what was found since the last look; `mentions confirm|reject <id> --all-in-chat` decides a name in the whole chat;
  a `t.me` link names its chat or person. `config set phone_countries es,ru` reads numbers written without `+`.
- **Store version 16**: the mention rules also read the text of notes and stored documents, and one `mentions rebuild`
  reads the ones stored before; `mentions list` still lists mentions in messages only. The upgrade adds triggers
  only, so an older tg still opens the store.

### Changed — may break scripts [#changed--may-break-scripts-9]

- **`tasks add` refuses a task that may be the same job** as an open task, or one closed in the last 14 days
  (cli-core 0.285.0): exit 2, reason `task.duplicate-candidates`, with the candidates in `details.candidates`.
  Repeat with `--attach <task>` to link the message to that task, or `--new` to open it anyway; the same holds
  for `tasks add` over MCP.
- **`phone:` and `value:` also match a stored number that ends with the typed number's national digits** (8 or
  more; cli-core 0.285.0), so a number saved before `phone_countries` is found either way. A Russian landline
  written in groups, `(812) 000-00-01`, is now stored as `+78120000001`, not the bare digits.
- **tg no longer searches mail** (cli-core 0.285.0, cli-core#1121): `tg search mail` and the MCP `search_mail` are
  gone, and `search all` reads messages and notes but never mail; `--only mail` is refused. `tg search mail …`
  answers ``mail is memo's: install @wirecat/cli-memo, then `memo search mail …` ``. `search notes`, tasks, notes
  and tags stay.

### Fixed [#fixed-45]

- A title with Cyrillic capitals is found by a lowercase query (cli-core 0.285.0).
- **A hostile HTML attachment no longer stalls the reader** (cli-core 0.285.0): a page of unclosed tags or comments
  is read in time linear in its size.

## 0.57.0 — 15.10.2026 [#0570--15102026]

### Changed — may break scripts [#changed--may-break-scripts-10]

- **`bot api --allow-any-file` sits on `bot api` itself**, not on each operation that takes files: put it once,
  before or after the method name, and every `@path` field of the call may come from a protected place. Without it,
  `@path` files from credential places, `tg`'s own folders and the local store are still refused before connecting.
- **`tasks add` needs `--category <name>`** (cli-core 0.282.0): money, documents, meeting, delivery, access,
  personal or other; `tasks categories` lists them. Tasks get readable keys such as `Q-15`, and `tasks claim` /
  `tasks release` hold a task for one agent session.
- **`permissions` is the only access setting** (cli-core 0.282.0): a config file that still holds `read_only` or
  `allow` is refused as an unknown setting, and `config migrate` is gone. Settings are read only under their
  snake_case names; `config set` no longer accepts camelCase names.
- **One search language** (cli-core 0.281.0): `--language` and `--regex` are gone from `search messages` and
  `searches create`; write a Lucene regex such as `body:/.*invoice.*/` instead. `conversations embed --workers` is
  gone. A search saved in the old language is refused when replayed: save it again.
- **No folder move at start**: folders left in `~/Library` by a release before the WireCat folder are no longer
  moved.

### What's new [#whats-new-7]

- **`messages sync` opens tasks from what it stored** (cli-core 0.282.0): a question nobody answered, a mention of
  you; closed once you answer.
- **A title match comes first in `search notes` and `search all`** (cli-core 0.281.0).

### Fixed [#fixed-46]

- **The update notice names `tg upgrade` and stays quiet only while `upgrade` runs** (cli-base 0.29.0), so
  `tasks update` no longer silences it.
- **Nested `--json` field paths work through lists** (cli-base 0.31.1, cli-core 0.283.0).

## 0.56.0 — 14.10.2026 [#0560--14102026]

### Changed — may break scripts [#changed--may-break-scripts-11]

- **`store export` writes files in the shape it prints** (cli-core 0.276.0): `--output` files and `--to` folders hold
  the same items as the screen (`chat_id`, `sender_name`, `ref`…). A folder from an earlier version is refused with
  "export into a new folder".
- **`bot api` refuses `@path` files from protected places**: known credential files and folders, `tg`'s own
  folders and the local store are refused before connecting, as `bot messages send --file` does; `--allow-any-file`
  on an operation that takes files sends one anyway. A file over 256 MiB is refused instead of read into memory.

### What's new [#whats-new-8]

- **`config set` and `config unset` accept camelCase setting names** (cli-core 0.279.0): `tg <profile> config set senderColors false`
  is saved as `sender_colors`, the same as the snake_case spelling.
- **Resumable syncs** (cli-core 0.276.0): a sync that is killed keeps what it saved, and the next run continues from
  there.

### Fixed [#fixed-47]

- **A send Telegram refused for flooding says it may be repeated**: when `messages send`, `messages forward` or
  `polls create` get FLOOD_WAIT before Telegram took the message, the error's `retry.safe` is `true` with
  `after_ms`. Once Telegram took it — a lookup after the send hit the limit — `retry.safe` stays `false`.

## 0.55.0 — 14.10.2026 [#0550--14102026]

### What's new [#whats-new-9]

- **Files go up from disk as they upload** (cli-core 0.272.0). `messages send --file`, `--photo`, `--voice`, the
  profile photo and `tg bot` no longer read the whole file into memory first, and the refusal for files of 2 GiB or
  more is gone: Telegram's own limit applies.

### Changed — may break scripts [#changed--may-break-scripts-12]

- **An unheard voice message is named in `missing`** (cli-core 0.274.0): `review`, `inbox` and `messages list` add
  `{field: "transcript", step: "messages.transcribe"}` for each voice message with no kept transcript, so an answer
  whose only content is a voice message no longer reads as complete.
- **`tasks link <task> task:<id>` records a relation between two tasks** (cli-core 0.274.0), with `--kind
  blocked-by`, `follow-up-of` or `related-to`.
- **A next step to a command that only changes this machine is never run unasked** (cli-core 0.273.0):
  `server restart` and `store reindex` steps carry `safe_to_auto_execute: false`.
- **`mentions rebuild` takes its kind as an argument**: `tg <profile> mentions rebuild person-name`, not `--kind`
  (cli-core 0.272.0).

## 0.54.0 — 14.10.2026 [#0540--14102026]

### What's new [#whats-new-10]

- **`tg images embed`: find pictures by what they show** (cli-core 0.268.0). Off until
  `tg <profile> config set picture_search true`; download the model once with
  `tg <profile> models image download clip-b32` (about 155 MB), then `tg <profile> images embed [--chat] [--limit]`.
  `search messages` then returns a `pictures` list beside its hits. Picture queries must be English.

- **`tg mentions`: phones, e-mail, links and Google documents found in stored messages** (cli-core 0.264.0, store
  version 7). `mentions list kind:phone`, `mentions list domain:google.com`; a bare word is a value written any way,
  so `89001234567` finds `+79001234567`. `mentions show <id>` gives the text around one. Messages stored before this
  version need one `tg <profile> mentions rebuild`; new ones are read as they are stored.

- **Mentions in a message's files and voice notes** (cli-core 0.269.0, store version 10). The text `attachments
  extract` read and a voice note's transcript yield mentions too, with `field` `file_text` or `transcript`.
  Attachments with text from before version 10 need one `tg <profile> mentions rebuild`, which now also counts
  `attachments`.
- **`tg mentions confirm <id> [person:<uid>|organization:<id>]` and `mentions reject <id>`** decide who owns a phone
  or an address, or dismiss it for good. An organization can own a phone or address apart from any person (store
  version 11; older builds keep working).
- **`phone:`, `email:`, `url:` and `domain:` in a message search** find messages by what their text mentions:
  `phone:"8 900 000-00-01"`, `email:"ana@example.com"`, `domain:docs.google.com`. Mail has no mentions yet.
- **A failing schedule is said before every other command** with one stderr line, until the next run succeeds;
  `schedule list` shows the streak.

### Changed — may break scripts [#changed--may-break-scripts-13]

- **`contacts timeline` pages like every other list:** a list cut at `--limit` answers `page.has_more: true`,
  `page.cursor` and a `page.next` step (`--cursor` continues); `meta.truncated` stays for changes still queued.
  The stderr "cut at --limit" note is gone.
- **Built on `@wirecat/cli-core` 0.269.0 and `@wirecat/cli-base` 0.27.2.**
- **Every answer is an envelope with snake_case keys.** A list is `{items, page: {limit, has_more, cursor?}, next?,
  missing?, meta}`, one thing `{item, next?, missing?, meta}`; `meta.run_id` names the run. This covers every
  command: messages, chats, contacts, writes (`{item: {operation_id, send_id, message}}`), inbox, review, search,
  stats, store, account, doctor, config, runs, `upgrade`, `bot *`, and tg's own `session start|end` and `setup`
  (`app_keys`, `already_logged_in`, `chats.has_more`). What to run next is a `next` step in place of fields such as
  `nextBeforeId`, `nextOffset`, `nextCursor` and `hasMore`. MCP answers are the same envelopes, and MCP tools refuse
  arguments they do not take.
- **Lists take a query, not filter flags.** `chats list kind:group unread_count>0`, `chats events "Hiking" time>=7d`,
  `messages list "Book club" id<4242`, `contacts list notes:<text>`, `attachments list chat:<id> is:needs_text`,
  `store jobs list state:failed`, `inbox date>2h`, `review date>3d chat:<id>`, `search messages 'chat:"Book club"
  lease'`. `--search`, `--kind`, `--unread`, `--type`, `--since-time`, `--before-id`, `--after-id`,
  `--before-time`, `--after-time`, `--topic`, `--search-notes`, `--min-score`, `--revoked`, `--link`, `--answer`,
  `--needs-text`, `--state`, review's `--chat` and search's `--chat` are gone from those commands. `messages
  evidence` and `chats media` continue with `--cursor` from `page.next`. `contacts list name:` needs stored contacts.
- **`doctor`'s Telegram block is snake_case:** `app_credentials`, `keyring_moved_by_environment`, `proxy.bot_api`.
- **Error details are snake_case:** `provider_error` (was `providerError`), a group that became a supergroup says
  `migrated_chat_id` in the Bot API refusal, a forum upgrade that may have happened says `previous_chat_id` and
  `chat_id`.
- **Config file settings are snake_case** (`keep_runs_for_days`, `sends_per_hour`, `read_only`, `default_profile`,
  …). An existing file moves by itself on its first read.
- **Run logs are snake_case** (`duration_ms`, `error_code`, `error_class`, `provider_error`); runs written before
  are still read.
- **Statistics reports refuse `--jsonl`**: a report is one object. `stats chats show` names its chat as a `chat:`
  reference; `stats tasks show` answers one item with `open` and `rows`.
- **`--json=<fields>` replaces `--fields` and `--agent-json`, which are gone.** `--json=id,text` keeps those fields
  of each item. CLI JSON keeps message text as written; MCP answers still show invisible characters.
- **`tags list`, `tasks list` and `conversations list` take a query instead of filter flags.**
  `tags list tag:work type:chat`, `tags list sources:auto`; `tasks list state:open kind:promise chat:<id>`;
  `conversations list <chat> started_at>=7d`. `--tag`, `--type`, `--source`, `--state`, `--chat`, `--before-time`
  and `--since-time` on these lists are gone. Items are the shared entities: a tag names what it is on as `target`,
  a conversation says `messages_count`, `started_at`, `first_message`.
- **Run records keep only listed attribute keys.** A message id under `ids.message` is dropped for now, so
  `runs search <message id>` does not find it (reported to cli-core).

### Fixed [#fixed-48]

- **MCP prompts name only arguments the tools take.** `review` passes its window as `query` (`date>"…"`).
- **`tg <profile> bot messages delete` takes more than 100 messages.** It sent every id in one call, and Telegram
  takes at most 100, so a longer list failed. It now sends them 100 at a time; if a later call fails, the error says
  how many were already deleted.

## 0.53.0 — 14.10.2026 [#0530--14102026]

### Changed — may break scripts [#changed--may-break-scripts-14]

- **Built on `@wirecat/cli-core` 0.262.0 and `@wirecat/cli-base` 0.26.0.** `@wirecat/cli-core` is the new name of
  `@wirecat/cli-messaging`; its 0.262.0 follows 0.261.0. The parity command is `cli-core-parity`. Machine output keys
  are snake_case: `error.details` says `operation_id`, `send_id`, `retry_after_ms`; `commands --json` says
  `global_options`, `inherited_options`, `exit_codes`, `takes_value` and `contract: 1`. A query tree in the MCP `ast`
  argument has `lower_inclusive`, `upper_inclusive` and `must_not`.
- **HTML files are read as their main text** (cli-core 0.262.0): menus, footers and banners are dropped, headings,
  lists, tables and links kept. HTML attachment text already stored is read again on the next `attachments extract`,
  and it changes. `title:`, `site:`, `lang:`, `author:` and `keyword:` search notes and files.

### Fixed [#fixed-49]

- **`tg config set defaultProfile <name>` and `config unset defaultProfile` work without naming a profile.** They
  asked for one first and failed when several existed (cli-core 0.262.0).
- **`tg default mcp config` and `mcp install` name the profile.** The entry left out a profile named `default`, so
  its MCP server stopped on its first call, since tg no longer assumes a profile (cli-messaging 0.260.0).

## 0.52.0 — 13.10.2026 [#0520--13102026]

### What's new [#whats-new-11]

- **Built on cli-messaging 0.259.0 and cli-base 0.24.0.** `store fetch` is now `messages sync` (same arguments,
  options and JSON). `store fetch` still runs as a hidden, deprecated name; the docs and the skill use
  `messages sync`. `bot store fetch` keeps its name.
- **`--debug`:** on a failure, the whole record — cause and stack — follows the error: after the `✗` line in a
  terminal, as a second JSON line otherwise.
- **`runs list` and `runs search` read a per-day index**, so they answer in milliseconds on thousands of runs.

### Fixed [#fixed-50]

- **The skill warns about three mistakes an agent made while testing.** It compared a plain word in one tool with
  `content:` in another, read `ref` where a search answers `locator` (or `items` where notes answer `hits`), and
  reported a bug fixed in a newer version; a zsh loop over `$c` passed a command path as one argument.

### Changed — may break scripts [#changed--may-break-scripts-15]

- **The local store and the speech models move once into the WireCat folder**, `~/.local/share/WireCat/`
  (Windows: `%LOCALAPPDATA%\WireCat\Data\`), on the first start, from `~/.local/share/cli-messaging/` and
  `~/.cache/cli-common/models/`. The move never overwrites: if both places hold a different store, `tg` stops
  with exit code `3` and names both files. `WIRECAT_STATE_DIR` replaces `CLI_COMMON_CACHE_DIR` and moves the whole
  folder. Upgrade `max` and `memo` together with `tg`: an older one would create a new store in the old place.
  [Where tg keeps its files](/llms.mdx/docs/tg/installation/content.md).
- **One error object:** `{"error":{"code","reason","message","details"}}`. What used to sit at the top of
  `error` — `candidates`, `sendId`, `operationId`, `permission`, `retryAfterMs` — is now in `error.details`.
  `reason` is a dotted id (`output_limit` → `output.too-large`, `input_limit` → `input.too-large`);
  `retryable` appears only where the failure sets it, and `actions` only on the failed items of a partial
  result. Exit code `1` is `internal_error` (was `generic_failure`), and its message no longer carries the
  fault's own text; `--debug` shows it.
- **`runs show` lists only what went wrong** (failed responses, warnings, the crash) and adds `eventCount`;
  `-v` shows every event, as before.
- **`tg` never picks a profile for you.** A command that uses an account and names no profile (no first
  word, no `TG_PROFILE`, no `defaultProfile` in the config file) stops with exit code `2` instead of using
  `default`, also when `default` is the only profile. **This breaks every existing one-profile setup**:
  `tg chats list` now fails. The error lists the profiles here, so the fix is in the message:
  `tg default chats list`, `export TG_PROFILE=default`, or `"defaultProfile": "default"` in the config file.
  On a new computer the first login is `tg personal setup` (any name). `--help`, `--version`, `commands`,
  `skill show`, `account list` and `config show` still run without a profile. MCP clients and scheduled
  jobs that start `tg mcp` or `tg serve` without a profile need one added. A bot's `store fetch` uses only
  its own profile's app credentials and personal session, never `default`'s.

## 0.51.0 — 12.10.2026 [#0510--12102026]

### What's new [#whats-new-12]

- **`--brief` and `--full` on every command.** `--brief` keeps a found message's reference, chat, time,
  sender, excerpt and score; `--full` keeps everything.
- **`tg search all` names who wrote each hit** and how it was found (by words or by meaning).

- **`tg schedule`: run a command or an agent on a timer**, through systemd (Linux), launchd (macOS) or Task
  Scheduler (Windows). `tg schedule command <name> --every 2h -- messages list <chat>` runs a tg command; a read
  saves what it reads. `tg schedule agent <name> claude "<prompt>" --at 08:30` starts an agent (claude or codex), at
  most hourly. The agent runs with `TG_READ_ONLY=1` and cannot send; its answer is kept as `latest.md` beside the
  schedule and a desktop notification says it is ready. `--once 2h` runs once and then removes the schedule.
  `tg schedule list`, `run` and `remove`.
- **`tg server install` suggests the command for a daily follow-up review**, and turns nothing on.
- **`TG_READ_ONLY=1` refuses every write of the process**, above the config file and `--permission`.

### Changed — may break scripts [#changed--may-break-scripts-16]

- **`tg search messages` answers an excerpt, not the whole text.** Each hit carries `excerpt`, about 240
  characters around the first query word, instead of `text`; `--full` or `tg messages show <ref>` gives the
  whole message. Null `editedAt`, `replyTo`, `forwardedFrom` and `reactions` are left out of machine output. A
  script that read `text` from search hits reads `excerpt` or adds `--full`.

## 0.50.0 — 11.10.2026 [#0500--11102026]

### What's new [#whats-new-13]

- **Tasks get a plan, links and a daily agenda** (shared store 0.247.0, version 4). `tg tasks add` takes
  `--title`, `--description`, `--due` and `--check`; `tg tasks plan <task>` changes them later, `none` clearing a
  date. The next check is when an agent should look at the task again, not a reminder: nothing reaches the owner.
  `tg tasks link` links a task to messages, chats, people, documents and URLs; `tg tasks show` prints the plan with
  its links. `tg tasks agenda` lists, without one message's text, the tasks overdue or due soon, the chats owed an
  answer (`owed`), those waiting on others (`waiting`) and those whose newest message is not stored (`unsynced`).
  `tg skill show follow-ups` is the daily routine for an agent: drafts only, it never sends.

### Changed — may break scripts [#changed--may-break-scripts-17]

- Shared store 0.247.0: a meeting context records facts with `fact.add`; `memory.add` no longer takes the kind `fact`.

### Fixed [#fixed-51]

- Pin shared package 0.248.0, which includes the task follow-up parity entries. Release checks
  now recognize task plans, links, cards, agenda and their options.

## 0.49.0 — 11.10.2026 [#0490--11102026]

### What's new [#whats-new-14]

- **Search takes the colon spelling of a comparison.** `date:>=2026-01-01` (and `:>`, `:<`, `:<=`) is the
  same as `date>=2026-01-01`; before, it failed with `invalid_syntax`. A refused `after:` or `before:` now
  names its replacement: `after:2026-09-01` says to use `date>=2026-09-01`.

### Changed — may break scripts [#changed--may-break-scripts-18]

- Shared store 0.246.0 checks new labels against canonical names and aliases before creation.
  Similar names require owner review; reuse an existing label or its explicit alias. Existing
  labels and data remain, and canonical/alias automatic matches share one claim.

## 0.48.1 — 11.10.2026 [#0481--11102026]

### What's new [#whats-new-15]

- **Shared store 0.242.0**: existing project and task ids stay; new projects get short keys, and the store can
  check which tasks depend on which.

### Fixed [#fixed-52]

- **npm installs the packages side by side again.** Built on `@wirecat/cli-messaging` 0.241.0, whose
  `@wirecat/cli-meetings` 0.4.2 accepts cli-core 0.20.0. With 0.240.0, npm put cli-messaging in a nested folder
  with a second copy of cli-core.

## 0.48.0 — 11.10.2026 [#0480--11102026]

### What's new [#whats-new-16]

- **`--source` takes a list of accounts and groups** in `search messages`, `search mail` and
  `search conversations`: `--source group:work,tg:mila,email:me@work.example` searches exactly those. An entry is a
  group, `app:account` (a profile of any app — `max:default` works from tg — the account's id or its name) or a
  bare `--source` word. `config set accountGroups.<name> <list>` saves a group for every app.
- **The shared store upgrades to version 2 the first time tg opens it.** Facts — what was said, asked, decided or
  promised — get their own table beside memories; memories saved as kind `fact` move there, and task assignments
  are copied into their own table. An older tg, max or memo still opens the upgraded store.

### Changed — may break scripts [#changed--may-break-scripts-19]

- **On macOS tg keeps its files where it does on Linux**: `~/.config/tg-cli`, `~/.local/share/tg-cli` and
  `~/.cache/tg-cli` instead of `~/Library/…`. The first run moves the old folders there, with the shared store and
  the speech models, and points an installed `tg server` agent at its new log. While a `tg serve` or MCP server is
  running it prints one warning, keeps using the old folders for that run and tries again next time. Linux and
  Windows are unchanged.
- **Purging an account also removes the people only that account had seen.** A person stays while another
  account, a tag, a note or any other record points at them.
- **Mail is searched by meaning thread by thread.** The first index pass after the upgrade cuts every thread again
  and embeds the mail once more; search by words is unchanged.

### Fixed [#fixed-53]

- **Purging an account that held meetings no longer fails**, and a purge drops the vectors only it used.
- On `@wirecat/cli-messaging` 0.238.0.

## 0.47.0 — 11.10.2026 [#0470--11102026]

### What's new [#whats-new-17]

- **`messages list --limit` returns as many messages as asked for.** Telegram hands out at most 100 a request, and
  `--limit 500` used to stop at 100 with `hasMore: true`; it now reads on page by page (cli-messaging 0.235.0).
- **A poll in `messages list` carries its question, answers and total votes** under
  `providerMetadata.poll`, so a channel's polls read without one `polls show` per message.

### Fixed [#fixed-54]

- **`messages comments --limit 100` (or more) says when older comments remain.** It asked Telegram for one comment
  more than the limit to find out, but Telegram returns at most 100, so a thread of 1,600 comments answered 100 with
  `hasMore: false`. It now asks for at most 100 and reads a full page as more to come.
- **`polls show` gives a poll's total votes before you vote.** Telegram sends the total either way; only each
  answer's count waits for your vote. The total used to be `null` too.
- On `@wirecat/cli-messaging` 0.235.0.

## 0.46.3 — 11.10.2026 [#0463--11102026]

### Changed — may break scripts [#changed--may-break-scripts-20]

- **Joining a chat and importing contacts count toward `sendsPerHour`.** A join counts as one, an import as one per
  number; `tg contacts import` sends 10 numbers a request. When the limit stops an import part way, the error says
  how many numbers went and that importing again is safe.

### What's new [#whats-new-18]

- **`tg bot watch` prints and keeps an update once**, even when Telegram delivers it again after a restart: each
  update is recorded by its `update_id` and skipped once handled. With `--events --jsonl`, each line carries
  `update: { id, kind }`.
- `tg search all --backend archive|server|both` and `--server-time`, as on `search messages`; they apply to messages
  only, mail and notes are always searched locally. The default is `both`.
- `tg search mail --account <address>` searches one mailbox; without it, every mailbox. Mail is also searched by
  recipient, folder and subject (`to:`, `cc:`, `bcc:`, `mailbox:`, `subject:`), and attachments by meaning.

### Fixed [#fixed-55]

- **`tg store fetch --all` waits out a short FLOOD_WAIT on the chat list** (up to 5 minutes, as message pages
  already did) instead of failing at once with `rate_limited`; a 21 s wait ended every fetch of an empty store.
  Shipped in 0.46.2, not listed there.
- Paging through the chats (`store fetch --all` lists them 100 at a time) reads each dialog from Telegram once.
  Each page used to walk every dialog from the top again, so about 1,400 chats cost over 100 requests back to back
  instead of about 15.
- `chats members list --all` waits 1 s between pages of 200 members. It used to ask for up to 50 pages back
  to back, although the limits page said it was paced.

### Security [#security-9]

- **Search no longer answers another account's messages.** `search messages --backend server` with `--source all`
  or `in:all` could return another account's message with the same chat and message ids, and a chat id without its
  account matched that chat in every account; both are fixed.
- On `@wirecat/cli-messaging` 0.233.0.

## 0.46.2 — 11.10.2026 [#0462--11102026]

### Fixed [#fixed-56]

- Archive discovery now handles permission questions such as “Can contractors access production?”
  without treating the final question mark as a wildcard. Strict search and filters keep their behavior.
- Mail searches and linked-person context also read dedicated mail storage, alongside older imports.
  Mail supports sender and thread filters; search results list each email locator once.
- Background history fetches no longer stop at the default 30-second deadline; an explicit
  `--timeout` still applies.

### Changed — may break scripts [#changed--may-break-scripts-21]

- A permanent history-fetch failure before the first saved page now exits with an error instead
  of exit code `0` with an `issue`. Bot history without a starting message exits with code `2`
  and requests `--from`. Failures after progress still report partial results.

## 0.46.1 — 11.10.2026 [#0461--11102026]

### Fixed [#fixed-57]

- Package references, documentation and fixtures use the WireCat namespace throughout.

### Changed — may break scripts [#changed--may-break-scripts-22]

- Independent file or history-page failures retain successful work and return `complete: false`, `batch` or `issue` with exit code `0`. Scripts must check completeness; partial download JSONL adds `batch_summary`. Errors include recovery `actions`. Resuming downloads retries failed checkpoint IDs.
- Batches stop new requests after ten attempts when failures exceed 50%; `MESSAGING_BATCH_MAX_ERROR_PERCENT` adjusts the percentage, with 100 disabling that percentage stop. Throttling and authentication failures stop earlier; writes with unknown outcomes are never automatically replayed.
### What's new [#whats-new-19]

- Set extraction and retained-file transfer size through `MESSAGING_ATTACHMENT_MAX_MIB` (default 50). PDF previews now allow 4000 pixels per side and 8 MiB per page; `MESSAGING_PDF_PREVIEW_MAX_PIXELS` and `MESSAGING_PDF_PREVIEW_MAX_MIB` adjust those budgets. Larger values need more memory; external OCR and decompression budgets remain separate.
- `tg runs search`, also the `runs search` command in MCP `tg_read`, searches safe diagnostic records by text, status, error code and time without connecting to Telegram.

## 0.46.0 — 11.10.2026 [#0460--11102026]

### Changed — may break scripts [#changed--may-break-scripts-23]

- **The store prunes its growing logs on open**, at most once a day: agent tool calls older than 90 days are
  deleted, and a handled bot update older than 30 days keeps its row but loses its payload. Upgrade max-cli and
  cli-memo at the same time, as they share the store.

### What's new [#whats-new-20]

- `tg store reset` for a store this build cannot migrate: it backs the store up beside itself, deletes it and
  starts an empty one. It asks first; `--yes` skips the question and `--no-backup` skips the copy.
- `tg search all --meetings [provider:account]` also searches one meeting account's transcripts, chat and
  summaries; `--max-meetings <n|all>` sets how many meetings it looks through (100 by default).

### Security [#security-10]

- **The old `messages.db` is deleted** when the store opens at its default path: the unencrypted file used
  before `wirecat.db`, with its `-wal` and `-shm`. One line on stderr names it. It is kept when
  `MESSAGING_STORE` is set, and while another process still has it open. From `@wirecat/cli-messaging` 0.222.0.

## 0.45.0 — 10.10.2026 [#0450--10102026]

### Changed — may break scripts [#changed--may-break-scripts-24]

- **The local store is a new file, `wirecat.db`, and starts empty.** It sits beside the old
  `messages.db`, which `tg` leaves as it is: not read, not converted, not deleted. Run
  `tg store fetch --all` to bring messages back from Telegram. What exists only on this computer —
  for example notes, aliases, tags, tasks and transcriptions — stays in `messages.db`. The login
  stays. Upgrade max-cli at the same time, or the two see different archives.

### What's new [#whats-new-21]

- `tg contacts timeline <person>`, also over MCP as the `contacts timeline` command of `tg_read`:
  everything one person took part in, in every messenger linked to them, newest first, from the local
  store. `--scope personal|work`, `--since-time`, `--until-time` and `--limit` narrow it.

## 0.44.1 — 10.10.2026 [#0441--10102026]

### Fixed [#fixed-58]

- Local PDF text extraction and page previews accept documents beyond 20 pages; extraction follows command cancellation rather than a separate 30-second cutoff. File and image budgets remain.
- Local transcription accepts complete mono or stereo Ogg Opus recordings beyond ten minutes. Long recordings need more memory and processing time.
- Attachments from ordinary hidden working folders are allowed. Known credentials, CLI folders and the message store remain protected.
- Markdown exports preserve message formatting. MCP write arguments preserve original Unicode while returned text still exposes invisible controls; configured model gateways support normal redirects.
- Windows update and MCP setup support ordinary relative PATH entries and custom command-processor environments. This patch keeps the existing message-store schema.
- Search troubleshooting distinguishes archive-only discovery/offline requests from ordinary
  server-backed word search, so an empty local archive does not imply Telegram was searched.

## 0.44.0 — 10.10.2026 [#0440--10102026]

### What's new [#whats-new-22]

- Message search can discover partial word matches and eligible direct replies with `--discover`
  or MCP `discover: true`, using the local archive without model downloads. Strict search remains
  the default; matched/missing terms help agents check evidence before answering.

## 0.43.1 — 10.10.2026 [#0431--10102026]

### Changed — may break scripts [#changed--may-break-scripts-25]

- **The project is now licensed under Apache License 2.0.** See `LICENSE` for the terms.

## 0.43.0 — 10.10.2026 [#0430--10102026]

### Changed — may break scripts [#changed--may-break-scripts-26]

- **The package is `@wirecat/tg-cli` and its repository belongs to WireCatLabs.** Use this package for installations and updates.

- Local transcription accepts complete mono or stereo Ogg Opus recordings up to 10 minutes.
  Split longer recordings first. PDF text extraction supports at most 20 pages and 30 seconds.
- MCP text results and write arguments expose invisible controls, including decoded formatting.
  Subdivision flag emoji stay intact; ordinary CLI machine JSON preserves original strings.

### Fixed [#fixed-59]

- After an upgrade, server restarts invoke Node directly with separate arguments and preserve the
  selected environment, including installation paths with spaces on Windows. Invalid profile names
  in lock files are skipped.

### Security [#security-11]

- Attachment directory extraction and retained-file transfer refuse hidden paths, CLI-owned folders
  and the message store, including symlink targets. MCP extraction downloads also refuse those locations.
- DOCX extraction applies the bounded office archive reader before loading document content.

## 0.42.0 — 09.10.2026 [#0420--09102026]

### Changed — may break scripts [#changed--may-break-scripts-27]

- **Auto-replies answer everyone your rules match, unless you limit the audience; the separate `testers`
  list is gone.** `tg replies audience --reply listed --allow-people <ids>` answers only selected people;
  `--deny-people` and `--deny-chats` leave some out. Nothing is sent until `permissions.replies.send` is
  `allow`, and a new rule is off until you turn it on. A rules file that still has `testers` keeps
  answering exactly the same people: they become the allowed people (only those the audience also allowed,
  if it was already `listed`). Allowed chats in such a file are dropped, because they would open replies to
  everyone in those chats; deny lists stay. The file is rewritten without `testers` on your next
  `tg replies` edit.
- **`tg replies status --json` no longer has `testers`**; the `audience` counts say who may be answered. In `tg replies test` and `serve`, a sender outside the audience is skipped with
  "not on the allow list" instead of "not a test account".

## 0.41.0 — 09.10.2026 [#0410--09102026]

### Changed — may break scripts [#changed--may-break-scripts-28]

- **The message store drops the copies kept for older versions** (store version 28, cli-messaging 0.212.0).
  Notes, contact notes, relations and entities written before the notes refactor are copied into their new
  tables once, during the upgrade. After it, an older tg, max or memo refuses the store with "upgrade this
  tool" — update all three together.

## 0.40.1 — 09.10.2026 [#0401--09102026]

### Fixed [#fixed-60]

- **`tg search all` found nothing on a fresh store.** It searched only accounts already in the store, so
  before the first save it looked nowhere; it now always includes this profile's account and asks the
  server the way `tg search messages` does.
- **`tg search mail` with no mail imported answers an empty result** with a note on stderr, instead of
  failing.
- **Notes found only by a weak match in meaning are dropped**, so a rare word no longer returns every note.

## 0.40.0 — 09.10.2026 [#0400--09102026]

### What's new [#whats-new-23]

- **`tg topics show <chat> <topic>` shows one forum topic**: its title, whether it is closed or pinned, unread
  messages and last activity.
- **`tg messages forward --topic <id>` forwards into a forum topic** of the `--to` group. The topic is checked
  first, as with `messages send --topic`; topic 1 is General.
- **`tg attachments show --page 1` returns a retained PDF page as PNG.** Remote agents whose clients
  cannot open an embedded PDF can read it page by page as images; rendering needs the optional
  `unpdf` and `@napi-rs/canvas` packages.

### Changed — may break scripts [#changed--may-break-scripts-29]

- **Statistics `--answerer` accepts stored names, aliases and @usernames.** Resolution stays local
  to the selected history’s accounts; ambiguous names return scoped candidates. Unknown names now
  fail instead of producing a fabricated zero-answer identity. Use `person:provider/account/id`
  to explicitly select an unseen opaque ID. Response rows add `identityKnown`; an ID without
  observations has `identityKnown: false` and `status: unknown`. Zero observed answers do not
  prove inactivity ([statistics](/llms.mdx/docs/tg/rankings/content.md)).

- **Every search moved under `tg search`.** The old commands are gone:

  | Before | Now |
  |---|---|
  | `tg messages search` | `tg search messages` |
  | `tg messages search --source email` | `tg search mail` |
  | `tg conversations search` | `tg search conversations` |
  | `tg topics search <chat> <text>` | `tg search topics <chat> <text>` |
  | `tg bot messages search` | `tg bot search messages` |

  For agents the tools moved the same way: `search messages`, `search conversations`, `search topics`, and the new
  `search all` to start with.
- **`tg search messages` never returns mail.** A saved search that names `in:email` now asks for `tg search mail`.
- **Permissions named after the old paths** (`messages.search`, `conversations.search`, `topics.search`) stop
  `tg search` until `tg config migrate` renames them, keeping their levels.

## 0.39.1 — 08.10.2026 [#0391--08102026]

### Fixed [#fixed-61]

- Pin the shared messaging library to 0.205.0, matching Memo and MAX for coordinated installation.

## 0.39.0 — 08.10.2026 [#0390--08102026]

### What's new [#whats-new-24]

- **`tg polls create --close-time 5m` closes the poll by itself** that long after sending, from 5 seconds to 10
  minutes.
- **`tg polls voters <chat> <message> [--answer <id>]` lists who voted for what** in a poll that is not anonymous.
  When Telegram answers that you must vote first, or that a channel hides its voters, the error says so.
- **`tg chats link update --expire-time never` takes a link's expiry away.** The group's own link can be changed
  too; the help no longer says otherwise.
- **`tg store jobs list --state <state>`** lists only the background jobs that are running, done, failed,
  cancelled or died.

### Changed — may break scripts [#changed--may-break-scripts-30]

- **`tg chats link create` and `update` refuse `--approval` with `--max-uses`.** Telegram dropped a use limit
  when approval was turned on, without saying so; now you choose one.
- **Latin words are searched by their English and Spanish stems at once.** Before, only Spanish, so English
  word forms ("budgets" → "budget") matched worse.
  Watch for: after the update the stem index rebuilds by itself — a small store on open, a large one bit by
  bit: `tg serve` finishes it in the background, `tg store migrate` at once. Until it is ready a search
  matches exact word forms, says so on stderr, and `query.stemming.applied` is `false` in JSON. The stem
  index of Latin text is about twice as large. A `searchStemmers.latin` you set yourself stays, and
  `tg store reindex` still applies it. Update `max` too: an older one, opening the rebuilt store, answers
  a stemmed search with "upgrade this tool" ([archive](/llms.mdx/docs/tg/archive/content.md#repair-and-index-maintenance)).
- **Notes about a person (`tg contacts notes`) show in every profile that sees them.** Before, only in the
  profile where they were written.
  Why: notes are yours, not one account's; the shared store now keeps them apart from messages, together with
  notes from `memo`.
  Watch for: with several Telegram profiles, a person's notes from all of them now show together. Aliases
  (`contacts alias`) still apply only in their own profile.

### Fixed [#fixed-62]

- **`tg polls voters --answer <id>` names the answer** of each vote; it listed them with no answer. Without
  `--answer`, it no longer says more voters remain when it has shown them all.

## 0.38.0 — 08.10.2026 [#0380--08102026]

### What's new [#whats-new-25]

- **`tg account list` shows every profile** on this computer, the account each is logged in as and its name.
  It asks Telegram nothing.

### Fixed [#fixed-63]

- **`tg session start` says "Already logged in"** when the profile's session still works and nothing was asked,
  with `session end` to log in again; it used to look like a login without a code. `--json` gains
  `alreadyLoggedIn`.
- **`tg session start phone --sms` no longer aborts the login when Telegram has no SMS to send**
  (`SEND_CODE_UNAVAILABLE`): it says so and asks for the code Telegram already sent to the app.
- **`tg` or a command group with no subcommand (`tg account`, `tg chats`) shows its help again** at a terminal,
  instead of `✗ (outputHelp)`. A script or `--json` gets a `validation_error` saying to give a command.

## 0.37.0 — 08.10.2026 [#0370--08102026]

### What's new [#whats-new-26]

- **Agents can read one folder's chats by name over MCP**, as `tg chats folders show` does (`tg_read`, command: `chats folders show`).
- **`tg chats link update <chat> <link> [--approval | --no-approval] [--expire-time] [--max-uses]` changes one of
  your extra invite links**; only what you give changes.

- **Retained files for remote agents:** `attachments show` transfers bounded chunks with whole-file SHA256.
  MCP returns complete images or binary resources, with a JSON/base64 fallback. Transfer performs no OCR
  or index write; the agent reads the file and saves literal text ([attachments](/llms.mdx/docs/tg/attachments/content.md)).

- The shared dependency also adds observed retention cohorts and counter observations with
  per-field freshness; unknown values remain explicit.

### Changed — may break scripts [#changed--may-break-scripts-31]

- Ranking and evidence JSON includes per-field counter observations and freshness; evidence also accepts
  retention-cohort selections. Inspect each field and selection kind before interpreting the result;
  unknown values and incomplete archives do not mean zero.

## 0.36.0 — 08.10.2026 [#0360--08102026]

### What's new [#whats-new-27]

- **`tg polls create --quiz --correct <n> [--solution <text>]` sends a quiz**: one right answer, by its position from
  1, and a vote that is final.
- **Stored administrator reports** find questions without observed answers, selected responder latency, known-join newcomer help and viewed posts with little discussion. Reports provide coverage/evidence; saved runs retain parameters and selections.
- **`tg chats folders show <folder>` lists one folder's chats by name**, with its pinned and excluded chats. Names
  come from the local archive; Telegram is asked only for chats the archive does not hold.
- **`tg metadata refresh --only-missing`** reads descriptions only for groups and channels that have none stored yet;
  without `--chat` it takes every stored group and channel, up to `--limit`.
- **`tg store jobs retry <job>`** starts a failed or died background fetch again with the same options;
  `--failed` retries every chat whose newest job failed or died. **`tg store jobs clear`** forgets finished jobs and
  their logs.
- **`tg session start phone --sms` asks Telegram to send the login code by SMS** when it would go to the app.
  Telegram decides: the note after the request says how the code was really sent.
- **`tg topics delete <chat> <topic>` deletes a forum topic and every message in it**, for everyone. It asks first by default;
  `--allow-dangerous` skips the question.
- **Attachment text can be read locally:** ODT, ODS, XLSX, PPTX, EPUB, BOM-marked UTF-16 and
  high-confidence legacy encodings. No model is called; formulas are not calculated and images
  remain for the agent. [Search](/llms.mdx/docs/tg/search/content.md) explains the limits.

- **`tg chats folders create|update` take rules**: `--include` contacts, non-contacts, groups, channels or bots,
  `--skip` muted, read or archived chats, `--exclude-chat`, `--pin` and `--emoji`. `folders list` shows them.
### Changed — may break scripts [#changed--may-break-scripts-32]

- `tg chats folders join` says plainly when a link is invalid or expired (exit 6), and `folders order` answers
  only each folder's id and title.
- `tg chats folders create|update` answer with the folder as Telegram stored it: an `--emoji` that is not one of
  its folder icons is dropped by Telegram, and tg used to report it as set.

## 0.35.0 — 08.10.2026 [#0350--08102026]

### What's new [#whats-new-28]

- **`tg chats requests list --search <name>` or `--link <link>` narrows the requests** — by name, or to those
  that came by one link; Telegram cannot do both at once.
- **`tg polls show` says whether a poll is a quiz (`quiz`), whether a vote may change (`revote`), and whether you
  made it (`creator`)** — only its maker can close it.
- **`tg polls vote` and `tg polls close` refuse what Telegram would refuse, before sending**: a closed poll, two
  answers in a one-answer poll, a changed or retracted vote where the vote is final, `--retract` with no vote, and
  closing someone else's poll. Telegram's poll refusals now say what to do instead of "Telegram refused: X", and a
  timeout while reading the poll no longer says the vote may have gone.
- **`tg chats requests accept|decline <chat> --all [--link <link>]` answers every pending request at once, and
  `tg chats link list` / `tg chats link revoke` show and stop your invite links.** An `--all` accept is counted
  against the hourly limit before anyone is let in.
- **Rankings retain Telegram reply links and linked channel discussions**, so conversation measures use those
  links when available; ambiguous forum-topic links remain unknown.
- [The ranking guide](/llms.mdx/docs/tg/rankings/content.md) explains measures, scores, coverage, saved selections and evidence.
  Replaying a saved selection now preserves exclusive date boundaries.
- **`tg store fetch --all` downloads every chat** — the last 90 days of each, most recently active first;
  `--background` runs it as a job. Search needs it: [prepare your archive](/llms.mdx/docs/tg/search/content.md#prepare-your-archive-first).
- **Your own names and notes for people: `tg contacts alias` and `tg contacts notes`**, kept on this computer
  only; `contacts show --with-notes` and `contacts list --search-notes` show and search them
  ([people](/llms.mdx/docs/tg/people/content.md#your-own-names-and-notes-contacts-alias-contacts-notes)).
- **Automatic tags for groups and channels: `tg metadata refresh` and `tg tags auto`**, from title and
  description, never touching your own tags ([search](/llms.mdx/docs/tg/search/content.md#tags)).

### Changed — may break scripts [#changed--may-break-scripts-33]

- **Every search says what it searched.** One line in the terminal — messages and chats searched, chats never
  fetched or behind, and the command that fixes it; `coverage.next` in JSON tells an agent what to run.

- **The search guides now correctly describe the existing default (`--backend both`).** Word search asks Telegram as well as the local archive, as it already did in 0.34.0. Use `--backend archive` for local-only searches. Counting with `stats`, topic search and queries the server cannot answer still read only the archive.

- **`tg chats join` to a group whose admins approve who joins answers `requested: true` and exits `0`**, instead
  of exit `11`: the request was sent all along. A script that treated exit 11 as "request sent" now reads
  `requested`.

## 0.34.0 — 07.10.2026 [#0340--07102026]

### What's new [#whats-new-29]

- **`tg stats messages top` and `tg stats contacts top` rank stored messages and their authors**, and
  `evidence` under each shows the messages behind a place in the ranking. They read only the local store and
  ask Telegram nothing; `searches create --selection` saves such a ranking as a search.
- **Every profile now has one request pace, shared by all `tg` processes using it.** Two commands at once,
  background `store fetch` jobs, `mcp` and `serve` used to pace themselves separately, so running several
  multiplied the request rate; now they share one allowance — a burst of 20, then one request a second. A
  wait Telegram asks for holds the whole profile, and a request that would wait more than 5 minutes fails at
  once with exit code `8`. Bulk work run in parallel takes longer. `requestsPerMinute` or
  `TG_REQUESTS_PER_MINUTE` changes the pace; [the limits page](/llms.mdx/docs/tg/limits/content.md) explains all of it.
- **`tg messages send --html` and `tg messages edit --html` read Telegram's HTML** — `<b>`, `<i>`, `<u>`, `<s>`,
  `<a href>`, `<code>`, `<pre>`, `<blockquote>`, `<tg-spoiler>` — with line breaks kept as typed
  ([usage](/llms.mdx/docs/tg/usage/content.md#sending)).
- **`tg messages send --file … --filename <name>`** sends the file under the name others see.
- **`tg messages list <chat> --topic <id>` reads one forum topic**, back from its newest message or `--before-id`.
- **`tg chats folders order` puts folders in the order you name**, and **`tg chats folders join <link>`** adds a
  folder someone shared by a `t.me/addlist/` link, joining every chat in it.
- **`tg chats link create <chat>` makes another invite link — `--approval` to make whoever joins by it ask first,
  `--expire-time` and `--max-uses` to limit it — and `tg chats update --join-approval on|off` makes everyone ask
  first.** Both work in a private group as well as a public one.
- **`tg chats requests list <chat>` shows who asked to join a group that needs approval, and `tg chats requests
  accept|decline <chat> <person>` answers one.** Only admins see the requests; an accepted one counts toward the
  hourly limit like an added member.

- **`tg messages search --backend both` asks Telegram as well as the archive.** Telegram's results are saved
  and checked by the same query, so `exact:`, `-word` and the ranking keep their meaning; each message says
  whether it came from the archive, Telegram or both. `--backend server` shows Telegram's results alone;
  `--server-time` bounds the wait (5 s). The default is `both` ([search](/llms.mdx/docs/tg/search/content.md)).

- **`tg chats mark-read <chat> --topic <id>` marks one forum topic read**, up to `--until` or its newest
  message, and leaves the rest of the chat as it is.

- **`tg topics edit <chat> <topic>` renames (`--title`), closes or reopens (`--closed on|off`) and pins or unpins
  (`--pinned on|off`) a forum topic, and hides or shows the General topic (`--hidden on|off`); `tg topics order
  <chat> <topic...>` puts the pinned topics in order.** Repeating either is safe.

- **`tg messages send --spoiler` blurs a photo or video until tapped, and `--caption-above` puts the text above
  it.** A spoiler on a document or voice message is refused.

- **`tg chats send-as <chat>` lists who you may post as in a group, and `--send-as <id>` posts as one of
  them** — on `tg messages send` (files included), `tg messages forward` and `tg polls create`. The list always
  includes you and marks the group's saved choice; reading it changes nothing. An id not in the list is refused.

### Changed — may break scripts [#changed--may-break-scripts-34]

- **A send, forward or poll with no `--send-as` to a group that posts as a channel by default is refused** (exit
  `2`), instead of going out as that channel. The error names `--send-as <your id>` to post as yourself and
  `--send-as <channel id>` to post as the channel.

## 0.33.0 — 07.10.2026 [#0330--07102026]

- **`tg contacts profile` and `tg contacts check` estimate the age of accounts made up to August 2026.** The
  table that guesses a sign-up month from an account id ended at November 2025, so the newest accounts got no
  estimate. Late-2025 ids now read up to four months later than before, closer to when they were really made.
  Estimates for 2026 are off by about three months; `source: "estimate"` still marks every guess.
- **Attachment OCR through the shared gateway.** Agents normally read images/scans themselves and
  write text through `attachments text set`. Explicit bulk processing uses `attachments extract --ocr`,
  `models.ocr` and bounded `--concurrency`; complete text enters the existing `content:` index.
  Hash/model caching avoids repeated calls, and failures preserve agent text and old indexed text.

## 0.32.0 — 07.10.2026 [#0320--07102026]

### What's new [#whats-new-30]

- **`tg messages comments <channel> <post>` reads the comments under a channel post, and `tg messages send
  --comment-to <post>` writes one.** Comments live in the channel's discussion group; a post without one is exit `6`.
- **`tg contacts profile` lists earlier names and usernames** under `aliases`, oldest first, with a `t.me`
  link for an old username. The local store now keeps a name or username when it changes. See
  [People](/llms.mdx/docs/tg/people/content.md).

## 0.31.0 — 07.10.2026 [#0310--07102026]

### What's new [#whats-new-31]

- File extraction through MCP, explicit directories and `messages download --extract`; changed files
  are checked by content hash. Optional bounded local preparation follows history fetches, off by
  default. `store gaps plan` and `store gaps repair` inspect recorded interior gaps and explicitly
  repair them with bounds and resumable jobs; unknown edges and ambiguous pages remain pending.

- **`tg stats chats official <chat>`**: Telegram's own statistics for a supergroup or channel you administer, as
  its apps show them — totals against the previous period, top posters, admins and inviters (supergroups), recent
  posts and notification share (channels), and every graph as JSON series. Read only. Works where Telegram shows
  you statistics; elsewhere it fails with a permission or validation error. See [Groups you run](/llms.mdx/docs/tg/groups/content.md).
- cli-messaging 0.162.0 also brings `store gaps repair`, the catch-up options of `store fetch`,
  `messages download --extract` and `attachments extract --from-dir` / `--cursor`.

- **Configuration, permissions and profiles have separate guides.** Setup starts with file locations and common tasks; the full settings reference remains available.

### Changed — may break scripts [#changed--may-break-scripts-35]

- Configuration is split into a short guide and full key/type/default/scope/environment reference.
  The public CLI contract describes headless execution, schemas, bounds, previews and retry rules.
- Validate portable skill metadata, installed version, command paths and configuration-key coverage in CI.
  Native login and optional setup questions respect the shared no-input policy.

- **First settings resolution creates config.json.** Existing files are preserved; environment and flag overrides are not saved. config show may now create the file, and common values report file defaults as their source.
- **Word and phrase searches include word forms.** Scripted queries may return more messages. Use exact: or --exact for the previous exact-form behavior; explicit text: still matches forms. Archive language settings affect matching.

### Fixed [#fixed-64]

- Search catch-up honors readonly or denied `conversations.links` before fetching or queueing
  preparation, including gap repair. Explicit `--no-catch-up` still permits authorized history reads.

- Person context finds private dialogs without recorded members when the dialog ID is the person's
  ID, restoring direct messages and the last message each way in existing Telegram stores.
- Interrupted writes preserve their unknown outcome, operation ID and retry information; check the
  result before retrying a Bot API write that timed out.

## 0.30.0 — 07.10.2026 [#0300--07102026]

### Changed — may break scripts [#changed--may-break-scripts-36]

- **`tg mcp` offers an agent three tools instead of one per command: `tg_tools_search`, `tg_read` and
  `tg_write`.** The agent finds a command by words and runs it as
  `{ "command": "messages list", "arguments": { … } }`, with the same arguments and the same answer its
  old tool had. `tg bot mcp` works the same way: `tg_bot_tools_search`, `tg_bot_read`, `tg_bot_write`.
  Why: an agent read about 80 tools' descriptions before its first question.
  What to watch for: the old names (`tg_messages_send`, `tg_status` and the rest) no longer work, and
  neither do client rules that name them; allow `tg_read`, and `tg_write` if you want, in your client
  ([MCP](/llms.mdx/docs/tg/mcp/content.md)).

- **Writes over MCP show no confirmation form: the profile's permissions decide alone.** A level of
  `ask` acts like `allow` over MCP, over stdin/stdout and `--http` alike.
  Why: forms broke in many clients and got in the way.
  What to watch for: with the default permissions an agent may now delete your own messages; set
  `tg config set permissions.messages.delete readonly` to stop it. Actions a group's rules want
  confirmed are left for you. `--confirm-send`, `--allow-dangerous` and `--http-confirmation` (from
  0.30.0) are accepted with a warning and change nothing; `tg mcp config` no longer writes them.

- **Statistics use `stats messages show`, `stats chats show` and `stats tasks show`.**
  Legacy `messages stats`, `chats stats` and `tasks stats` paths are removed. Update commands
  and exact permissions to `stats.messages.show`, `stats.chats.show`, `stats.tasks.show`.
  MCP: use `tg_read` with the same command path.
- **Parser errors return exit 2 with a structured validation_error.** Scripts expecting
  prose or exit 1 must update their error handling.

### What's new [#whats-new-32]

- **`tg setup` is easier to follow.** Each step is a heading, `[1/5] This computer`, with what happened
  indented under it; the questions and the QR code sit under their step, with a blank line around the code.
  The closing summary lines its labels up, the command to try first on top. `--json` output and its keys
  are unchanged; `--quiet` still hides the steps.

- **A list of what waits on you.** Since 0.29.0, `review` and `serve` keep a task in the local store for a
  question nobody answered and a message that mentions you by name, and close it once you answer; now you
  can see them. `tg tasks list` shows each with the message it points at; `tg tasks add <message> --type
  promise` adds what the rules cannot see; `tg tasks close <task> --as done|dismissed` closes one for good;
  `tg stats tasks show` counts them per chat. Nothing is sent by these commands. MCP: use `tg_read` or `tg_write` with the same command path.

- **Reply rules can be edited from the CLI and use Liquid templates with optional ai blocks.**
  `replies add|edit|on|off` changes rules and `replies audience` changes profile allow/deny lists.
  `models.replies` selects the provider; `replies consents` grants profile/endpoint consent with
  native-chat opt-outs. Ordinary `replies test` previews instructions/fallback without calls;
  `--ai` explicitly submits stored data. Legacy templates retain their literal fallback with warnings.
  Sending remains limited to testers and replies.send; see [archive](/llms.mdx/docs/tg/archive/content.md#reply-rules).

- **MCP writes can run from web clients without server forms.** The profile's permission levels
  apply to HTTP and stdio alike; `ask` and `allow` permit the requested MCP write. Repeat
  `--permission key=level` to override permissions for this server process without editing config.
  App approval is separate and cannot be verified by the server. [Browser setup](/llms.mdx/docs/tg/remote/content.md).

- **Charts can be saved as PNG.** `tg stats charts <chat> --output activity.png` writes a dark-theme
  chart to a new file; SVG stays available. MCP `tg_read` with `command: "stats charts"` and `format: "png"`
  returns an image and JSON without connecting to Telegram or writing a file.
- **The open-tasks MCP prompt lists pending tasks.** It calls review to refresh tasks,
  then lists them with an optional `chat` filter; closes tasks only after approval and sends nothing.
- **Browser setup covers Windows, macOS and Linux.** The guide separates PowerShell and
  terminal commands, temporary send permissions, Codex web login, two simultaneous servers
  and stopping individual tunnels. [Browser setup](/llms.mdx/docs/tg/remote/content.md).

### Fixed [#fixed-65]

- **Estimated registration dates are closer for accounts made in 2022–2025.** When Telegram does not give the
  month, `contacts profile` estimates it from the id; the estimate now rests on 212 real sign-up dates. Accounts
  from 2022 no longer look about nine months younger than they are: estimates are off by one to two months in
  the middle case. Ids up to November 2025 now get an estimate; newer ones still get none.

- **`tg serve` and `tg watch` stopped with SIGTERM or Ctrl-C end cleanly.** They exited 1 with
  `database is not open`, and the updates and contacts that were still arriving were lost: the Telegram
  library closed the login file on the signal, before the command had finished with it. Now the command
  closes it, once, after saving what arrived.

- `chats show` gives a supergroup's real member count, which Telegram's chat list showed as missing or
  out of date, and a group's card or invite link gives a basic group's count instead of 0. The member
  list now carries the group's count too, so `chats members fetch` can tell who left a supergroup once
  tg moves to the next shared library.

## 0.29.0 — 06.10.2026 [#0290--06102026]

### What's new [#whats-new-33]

- **Long messages are searched by meaning in full.** A message longer than about 1200 characters is split
  into overlapping pieces before it is embedded, so `messages search` by meaning reads all of it, not only its
  start. Chats built before read as outdated, and `conversations build` or `search --refresh` rebuilds them
  (cli-messaging 0.153.0; the store moves to version 21, which older builds still write).

- **A person's profile.** `tg contacts profile <person>` shows what Telegram says about someone — every
  username, bio, birthday, Telegram's own marks (bot, verified, premium, scam, fake, restricted, deleted),
  when they were last seen (`recently`, `week` and `month` are no longer shown as hidden), whether you are each
  other's contacts, when the account was made (Telegram's own month, or an estimate from the id, always
  labelled), whether they have a photo of their own — and, for each chat you share, how many of their
  messages are stored, the first and the last. The phone shows its last four digits unless `--show-phone`. It
  asks Telegram nothing more than `contacts show` does. MCP: `tg_contacts_profile`.
- **Record group membership over time.** `tg chats members fetch <chat>` saves profiles, membership changes
  and a daily count; `--budget` limits pages, and nobody is recorded as having left after a partial read.
  `--track` starts daily fetching while `tg serve` runs. `chats tracking list|show|add|remove` manages the
  tracked groups; stopping tracking keeps recorded history. `chats members history --since-time` reads
  recorded joins, leaves and profile changes without contacting Telegram. The first snapshot records a
  baseline, not proof that every person joined that day; missed days are not reconstructed.
  `chats members list --offline` reads the last complete saved roster. Uses cli-messaging 0.152.0.
- `tg contacts context <person> --chat <chat>` (repeat it for more) gives their newest messages in each chat,
  as time and text only, for an agent to summarise; `-v` adds ids and links, `--limit` is per chat, and `--refresh`
  asks Telegram first with one search by sender per chat.
- **Is this account a bot?** `tg contacts check <person>` scores one person from Telegram's own marks, their
  profile and oldest photo, what the store holds that they wrote, and the public spam lists Combot CAS and
  lols.bot, which are sent their id; `--no-registries` skips the lists. `tg chats members audit --deep <n>` runs
  the same check on the top n members, one a second. Every reason says where it came from; a hint, never a
  verdict.

### Fixed [#fixed-66]

- **Help explains what member checks read and where they connect.** `--no-registries` skips public ban
  lists but still requests the person's profile and photos from Telegram; `--offline` is the local-only
  mode. Deep checks inspect at most 1,000 stored messages per person and make individual requests for
  selected members. `contacts context --chat --refresh` explicitly connects before reading the store.
- **`contacts profile` no longer guesses a registration date for the newest accounts.** The id table ends at
  December 2024 and cannot tell a newer id from 2025 from one from 2026; such ids now get no estimate rather
  than a date that may be years too early.
- **`tg mcp --http`: Claude and ChatGPT can finish logging in.** The login page made the browser send its form
  as coming from nowhere, and `tg` refused it with "Origin not allowed". Now the login works (cli-messaging 0.152.0).
## 0.28.0 — 06.10.2026 [#0280--06102026]

### What's new [#whats-new-34]

- **Search the text inside files.** `attachments extract` indexes retained plain text, Word and PDF text
  layers for `content:` queries. Word/PDF need optional `mammoth`/`unpdf`; an agent reads scans and photos
  and saves their text with `attachments text set`. `--download --output-dir` explicitly fetches missing files.
- **Refresh before searching and follow replies.** `--sync-first` fetches within defaults of five chats,
  500 messages and 30 seconds; incomplete refresh keeps local results and reports stale coverage.
  `--thread` follows a bounded stored reply graph with link provenance, falling back to time context when absent.
- **Filter conversations and choose account scope.** `--filter` is strict Lucene and applies before ranking;
  one message must match the entire filter. `--source` widens scope explicitly. MCP now offers agent-linking
  batches, link write-back, rebuilding and the `link-conversations` prompt.
- **Configure embeddings and analysis separately by profile.** Local embeddings and the owner's agent remain
  defaults. Remote providers receive text only when chosen; `build --analyze --chat` requests and remembers
  account/chat/provider consent until revoked. A remote embedding setting also sends MCP search query text.

- **`tg` connects through a proxy: SOCKS5, HTTP `CONNECT` or MTProxy.** Set it per profile with
  `tg config set proxy <url>` — or `tg config set proxy -` to paste one with a password or an MTProxy secret, which
  is kept in the OS keyring, never in the settings file — or for one run with `TG_PROXY`. Bot API commands use the
  same SOCKS5 or HTTP proxy; with an MTProxy they go direct, and `tg doctor` says so. A proxy that refuses or cannot
  be reached fails at once with `configuration_error` (exit 3), so it never reads as Telegram being down.
- **`tg doctor` says what it really checked.** The login shows as `not checked` until you add `--online`, and each
  private file or folder other users can read is named with the `chmod` that fixes it; `doctor` never changes a
  mode itself. `tg doctor --online` also reports this computer's clock against Telegram's (a warning past 10
  seconds), and whether the account is active, frozen (with its dates and the appeal link), banned, deleted or
  logged out. `tg doctor` and `tg server status` show the waits Telegram asked this profile to keep, and any hold on
  its writes, as `flood`.
- **`tg flood clear`** forgets those waits and lifts the hold on writes, once Telegram no longer limits the
  account. It never connects. Agents get no MCP tool for it, on purpose.
- **Tags: your own labels on a chat, a person or one message**, kept in the local store and never sent.
  `tg tags add <tag…> --chat <chat> | --contact <person> | --message <message>`, `tags remove` with the same target,
  and `tags list`. `tag:<tag>` in a search finds what is tagged. MCP: `tags_list`, `tags_add`, `tags_remove`.
- **Saved searches and a search history.** `tg searches create <name> [query]` saves a search without running it;
  `tg messages search --saved <name>` and `tg messages stats --saved <name>` run it — more words are added with
  AND, and options you type replace the saved ones. `searches list`, `show`, `history`, `delete` and `clear` manage
  them. Every search and count that succeeds is kept in the history: its query and options, never a message or a
  result, the newest 1,000. `--no-record` keeps a run out of it; for MCP, `tg mcp --no-record` or `record` set to
  `false`. Saved searches and the history are shared with max-cli, which uses the same store.
- **`tg contacts context <person>`**: what the store holds about one person — shared chats, the last message each
  way, their recent messages, where others mentioned them — across every messenger linked to them. It never
  connects, and `permissions.messages: deny` blocks it like other message reads. `tg contacts link <person>
  max:<person>` records that a Telegram and a MAX account are one person; `contacts unlink` undoes it.
- **Reply rules can answer test accounts.** `tg serve` answers with the rules in `config/<profile>.replies.json`
  only to the accounts in its `testers` list, and only when `permissions.replies.send` is `allow` — it is `deny`
  by default, and an empty list answers nobody. `tg replies test` shows what the rules would have answered in the
  stored messages and sends nothing; `replies pause` stops every rule at once, a running `serve` too; `replies
  resume` undoes it; `replies status` says whether the rules may send and to whom.
- **`tg store repair [--dry-run]`** brings every table of the store to this build's shape, deleting nothing: a
  table of the wrong shape is kept as a copy beside the new one, and `tg store copies delete <name>` removes a copy
  once you have looked. It repairs a store where reading a message failed on `messages.mentions`.
- The store gains tables for tags, saved searches, member history and word stems the first time this version opens
  it; older `tg` builds still open the file. `tg store migrate` and `tg store reindex` also build the word-stem index
  (on a large store, run `tg store migrate` once), and `tg config set searchStemmers.cyrillic` (`russian` or `none`)
  and `searchStemmers.latin` (`spanish`, `english` or `none`) choose the stemmers for the whole store. Searches do
  not use the stems yet.
- **`chats members audit` judges with everything Telegram's member list carries.** Each member now brings when
  they joined, who invited them, and whether the account is a bot, deleted, marked scam or fake, or has no photo —
  so bursts of joins, mass invites and marked accounts show up, with no extra request per person.
- **`chats stats` counts comments on channel posts**, beside views and forwards.
- **A file whose upload drops is tried again, up to three times, before anything is sent.** If it still fails, the
  error says nothing was sent, instead of exit `14` "it may have gone". The message itself still goes once, with
  its send id.
- **Search has three guides.** [Message search](/llms.mdx/docs/tg/search/content.md) is everyday searching by words, people, dates,
  files, links and tags; [topic search](/llms.mdx/docs/tg/topic-search/content.md) explains conversations, vectors, freshness and what
  a remote model sends; [query language](/llms.mdx/docs/tg/query-language/content.md) is the reference.
- `tg mcp doctor` shows the last lines of the server's error output when it fails to start, with your home folder,
  long numbers and anything like a token hidden.

### Changed — may break scripts [#changed--may-break-scripts-37]

- **Local e5-small meaning results require cosine similarity above 0.80 before combining with words.**
  Exact word matches remain eligible. Results may be shorter and a combined hit may become words-only.
- **The shared archive gains attachment text and analysis consent tables.** Opening it migrates local schema
  while retaining existing messages; back up a large archive before upgrading.

- **A wait Telegram asked for is remembered.** After a `FLOOD_WAIT` (exit 8, `rate_limited`, with
  `retryAfterMs`), the same call — and, when it named a chat, the same call in that chat — fails at once with exit 8
  and `details.remembered: true` until the wait has passed, without asking Telegram. A script that retried at once
  after exit 8 now gets exit 8 again, sooner. `tg flood clear` forgets the waits.
- **A frozen or spam-limited account's writes are held.** After Telegram refuses a write because the account is
  frozen or limited as spam (`PEER_FLOOD`), every send-type write fails with exit 5 (`permission_error`) that says
  until when; reads, reactions and marking read still work. A spam limit holds for an hour, set again by each new
  refusal; a frozen account until Telegram's end date, or a day. `tg doctor --online` sets a frozen hold and lifts
  it once the account is active again; it never lifts a spam hold — `tg flood clear` does, once you know the limit
  is gone.
- **`PEER_FLOOD` exits with code 5 (`permission_error`), not 11**, and points to @SpamBot: retrying makes it
  worse. A frozen account's refusal is also a `permission_error` pointing to `tg doctor --online`, not a rate limit
  to wait out. A banned or deleted account no longer tells you to log in again.
- **A one-shot command waits out a FLOOD_WAIT of up to 10 seconds twice at most, not five times**, and says so on
  stderr; the next one ends it with code 8 (`rate_limited`) and `retryAfterMs`. `serve` and `watch` wait up to
  2 minutes, three times.
- **`tg serve` and `tg watch` exit when Telegram ends the login while they listen**, with code 4, within about 15
  minutes; the service does not restart on it. If the updates stop for another reason, or Telegram does not answer
  within 30 seconds when asked, they exit with code 12, which systemd restarts. Before, they stayed up and received
  nothing.
- **Telegram's `AUTH_KEY_DUPLICATED`** (a login ended because two connections used it at once) is now
  `authentication_error`, exit 4, not `provider_error`. The message says to log in again and names overlapping
  `tg` processes as the cause.
- **Pin, unpin, react, mark read, delete, vote, poll close, folder and contact changes end in exit `14`
  (`outcome_unknown`) when Telegram does not answer**, instead of a timeout or network error that the send
  journal recorded as failed. The message says whether a repeat is safe; for a folder creation it is not —
  check `tg chats folders list` first.
- **`tg inbox`, `inbox --new`, `review` and `chats list --unread` (also with `--search` and `--kind`) look at every
  chat**, not only the newest 100 or 200, so an unread chat further down the list is no longer left out. This costs
  one request per 100 chats. `partial` now means only that Telegram could not list every chat; chats past the
  20-per-run cap are named in a `skipped N chats` note.
- **`tg messages list --after-id`, `--after-time` and `--before-time` no longer stop at a page shorter than
  `--limit`.** Telegram leaves deleted messages out of a page, so a short page in the middle of a chat answered
  `hasMore: false` and dropped the hint for the next page. They now say there is more until Telegram returns an
  empty page, as plain `messages list` already does: the last page may say there is more, and following its hint
  returns an empty page.
- `tg messages search` takes its query as optional, since `--saved` can stand alone; with neither it still refuses.

### Fixed [#fixed-67]

- **Account-qualified context locators reject another account before reading.** MCP also accepts
  `offline: true` for ordinary stored context.
- **Stopping `tg serve` with Ctrl-C or a signal exits 0.** The session database closes once, avoiding the
  previous "database is not open" error on shutdown.

- **`messages delete` checks the ids belong to the chat first.** In a private chat or a basic group Telegram
  numbers messages per account and deletes by number alone, so an id from another chat — or the other side's
  number for the same message — deleted a message there. Now any id that is not in the named chat stops the
  whole delete with exit 2, and nothing is deleted.
- `text:/…/` in a strict search folds letters as the word index does, so `text:/Квартир.*/` and `text:/счёт/`
  find the words they missed. A search error says what to do instead: `~` points to `--language legacy`, a prefix
  too short to expand names a longer one, and an index still building gives the exact `tg store migrate`.
- Two `tg serve`s started in the same instant for one profile can no longer both run.
## 0.27.0 — 04.10.2026 [#0270--04102026]

### What's new [#whats-new-35]

- `tg mcp --http --public-url https://<name>.ts.net` serves behind your HTTPS tunnel with its own owner-code
  OAuth login. Every HTTP write needs a form; `tg mcp --revoke` forgets browser logins for the profile.
- `tg chats stats <chat>` counts stored group/channel activity and asks Telegram for joins and leaves.
  Offline and MCP results omit membership; incomplete counts are lower bounds.
- `tg chats members audit` lists suspicious member signals without removing anyone; unavailable signals
  are reported in `unknown`. MCP inbox/review accept `kinds` and `new` with their own checkpoints.

- Personal MCP uses the matching shared catalogue adopted by MAX. Photo previews accept `index`,
  and direct transcription accepts `model`. The SDK also adds archive statistics, conversation
  readiness and bounded local refresh; models are never downloaded automatically.

### Changed — may break scripts [#changed--may-break-scripts-38]

- Search/statistics coverage uses actual inventory and fetch timestamps; each completeness entry adds
  `fetchedAt`. Old stores gain these facts after the next whole chat list and history fetch.
  The `/catch-up` prompt takes `kind` and `mode` instead of `since`.
- `config set permissions` refuses unknown command keys, including keys inside a whole object, with exit 2.
  Existing files warn and continue; `config unset` can remove an old unknown key.
- `store fetch --page-size` above 100 is refused before connecting. Run `store fetch <chat>` again to repair
  an incorrect history-start mark when older messages exist.

- **`tg serve` exits with code 12 (`provider_unavailable`) when a saved session exists but the app credentials are unavailable**,
  for example while the login keyring is locked. Systemd retries after 30 seconds; macOS needs `tg server start`.
  Other commands and profiles without a saved session still exit 4.
- **`tg serve` and `tg watch` refuse to start with code 4 (`authentication_error`) if the session was already revoked.**
  They check the login before reporting readiness. A session revoked after startup still needs a separate check.
- **The background service no longer restarts on that code.** On systemd, exit 4 prevents a restart. On macOS,
  launchd cannot exclude one exit code, so the agent no longer restarts after any failure. Run `tg server install`
  again to update the unit; after `tg session start`, run `tg server start`.

- Unknown personal MCP arguments now fail before execution. Use the advertised schema, including
  `at_time` for scheduling. Approved schedules execute at the absolute time displayed in the form.

- **`tg messages list` can answer `hasMore: true`, with the `older messages: --before-id` hint, on a page shorter
  than `--limit`.** Telegram leaves deleted messages out of a page, so a short page is no proof of a chat's first
  message. Even the last nonempty page may say there is more; following its hint can return an empty page.

### Fixed [#fixed-68]

- Legacy, regex and filters-only search report the actual word-index readiness. `server status` reports
  the last normal unit exit and a stopped-login hint when the unit deliberately stays down.

- **`tg store fetch` no longer stops early and counts a chat as complete when a page comes back short.**
  Telegram leaves deleted messages out of a page, so a page can be short in the middle of a chat; the
  fetch now goes on until Telegram has nothing older. For a chat already counted as complete with older
  messages missing, run `tg store fetch <chat>` again: it reads below what is held.

## 0.26.0 — 04.10.2026 [#0260--04102026]

### What's new [#whats-new-36]

- **The bundled agent instructions explain how to find agreements, prepare meetings and recommend contacts.**
  Agents check archive coverage, compare group and personal chats, distinguish people with the same name,
  and retain a draft when sending is refused.

- **`tg messages link` and read-only MCP `tg_messages_link` return a message permalink and locator.**
  Channels and supergroups preserve thread context; private links require access and grant no
  membership. Dialogs, basic groups and Saved Messages return a locator. Offline validates the
  stored message without connecting; locators for another account are refused.
  Singular `link` differs from conversation-graph `links`.

### Changed — may break scripts [#changed--may-break-scripts-39]

- **Unpin uses its own permission, `messages.unpin`, in CLI and MCP.** Previously the shared
  guard checked `messages.pin`. Profiles with explicit canonical permissions should review their
  unpin rule; legacy `allow: ["pin"]` continues to cover both actions.

- **`tg commands [path...] --json` can describe one command or group.** For example,
  `tg commands messages search --json` includes global options and exit codes alongside that command.
  Without a path the full tree is unchanged; scoped responses add `scope` and `inheritedOptions`.
  Inspect different command paths in separate calls.

### Fixed [#fixed-69]

- **Unanswered reviews consider retained voice transcripts and requested new transcripts before
  filtering.** Add `--transcribe` to recognize voices that have no retained text. Unrecognized
  voices leave `complete` false: keep the previous review boundary rather than treating an empty
  result as proof that nothing needs an answer.

- Commands opening the local archive together wait briefly for initialization instead of failing
  immediately when another process holds its write lock. Persistent locks still fail normally.

- Voice transcription downloads use the history connection and close it before local recognition,
  avoiding a second connection for `messages list --transcribe`, `inbox` and `review`.

## 0.25.0 — 03.10.2026 [#0250--03102026]

### Fixed [#fixed-70]

- `chats show` explains that differing listed-member and participant counts may reflect self
  omission or a partial list, rather than claiming incomplete loading. JSON data stays unchanged.

### What's new [#whats-new-37]

- The README and bot guide make the complete native Bot API surface explicit: all 185 methods
  of the pinned Telegram Bot API 10.3, alongside the convenient bot commands and use-case MCP tools.

- `config migrate --dry-run` previews legacy access settings as canonical permissions without
  writing or connecting; `config migrate` applies it explicitly while preserving effective levels.
  Other configuration values stay unchanged.

- `tg <bot> bot api <method>` covers the pinned Telegram Bot API schema using cli-core generators
  and the common MAX/TG command builder. Native field flags, JSON/stdin bodies and nested multipart
  uploads share validation and write guards. Destructive methods ask by default; unanswered writes
  are never retried. Managed bot credentials require an explicit `--store-token <profile>` destination
  and stay only in the OS keyring; stdout contains a storage receipt.

## 0.24.0 — 03.10.2026 [#0240--03102026]

### Changed — may break scripts [#changed--may-break-scripts-40]

- `--md` uses Telegram's own formatter for personal and bot send/edit/captions. Nested styles, underline, spoilers, links, code fences and quotes are supported. `__text__` means underline; a single `*text*` now means bold. MAX has different syntax. Invalid nesting and unsafe links are refused before writing.

## 0.23.0 — 03.10.2026 [#0230--03102026]

### Changed — may break scripts [#changed--may-break-scripts-41]

- **Local message search defaults to a strict Lucene profile:** groups, typed fields/date ranges, `--timezone`, bounded wildcard/regex and coverage on empty results. Write prefixes explicitly as `word*`; use `--language legacy` for previous discovery behavior. The search guide and agent skill explain migration. JavaScript `--regex` runs in an isolated worker with size and time limits.

- **`tg upgrade --json` always includes `restarted`**, including checks and no-op updates.
  Previous fields remain; successful upgrades retain the managed-server restart policy. Scripts
  validating the exact key set should accept the empty array when no server restarted.

### What's new [#whats-new-38]

- **`tg mcp` lets go of the search model after 10 minutes without a search**: an agent's
  `conversations_search` no longer keeps about 1 GB in memory for the whole session. The next search
  loads the model again, in about a second.
- **`tg <bot> bot me` and MCP `tg_bot_me`** show the bot profile's id, name and username.
  This read uses the bot token, refuses offline mode, and sends no message.

- Global npm installation installs the agent skill before login when its lifecycle hook is allowed.
  On Windows it saves the npm command folder to user PATH and keeps the `.cmd` launcher usable
  under restricted PowerShell policies. The one-call Windows installer also updates its current
  shell, installs skills when scripts are skipped and verifies bare `tg` without account access.

- **Setup is discoverable immediately after installation**: root help and first-run errors point
  to `tg setup`; setup and session help include examples, agent instructions and Windows advice.
  Quick-start, installation, MCP and security pages consistently explain the guided first run.
  `tg skill show` works before login and setup completion points agents to it.

- **`tg topics enable` enables forum topics, and `tg topics create` creates a named topic.** Basic groups require explicit `--upgrade --yes`; their chat id changes and the result returns the new address. CLI and MCP check rights and report a partial result if upgrade succeeds before enable fails. Topic creation uses `--send-id` as an attempt identity; its journal refuses reuse after a sent or unknown outcome. Never retry an unknown topic creation. Existing archive rows keep their original chat ids.

- **`tg messages send --topic` and `tg polls create --topic` send to a named forum topic.** Text, media captions, replies and scheduled messages preserve the topic; missing or closed topics and replies from another topic are refused before sending. MCP accepts the same address as `topic`.
- **`tg setup` guides the first run**: local checks, automatic or browser app registration, QR
  or phone login, a check of five chats and an optional agent skill. It reuses existing sessions,
  explains the five-minute wait and leaves history downloads as a separate choice. Windows
  instructions include `.cmd` wrappers and an npm exec fallback when PATH is missing.

- **`tg mcp setup codex|claude-code` and `tg mcp doctor`** add the local server to a client and
  check its handshake and tools. Setup requires `--allow-writes` when the profile offers writing
  tools; doctor does not check the Telegram login.
- **`tg <bot> bot store fetch <chat>` imports older channel and supergroup messages** into the bot's
  local copy, without sending or marking read. Use `--from <message link>` for a first run without
  a known message number; later runs continue backwards. Private chats and basic groups are refused.
  See [the bot page](/llms.mdx/docs/tg/bot/content.md#fetching-older-messages).

### Fixed [#fixed-71]

- **A truncated `tg runs list --limit` suggests increasing `--limit`**, instead of the unsupported
  `--page` option. JSON still reports `hasMore`; reading recorded runs creates no new record.
- Early bot command failures use bot recording settings, and an unknown subcommand no longer
  blames a valid leading profile. The shared runner now applies these rules consistently.

- Login completion shortens Windows home paths correctly. Release documentation checks recognize
  Windows path separators. File-mode tests apply Unix permissions only on Unix; Windows access
  follows inherited ACLs, now stated in the security page.

## 0.22.0 — 03.10.2026 [#0220--03102026]

### What's new [#whats-new-39]

- **`tg messages evidence <chat>` and `tg_messages_evidence` over MCP** prepare a bounded packet
  from the local archive for an agent’s chat brief, without connecting or marking read. Source
  locators, fingerprints, explicit coverage and an older-page cursor keep citations and paging
  precise. Whole messages fit within 64 KiB of JSON items; `--limit` accepts 1–100.

- **`tg <name> bot contacts show --refresh`** says the same as in `max`: its help no longer names the
  messenger (cli-messaging 0.109.0).
- **The bot page is complete** ([the bot guide](/llms.mdx/docs/tg/bot/content.md)): how to find a chat's id, sending files and
  their limits, and the exit codes a script sees.
- **`tg <name> bot contacts show`, `bot messages search` and `bot messages between`** read what the bot
  kept on this computer. See [the bot page](/llms.mdx/docs/tg/bot/content.md#what-the-bot-kept).
- **`tg <name> bot chats moderate` and `bot chats rules`**: a bot judges a group's new messages by its
  rules and acts as they allow. It judges what `bot watch` kept, since Telegram gives a bot no history.
  See [the bot page](/llms.mdx/docs/tg/bot/content.md#moderating-a-group-by-its-rules).
- **`tg <name> bot mcp`: the bot for an agent**, over MCP. It offers the tools the bot profile's
  permissions allow; a deletion asks in a form first. See [the bot page](/llms.mdx/docs/tg/bot/content.md#the-bot-for-an-agent-mcp).
- **`tg messages search` takes a query language**: `"a phrase"`, `-word`, `a OR b`, and the filters
  `from:`, `chat:`, `after:`/`before:` and `has:`. A typo is corrected, and stderr says so.
  `--context <n>` shows the messages around each hit (2 in the terminal). `in:max`, `in:all` or
  `--source` also search the other accounts kept in the same store, MAX ones included. See
  [the archive](/llms.mdx/docs/tg/archive/content.md#search).
- **Search a group's conversations by meaning**: `tg conversations embed --chat <chat>` computes a
  vector for each conversation on this computer, and `tg conversations search "<question>"` finds the
  nearest ones, in one chat or every one you embedded. `tg models text list|download` fetches the model
  once into the folder the speech models share. With your own key, `--provider openai` (or
  `--base-url` for Ollama, LM Studio and the like) computes them instead, after telling you what goes
  out and what it may cost. See [topic search](/llms.mdx/docs/tg/topic-search/content.md).
- **`tg store fetch` no longer runs for ever** when Telegram keeps answering with messages it already
  gave.
- **`tg bot watch`**: what happens in the bot's chats as it arrives, kept in the bot's history on this
  computer before it is printed; `--events` for edits, buttons and people joining and leaving.
  **`tg bot callbacks answer`**, **`tg bot commands list|set|clear`** and **`tg bot webhooks
  list|set|delete`**, the same commands `max bot` has. See [the bot page](/llms.mdx/docs/tg/bot/content.md).
- **`tg bot chats admins list|add|remove`** and **`tg bot chats members remove [--block]`**: the bot's
  admins with their rights and title, making one with `--can` and `--title`, taking the rights back,
  and taking a person out of a chat, for good with `--block`. See [the bot page](/llms.mdx/docs/tg/bot/content.md).
- **`tg bot messages send|list|show|edit|delete|pin|unpin`** and **`tg bot chats show|leave|action`**
  — the bot writes to a chat by id or title, or to a person as `user:<id>`, with `--md`, `--html`, a
  file or a photo. Telegram gives a bot no history, so `list` and `show` answer from what this bot
  sent and received on this computer. A delete asks first; `--allow-dangerous` answers.
- **Your own AI agent can link a group's conversations**, when you ask it to: `tg skill show
  link-conversations` is its guide. It says how much text it would read and waits for your yes, then
  answers the chat a batch at a time (`tg conversations batches next`, `tg conversations links add`);
  `tg conversations links clear` drops its answers. tg calls no model itself. See
  [the archive](/llms.mdx/docs/tg/archive/content.md).
- **`tg mcp` serves this tool's guide as the resource `tg://skill`**, and names it in what it tells
  the agent on connecting, so an agent can read it without running `tg skill show`.

### Changed — may break scripts [#changed--may-break-scripts-42]

- **`tg messages search` puts the best match first**, not the newest; `--newest` gives the old order.
  When no message has every word, it now takes any of them, then a piece of a word. The JSON keeps
  `items`, `limit` and `hasMore`, and adds `match` and `score` to each hit, plus `corrections`,
  `completeness` (per chat: held in full or not) and `wordsReady`. A query of one or two letters is
  searched instead of refused.
- **tg needs Node 22.16 or newer** (or Bun, as before). When a Linux Node uses a system SQLite too old
  for the message store, `tg` restarts itself on its own SQLite from `@wirecat/cli-messaging-sqlite`,
  before it reads or sends anything. Official Node and Bun builds notice nothing.

### Fixed [#fixed-72]

- **A refused bot write names a working config command** with `--bot` and the permission key
  (cli-messaging 0.111.0). The former hint placed `config` under `bot`, where it does not exist.

- **Commands that change only this computer no longer say they change Telegram.** `config set` and
  `unset`, `chats rules set` and `unset`, `recipients add`, `remove` and `clear`, and the bot's
  `auth set`, `auth remove` and `recipients add`, `remove` and `clear` write the config file, the
  group-rules file, the recipient lists or the keyring. The [command reference](/llms.mdx/docs/tg/commands/content.md) now
  says "Changes something on this computer only." under them. They are still listed as writes in
  `tg commands`. `chats moderate` and `session end` still say they change Telegram.
- **`tg contacts show` lists the one-to-one chat with the person** among the chats you share, newest
  first. Before, it listed only the groups, because Telegram's list of common chats holds groups only.

## 0.21.0 — 01.10.2026 [#0210--01102026]

### What's new [#whats-new-40]

- **`tg bot`** — a Telegram bot, through the official Bot API and its token: `bot auth set|show|remove`,
  `bot list [--check]`, `bot chats list`, `bot recipients list|add|remove|clear` and `bot sends list`,
  the same commands `max bot` has. Several bots, each under its own name; the token lives in the
  keyring as `bot:<name>`, or in `TG_BOT_TOKEN`. See [the bot page](/llms.mdx/docs/tg/bot/content.md).
- **`tg conversations batches status|next --chat <chat> [--size <n>]`**: a group chat in batches for
  your own AI agent to link into conversations. `status` says how many messages and batches are left
  before you start; `next` prints the next batch. tg itself calls no model.
- **`tg skill install [--for claude|agents|all]`** writes tg's guide for AI agents where Claude Code
  and other agents look for it. When an agent runs tg and no copy is installed, tg says so once a day
  on stderr; `tg config set skillHint false --defaults` turns that off.
- **`tg store clear --left`** deletes the chats you have left from the local store, with their
  messages. It asks for `--allow-dangerous` and otherwise says how much it would delete.
- **`tg conversations build|list|show`** and **`tg messages links`**, with the MCP tools
  `tg_conversations_list` and `tg_conversations_show`: the conversations inside a group, found in the
  stored messages by replies, mentions and who wrote next — no Telegram request, no AI. Nothing is built
  until you run `build`. See [the store](/llms.mdx/docs/tg/archive/content.md#conversations-in-a-group).
- **A mention by name is kept**: when someone is mentioned by name rather than by @username, the stored
  message remembers whom, so conversations follow it.
- **`tg chats rules show|set|unset` and `tg chats moderate`**, with the MCP tools
  `tg_chats_rules_show` and `tg_chats_moderate`: a group's rules say what to look for — links, invite
  links, forwards, floods, blocked people — and how far a run may go: deny, report only, ask (the
  default), or act. Nothing runs in the background. See [groups](/llms.mdx/docs/tg/groups/content.md#rules).
- **`tg messages list --before-time`** reads back from a moment: ISO 8601, or `2h` / `1d` ago.
- **`tg contacts add|remove|block|unblock|rename|import`** and **`tg account update`**,
  **`tg account sessions end --others`**, with the MCP tools `tg_contacts_add|remove|block|unblock|rename`
  and `tg_account_update`. `contacts import` reads `number, name` lines from a file and prints only
  counts and who Telegram knew. Ending other sessions logs your phone out too: it asks first, and no
  agent is ever offered it.
- **`tg chats folders list|create|update|delete`**, with the MCP tools
  `tg_chats_folders_list|create|update|delete`. Changing a folder's chats keeps the others in it;
  "All chats" is not listed, since nobody can change it.
- **`tg chats members add|remove`** and **`tg chats admins add|remove`**, with the MCP tools
  `tg_chats_members_add|remove` and `tg_chats_admins_add|remove`. `--can` takes members, admins,
  info, pin, link, post, edit and delete; Telegram has no separate right to read. Adding answers who
  could not be added; each person added counts toward the hourly limit.
- **`tg chats update <chat>`** — `--title`, `--description`, `--all-can-pin on|off`,
  `--only-admins-add on|off` — and **`tg chats link show|reset`**, with the MCP tools
  `tg_chats_update`, `tg_chats_link_show`, `tg_chats_link_reset`. `tg chats show` adds a group's
  description, invite link and settings.
- **`tg chats create <title> [person...]`, `tg chats join <link>`, `tg chats leave <chat>`**, and
  the MCP tools `tg_chats_create`, `tg_chats_join`, `tg_chats_leave`. A new group is always a
  supergroup (`--channel` makes a channel); people who cannot be added are listed in the answer.
  See [usage](/llms.mdx/docs/tg/usage/content.md#groups-and-channels).
- **Permissions: one level per command, for you and for an AI agent alike.** A profile's
  `permissions` setting gives each command path a level: `deny` (not even reading), `readonly`, `ask`
  or `allow`; the most specific key wins — `tg config set permissions.messages.delete allow`. By
  default everything is allowed except deleting messages and ending other sessions, which ask. `ask`
  asks y/N in the terminal; `--allow-dangerous` (deleting) or the new `--yes` (any other write) says
  yes in a script. `readOnly` and `allow` still work. See [security](/llms.mdx/docs/tg/security/content.md).
- **`tg messages send --voice <file>`** sends an Ogg Opus file as a voice message, and a `.mp4` or
  `.mov` given with `--file` now plays in the chat as a video; `--as-file` keeps it a file to download.
- **`tg messages list --mark-read`** marks the chat read up to the newest message shown. Nothing else
  that reads marks anything read.
- **`--model` beside `--transcribe`** on `tg messages list` and `tg inbox`, and **`tg review
  --transcribe`**: voice messages in a review come with their text.
- **`tg store fetch --last <n>`** stops once the newest n messages of the chat are held, so a later
  run with the same `--last` asks Telegram for one page and stops.
- **`tg polls create --revote`** lets people change their vote.
- **`tg store export --output <file> --since-time <time>`.** The export goes into a new file only you can
  read, never over one, and can start from a time.
- **`tg account show` prints the phone's last four digits**, and the whole number with
  `--show-phone`. The MCP tool `tg_account_show` always prints only the last four.
- **`tg messages forward --send-id`.** A forward that got no answer is repeated with the send id from
  the error, and Telegram keeps one copy, as with a send. The `--json` answer carries `sendId`; MCP's
  `tg_messages_forward` takes `send_id`.
- **`tg messages edit --md`** formats the new text as `messages send --md` does; MCP's
  `tg_messages_edit` takes `markdown`.
- **Looking after the message store: `tg store info`, `check`, `migrate`, `backup`, `restore`.**
  `info` says where `messages.db` is, its size, its schema and how many rows it holds. `check`
  reports whether it is healthy — integrity, foreign keys, the search indexes, free disk — and names
  every chat whose stored history stops before the chat's newest message; it repairs nothing.
  `migrate` brings the file up to this version and normalizes the messages stored before it.
  `backup <file>` copies the store while it is in use, readable by you alone, never over a file.
  `restore <file>` puts a backup in place and keeps the store it replaces beside it; it refuses while
  `tg serve` runs or any process has the store open. The same file serves max-cli, so restart any
  running `serve` or `mcp` of either CLI afterwards.
- **Every write has its own id, `operationId`.** A send, edit, forward, deletion, pin, reaction,
  mark-read and poll vote prints it in its `--json` answer and MCP result, and the send journal and
  `--trace` name it, so one write can be followed from the answer to the log. A send's
  `operationId` is its `sendId`.
- **About 16 MB less to install**: cli-messaging 0.60.0 bundles its database layer instead of
  depending on it.

### Changed — may break scripts [#changed--may-break-scripts-43]

- **`tg server status --json` answers the fields both tools share**: `since` is `startedAt`,
  `listening` is `connected`, `listeningSince` is `connectedAt`; new are `cliVersion`, `log`, and
  `stale` when a `serve` that is gone left its lock behind. `tg server start` answers `startedAt`
  and `connectedAt` the same way, and `tg server stop` says who had started it (`by`). The lines say
  "connected" where they said "listening".
- **`tg messages send --at` is now `--at-time`**, as every option that takes a time names it.
- **The MCP tools' arguments carry their option's name**: `tg_messages_list` takes `before_id`,
  `before_time`, `after_id`, `after_time`; `tg_messages_context` `before_n`, `after_n`; `since` is
  `since_time` in `tg_inbox`, `tg_review` and `tg_chats_events`, whose `event` is `type`;
  `tg_messages_send` takes `md` and `at_time`.
- **Options name the kind of value they take.** The old names are refused as unknown options; there
  are no aliases. The MCP tools' arguments do not change.
  - `tg messages list --before` is now `--before-id`; `--after` is `--after-id` for a message id and
    `--after-time` for a time, so an id is never read as a time.
  - `tg messages context --before` and `--after` are now `--before-n` and `--after-n`.
  - `--since` is now `--since-time` in `tg inbox`, `tg review`, `tg chats events` and
    `tg store fetch`.
  - `tg messages download --output` is now `--output-dir`.
  - `tg chats events --event` is now `--type`.
- **`tg review --unanswered` takes a duration** — `4h`, `1d` — not bare hours; `--unanswered 4` is
  refused. Without a value it is 24 hours, as before. MCP's `tg_review` still takes hours.
- **`tg chats events --json` prints `{ items, page, limit, hasMore, chatId, since }`**: `events` moved
  to `items` and `more` to `hasMore`. **`tg server logs --json`** moved `lines` to `items`. `--jsonl`
  is unchanged.
- **A `.mp4` or `.mov` sent with `--file` plays in the chat as a video**; it arrived as a file
  before. Add `--as-file` to keep it a file to download.
- **`tg mcp` offers tools by the profile's permissions, not by flags.** With the default settings an
  agent can now send, edit, forward, react, vote and mark read without `--allow-send`, and without a
  form; deleting shows you a form first (`tg mcp --allow-dangerous` skips it). To keep an agent
  read-only, give it a profile with `readOnly` — [mcp](/llms.mdx/docs/tg/mcp/content.md) shows how. `--allow-send`, `--allow-mark-read` and `--allow-delete` decide nothing
  now and print a warning; `--confirm-send` still shows every write in a form.
- **`tg messages delete` asks** in the terminal when `--allow-dangerous` is missing, instead of
  refusing; with no terminal it is refused as before.
- **`tg store fetch --max <n>` is gone; `--limit <n>` caps a run instead**, in messages (1000 by
  default, as before), and `--page-size <n>` sets how many one request asks for (100 by default). The
  same names as max-cli's. `--max` is not kept as an alias.
- **A poll made without `--revote` no longer lets people change their vote**, as in max-cli; Telegram
  allowed it by default. Add `--revote` to keep the old behaviour.
- **`tg polls vote` and `tg polls close --json` print `{ operationId, poll }`** instead of the poll
  alone; read the poll from `.poll`. The MCP tools `tg_polls_vote` and `tg_polls_close` answer the same.
- **`tg runs list`, `tg sends list` and `tg recipients list --json` print `{ items, page, limit, hasMore }`**
  instead of a bare array, as every other list does; read the rows from `.items`. `--jsonl` is unchanged.

### Fixed [#fixed-73]

- **`tg chats list` no longer lists a pinned chat twice.** With archived chats included, Telegram's
  pages brought the pinned chats again further down; on one account 8 of 1361 chats appeared twice.
  A pinned chat's title also matched itself as two chats, so typing it could be refused as
  ambiguous.

- **`tg server stop` and Ctrl-C end `serve` and `watch` cleanly.** The serve went down before it could
  clean up, so `tg server status` reported a leftover lock (`stale`) after every stop.
- **`tg server` in a development checkout leaves the installed tg's systemd unit alone.** A checkout
  with its own `TG_STATE_DIR` or store gets a unit of its own name; the installed tg keeps
  `tg-serve-<profile>.service`.
- **A chat you have left no longer shows in `chats list --offline`.** It drops out the next time
  `tg chats list` reads your whole chat list; its messages stay until `tg store clear --left`, and a
  chat you rejoin comes back.

- **Two refusals say what to do.** Adding back someone who left or was removed, when you are not
  each other's contacts, now says to send them the invite link (`tg chats link show <chat>`);
  naming a person by an id this account has never seen now says to use an @username, or to read a
  chat they are in first.

- **An argument Telegram's library refused no longer repeats what you typed.** The error said the
  library's own words, which could quote a chat's title or a link. It now says what kind of input
  was wrong where tg can tell — a chat you have not joined, a message or invite link, a phone
  number, a login code or password — and otherwise that Telegram refused an argument.
- **A conversation reads in English.** Your own messages are `you`, and day headings read
  `26 September 2026`; they were Russian.
- **A chat or message tg cannot find is `not_found`**, and a chat of the wrong kind for the command
  is `validation_error`. They were an unknown failure with exit code 1 and the library's own words,
  which could repeat a chat's title.
- **The "not logged in" error names your profile**: `tg <profile> session start`, as the other login
  hints already did.
- **Downloads and exports get your usual file permissions again.** Since the first release, opening a
  session made every file tg wrote afterwards readable only by you. The session file and its
  companions stay owner-only.

## 0.20.0 — 30.09.2026 [#0200--30092026]

### What's new [#whats-new-41]

- **A message's sender keeps their @username in the local store**, so `--from @name` and the coming
  conversation view can match a mention to the person. Takes effect with cli-messaging 0.57.0 or later;
  history already downloaded gains it the next time it is fetched.
- **`tg store fetch <chat> --since <time>`** stops once it reaches messages older than the time:
  `2026-09-01`, or `2h` / `1d` ago.

### Changed — may break scripts [#changed--may-break-scripts-44]

Commands follow one naming standard: a noun, then a verb. The old names are gone, with no aliases —
a script that uses one now fails with "unknown command" or "unknown option".

- **`tg export <chat>` is `tg store export <chat>`**, **`tg sync status [chat]` is
  `tg store status [chat]`**, **`tg backfill <chat>` is `tg store fetch <chat>`**, and
  **`tg backfill list|status|cancel` is `tg store jobs list|show|cancel`**. `store fetch` fetches by
  default; `--estimate` only estimates. `--pace` is **`--pause`** there and in
  `tg messages download --all`. `--max` keeps its name: it counts messages.
- **`tg messages reply` is gone**: `tg messages send <chat> [text] --reply-to <id>` answers a message,
  and every send option (`--file`, `--photo`, `--silent`, `--at`, …) now works with it. The
  `msg:telegram/…` form has no replacement; give the chat and the message id.
- **`tg chats read` is `tg chats mark-read`**; the MCP tool `tg_chats_read` is `tg_chats_mark_read`.
- **`tg recipients off` is `tg recipients clear`.**
- **`tg update [--check]` is `tg upgrade [--check]`**, and the daily line about a newer version names
  `tg upgrade`.
- **`tg messages search <words…>` names its argument `<text…>`**; the search is unchanged.

## 0.19.0 — 30.09.2026 [#0190--30092026]

### Fixed [#fixed-74]

- **tg always exits once a command has finished.** Once, a download printed its answer and then stayed
  running for half an hour, `--timeout` or not. If anything is still open five seconds after a command
  is done, tg now names it on stderr and exits with the command's own exit code. Output still being
  written is waited for.

## 0.18.0 — 30.09.2026 [#0180--30092026]

### Fixed [#fixed-75]

- **A supergroup or channel first seen through one of its messages no longer loses messages to a deletion
  in a private chat** (cli-messaging 0.54.0). 0.16.0 left such a chat exposed because the store did not know
  its kind yet; its `-100…` id now says enough.
- **Messages a deletion elsewhere marked deleted by mistake come back** the next time their chat is read
  (`messages list`, `messages context`, or an edit arriving live). A deletion newer than the read stays.

## 0.17.0 — 30.09.2026 [#0170--30092026]

### What's new [#whats-new-42]

- **`tg messages download <chat> --all`** saves every file of a chat — photos, documents, videos,
  voice notes — into `--output`, newest first. Cut short by `--timeout` or Ctrl-C, it continues where
  it stopped the next time, and picks up newer messages too; where it got to is kept in a
  `.download-<chat>.json` beside the files. Telegram's "wait N seconds" is sat out up to five minutes,
  and `--pace` (1 s) spaces the pages. A file name another message already took gets the message id in
  front; nothing is overwritten. (cli-messaging 0.53.0)

## 0.16.0 — 30.09.2026 [#0160--30092026]

### Fixed [#fixed-76]

- **A message deleted in a private chat or a basic group no longer marks other chats' messages deleted**
  (cli-messaging 0.52.0). Telegram reports such a deletion without the chat, and the local store marked
  every stored message with that number deleted — channel and supergroup messages included. Messages
  already marked that way stay marked; their text is kept.

## 0.15.0 — 30.09.2026 [#0150--30092026]

### Fixed [#fixed-77]

- **A speech model on this machine no longer drops quietly spoken words.** A quiet stretch in the
  middle of a voice message was taken for silence and left out of the text; now it is heard, by
  Parakeet and GigaAM alike. Voice messages a local model heard before are heard again the next time
  `--transcribe` asks for them; Telegram's transcripts stay. (cli-messaging 0.51.0)

## 0.14.0 — 30.09.2026 [#0140--30092026]

### What's new [#whats-new-43]

Changing messages other people see — each through the send guard, as `messages send` is: a
read-only profile refuses, `allow` must name the permission, the recipient list and the hourly limit
apply where they count, and `tg sends list` records it without the text.

- **`tg messages edit <chat> <id> [text]`**: the new text of your own message. Repeating the same edit
  changes nothing. `tg_messages_edit` with `mcp --allow-send`.
- **`tg messages forward <chat> <id> --to <chat> [--silent]`**, checked against the chat it goes to.
  After an unknown outcome, look in that chat before forwarding again. `tg_messages_forward`.
- **`tg messages pin|unpin <chat> <id>`**, quiet unless `--notify`; in a one-to-one chat the pin is on
  your side only. `tg_messages_pin` and `tg_messages_unpin`.
- **`tg reactions add <chat> <id> <emoji>`** and **`tg reactions remove <chat> <id>`**; a reaction
  never counts toward the hourly limit. `tg_reactions_add` and `tg_reactions_remove`.
- **`tg chats read <chat> [--until id]`** marks a chat read — the other side sees it. Its tool,
  `tg_chats_read`, comes only with the new **`tg mcp --allow-mark-read`**, which `--allow-send` does not
  turn on.
- **`tg messages delete <chat> <id…> --allow-dangerous [--for-everyone]`**: at most 10, for you only
  unless `--for-everyone`, and nothing without `--allow-dangerous`. In a supergroup or a channel
  Telegram has no "for me only", so there it needs `--for-everyone`. The new **`tg mcp --allow-delete`**
  offers `tg_messages_delete`, which only ever deletes your own copy.
- **`tg polls show|vote|close|create`**: a poll with its answer ids, a vote by those ids (never by
  position) or `--retract`, closing your own poll, and a new one — public unless `--anonymous`, with
  `--send-id` for a safe retry. `tg_polls_show` reads; `tg_polls_vote`, `_close` and `_create` come with
  `--allow-send`.

## 0.13.0 — 30.09.2026 [#0130--30092026]

### Changed — may break scripts [#changed--may-break-scripts-45]

- **The shared message store moves to version 6** (cli-messaging 0.49.0). The first `tg` run upgrades
  `messages.db`; a `max` older than the one released the same day then refuses it and asks to be
  upgraded — `npm install -g @wirecat/max-cli@latest`. Nothing in `tg`'s own commands changes.

## 0.12.0 — 30.09.2026 [#0120--30092026]

### What's new [#whats-new-44]

- **`tg chats inspect <link>`** and `tg_chats_inspect`: what an invite or public link leads to — title,
  members, description, whether you are in it and whether joining needs approval — without joining.
- **`tg topics list <chat>` and `tg topics search <chat> <text>`**, and `tg_topics_list`: a forum
  group's topics, paged, with the id each message in a topic carries as `threadId`.

## 0.11.0 — 30.09.2026 [#0110--30092026]

### What's new [#whats-new-45]

- **Voice messages carry their text in `tg messages list` and `tg inbox`.** A transcript heard once
  is kept per profile in tg's cache and shows on every later read — `transcript` in `--json`,
  `🎤 …` under the text for a person. `--transcribe` hears the rest, by Telegram or the model on
  this machine, within two minutes for the whole list; what is left is in `unheard`. The same as
  `transcribe` on `tg_messages_list` and `tg_inbox`.
- **`tg chats members list <chat>`** and `tg_chats_members`: a group's members, paged, each with a role
  and when Telegram last saw them — up to Telegram's own 10 000.
- **`tg contacts lookup`**: who has a phone number, where their privacy lets you find them. The number is
  piped in or typed when asked, never an argument. Also `tg_contacts_lookup`.
- **`tg contacts sync`**: your Telegram contacts into the local store, answering how many were new or
  changed.
- **`tg account sessions list`** and `tg_account_sessions`: every device and app logged in to the account,
  without their IP addresses. It ends nothing.

## 0.10.0 — 29.09.2026 [#0100--29092026]

### What's new [#whats-new-46]

- **Voice to text on this machine.** `tg models audio list` and `tg models audio download <id>`
  fetch a speech model once — Parakeet v3 (25 languages, the default), GigaAM v3 or GigaAM v3 CTC
  (Russian) — into `~/.cache/cli-common/models/audio`, a folder every CLI of the family shares. `tg messages transcribe` asks Telegram first
  and falls back to the local model when the account has no Premium; `--local` or `--model <id>`
  skip Telegram. The profile's `transcribeWith` (`auto`, `messenger`, `local`) and `speechModel`
  set the defaults. Nothing downloads a model by itself.
- **`tg messages send --photo <path>` or `--file <path>`**, the text as the caption, and `photo` and
  `file` on `tg_messages_send`. Hidden files and folders, `~/.ssh`, tg's own folders and the message
  store are refused unless the owner adds `--allow-any-file`; over MCP there is no way around it. The
  send journal records the attachment's kind and size, never its name. A retry with the same
  `--send-id` sends one message (measured on a photo).

- **`tg update` restarts a running server with the new tg**, so it stops running the old code; a
  serve started by hand is named, for you to restart. **`tg server status` says when the running serve
  is older than tg**, as max-cli's does.

- **`tg chats events <chat> [--since] [--event]`** and `tg_chats_events`: who joined, left, was added
  or removed, and by whom — plus a chat created, renamed or a message pinned — from the chat's service
  messages, seven days back by default. At most ten pages of history a run; `more` says there was more.

## 0.9.0 — 29.09.2026 [#090--29092026]

### What's new [#whats-new-47]

- **`tg session start` says who logged in, where the session file is, where the app keys are read
  from and what to run next**, in sentences; `--json` gains `session` and `appKeys` (`environment`,
  `keyring` or `file` — never the keys).
- **`tg chats list --search <text> --kind <kind> --unread`**, and the same on `tg_chats_list`. The
  filters combine over the newest 200 chats; `--search` takes at least 3 characters.
- **`tg messages list --after <id-or-time>`** reads a chat forward: the oldest messages newer than a
  message id, or than a time (`2h`, `1d`, ISO 8601). `after` on `tg_messages_list`.
- **`tg messages send --silent --no-preview --md`** — without a notification, without a link's preview
  card, and with `**bold**`, `_italic_`, `~~struck~~` and `` `code` `` as Telegram formatting. The MCP
  send tool takes `silent`, `no_preview` and `markdown`. The send journal still holds only the length.
- **`tg messages send --at <time>`** hands the message to Telegram to send later — `2h`, `1d`, or
  `2026-10-01T09:00` in local time — and `tg messages scheduled <chat>` (MCP `tg_messages_scheduled`)
  lists what waits. A scheduled send is never repeated: `--send-id` is refused with it.

### Changed — may break scripts [#changed--may-break-scripts-46]

- **`tg service …` is now `tg server …`** — `start|stop|restart|status|logs|install|uninstall`, as in
  max-cli — and `tg serve status` is gone: `tg server status` answers. `tg server start` without a unit
  runs serve in the background. A unit written by `tg service install` is still found. From
  cli-messaging 0.40.0.

## 0.8.0 — 29.09.2026 [#080--29092026]

### What's new [#whats-new-48]

- **`tg review`**: every message, yours too, in each chat that changed since `--since` (three days
  without it) — for sorting out who owes what. It ends by saying where the next review starts.
  `--chat` reads one chat, `--unanswered [hours]` keeps the questions nobody answered — a group's
  admins answer for it too — and `--all` takes in muted and archived chats. The MCP tool `tg_review`
  and the `review` prompt do the same.

## 0.7.0 — 29.09.2026 [#070--29092026]

### What's new [#whats-new-49]

- **`tg messages transcribe <chat> <id>`** and the MCP tool `tg_messages_transcribe` turn a voice
  or video note into text with Telegram's own recognition — on a Premium account, or within
  Telegram's weekly free trial. Telegram usually needs a few seconds; tg asks again for up to a
  minute, then answers `"pending": true`. Refusals say why in plain words: not a voice message, too
  long, no Premium.
- **The MCP tool `tg_messages_photo`** hands an agent a message's photo as an image to look at, up
  to 512 KB. A larger photo, a file, a video or a voice note is refused with the
  `tg messages download` command that saves it.

## 0.6.0 — 29.09.2026 [#060--29092026]

### What's new [#whats-new-50]

- **`tg inbox` leaves out muted and archived chats** unless they mention you or reply to you; `--all`
  (and `all` on `tg_inbox`) shows them too. On a busy account most unread chats are muted, and they took
  the 20 chats `inbox` reads at once. The JSON's `quiet` counts what was left out.
- **A chat carries `muted`, `archived` and `unreadMentions`** in `--json`. `archived` moved out of
  `providerMetadata`; `muted` is absent when the chat follows the account's default.

### Fixed [#fixed-78]

- **`tg messages send --silent`, `--no-preview` and `--markdown` refuse the send** instead of sending
  without them: they came with cli-messaging 0.32, and tg does not carry them to Telegram yet.

## 0.5.0 — 29.09.2026 [#050--29092026]

### What's new [#whats-new-51]

- **`tg service install|uninstall|start|stop|status|logs`** runs `tg serve` as a systemd user unit
  (Linux) or a launchd agent (macOS), one per profile. `install` only writes the file; nothing starts
  until `tg service start`.
- **`tg backfill <chat> --background`** runs a backfill as a job that outlives the command;
  `tg backfill list`, `status [job]` and `cancel <job>` follow it. Ctrl-C or `cancel` stop a backfill
  after the page in hand, and it keeps that page.
- **`tg backfill <chat> --estimate`** — how many messages, requests and seconds a full backfill would
  still take, from the store; it asks Telegram nothing.
- **`tg export <chat> --format markdown`** — a chat as a transcript a person reads.
- **`tg messages search --regex '<pattern>'`** — a regular expression over the stored text.
- **`tg doctor report create`** writes a problem report — versions, paths, the failed run, the recent
  send attempts — with no message text, and every chat, message and account id replaced by a label.
- **`tg session start --qr-file login.png`** writes the login QR code as a PNG instead of drawing it,
  so an agent can pass it on, and removes it after the login. With the app already stored it needs
  no terminal.
- **`tg messages download <chat> <id> [--output dir]`** saves a message's photo, file, video or
  voice note into a folder — the current one unless `--output` names another — and answers its path
  and size. A name the sender chose cannot leave the folder or hide the file, and a file already
  there is never overwritten. The message is fetched again each time, so an old one still downloads.

### Fixed [#fixed-79]

- **`tg messages list --jsonl` and `tg messages search --jsonl` print one message per line**, as their
  `--help` says. They printed the whole page as one JSON line; a script that read `.items` from it must
  now read each line as a message.

## 0.4.0 — 29.09.2026 [#040--29092026]

### What's new [#whats-new-52]

- **`tg inbox`** — other people's unread messages in every chat; `--new` shows only what arrived
  since the last check, each message once. The MCP server offers it as the `tg_inbox` tool and the
  `catch-up` prompt.
- **`tg skill show`** prints the instructions an agent is given for this tool.
- **MCP prompts and a chat resource:** the `reply` and `find` prompts, and `tg://chat/{id}`.

## 0.3.0 — 28.09.2026 [#030--28092026]

### What's new [#whats-new-53]

- **`tg mcp`** serves a profile to an agent over MCP, on stdin and stdout. Read-only by default;
  `--allow-send` offers the send tool, and `--confirm-send` shows the owner every send first.
  `tg mcp config` prints the entry for an MCP client's settings.

### Changed — may break scripts [#changed--may-break-scripts-47]

- **A failure before a command runs is kept as a run** — a usage error, a configuration that will
  not load. `tg runs list` shows it; `--no-record` turns it off.

## 0.2.0 — 28.09.2026 [#020--28092026]

### What's new [#whats-new-54]

- **`tg update`** updates tg with the package manager that installed it; `--check` only looks.
- **A daily line on stderr when a newer version is on npm**, at a terminal only and after the
  command. `TG_NO_UPDATE_CHECK=1` turns it off.

## 0.1.0 — 27.09.2026 [#010--27092026]

The first release on npm.

### What's new [#whats-new-55]

- **Log in** by QR code or phone number (`tg session start`); the app credentials from
  my.telegram.org are fetched by opening the site or by filling it in for you (`--app auto`), and
  kept in the OS keyring.
- **Read:** `account show`, `chats list|show`, `contacts list|show`, `messages list|show|context`.
- **Send** with `messages send` and `messages reply`, through a send guard: a recipient list,
  read-only profiles, a journal of every attempt (`tg sends`), and `--send-id` to repeat a send
  whose outcome is unknown without sending it twice.
- **A local archive:** every read is kept in a store shared by the messenger CLIs; `--offline`
  answers from it, `messages search` searches it, `backfill` fills it, `watch` and `serve` keep it
  current, `sync status` and `export` read it.
- **Run records** (`tg runs`), `config`, `doctor`, `commands` and shell completion (`complete`).
