Skip to content

v0.2.4 — CLI + Skill First: Coding-Agent Integration, DM Archive & Floodgate Safety

Choose a tag to compare

@github-actions github-actions released this 30 Sep 01:34
· 182 commits to main since this release

What's Changed

  • feat(dm): persistent archive of full DM history, both directions (#1453) by @axisrow in #1455
  • ci: measure coverage on main only — PRs skip the cov instrumentation by @axisrow in #1458
  • fix(tests): drop the xdist load throttle — local -n auto is cpu - 1 by @axisrow in #1464

Highlights

  • The primary mechanism: tg-agent CLI + skill for coding agents — The project is repositioned as a dependency for coding agents (Claude Code, OpenCode, Codex): every capability lands as a Typer CLI command first and is documented in the bundled tg-agent skill — setup checks, a task→command map and safety rules for acting on a real Telegram account (#1446). The argparse framework is fully gone (#959, #1120-1163) — one consistent CLI with uniform --help — and a plugin manifest ships alongside (#1406). Four agent backends (claude-agent-sdk, deepagents, Codex SDK #757, Google ADK #943) embed the same tools in-process. The web panel and TUI keep working but are frozen; the CLI is the contract.
  • REST /api/tasks — external agents drive the worker over plain HTTP — A unified jobs read-model over collection tasks, scheduler jobs, telegram commands and dispatcher work (#963, #981), plus REST create/claim/complete/fail for task types like dm_reply and chat_answer (#960-961, #978). Coding agents get a clean HTTP surface instead of process embedding.
  • Persistent DM Archive (both directions) — A real-time listener records every incoming and outgoing personal-chat message into a dedicated dm_messages store (#1438, #1427). A catch-up job recovers anything missed while offline, with three modes and staleness overrides (#1428), and dialogs archive-history backfills full history for people, bots and Saved Messages from a fresh dialog snapshot (#1455). Idempotent, resumable via per-chat cursors, survives restarts.
  • Flood safety rebuilt on the telethon-floodgate package — The hand-rolled flood stack was replaced by the external telethon-floodgate package: per-peer send limits, a proactive dialogs-page gate, a calibrated history category and a process-wide outgoing ceiling (#1432, #1433, #1441, #1444, #1405, #1372). Ban-prone patterns like repeated warm-ups are structurally prevented, and CLI commands hand Telegram work to the running worker instead of competing for sessions (#1324).
  • TG_PROXY — SOCKS5/HTTP proxy for all MTProto traffic — On networks where Telegram IPs are blocked, set TG_PROXY=socks5://… or http://… and every connection (auth, pool, CLI, live-CLI tests) routes through it (#1450). Malformed proxy values fail fast at startup instead of being silently ignored.
  • Resilient dialog cache and sweeps — Partial refreshes are preserved and surfaced instead of silently discarded (#1347, #1351, #1360), flood-degraded stale snapshots are flagged partial (#1358), truncated sweeps resume from a batch ledger (#1361, #1367), legacy groups resolve via PeerChat (#1353), and live dialog history is readable in CLI and web via tg_messenger (#1299).
  • SSO: session-string export/import on every surface — Move an authorized account between machines and pools via account export-session / import in the CLI, the web login form, and agent tools (#828, #1150-1159). Encrypted-at-rest sessions require an explicit key, enforced at startup (#1363).
  • AI channel ratings — LLM-judged channel quality: channel_ratings storage with CSV seed, an analytics channel-rating CLI command, a web table, and a read tool for agents (#966-1001). Filter analysis gains --quick sampling of the last N messages per channel (#1138).
  • Telegram-Desktop-style export — Build Telegram Desktop-compatible exports with size-aware media download, plus offline text export and a worker-driven EXPORT task (#834, #937-939).
  • Security hardening — Web panel defaults locked down: 127.0.0.1 bind with weak-password fail-fast (#1305), password policy and auth throttling (#1339), CSV-injection/CSRF/ReDoS fixes (#846, #1256), and WAL-shared session materialization (#1323).
  • Database performance — FTS backfill with a 21 GB index drop (#945), configurable cache/mmap with PRAGMA optimize on close (#940), exact-COUNT removal from search (#824), and reaction aggregation instead of JSON scanning (#827) — snappy on multi-GB archives.

Full Changelog: v0.2.3...v0.2.4