Changelog
[0.4.0] — 2026-10-25
Two and a half days of the event log, read closely: 30 failures, every one of them connection-level (reset, TLS handshake, SSL EOF, DNS) and not a single HTTP error from a provider. chatgpt.com and api.commandcode.ai resolve into the router's fake-IP range and travel through sing-box, while api.z.ai goes direct — which is why GLM never complained. Every one of those drops produced a Telegram message, one per provider per tick.
Added
- One live card (
card.py): a single Telegram message, edited in place, with inline buttons — Refresh, Ping, Stats, Schedule, New card, Mute 8h. Pinned on send, and repainted only when a reading, a decision or a button changed something; the footer carries absolute times so a passing minute is not an edit. /card(и/карточка) and the 🆕 button: the old card is deleted and a fresh one is posted at the bottom, because editing cannot move a message.usage_interval(default"30m"): usage is read on a schedule instead of every 60s tick. A window reset, a failed ping, and the Refresh button force an early read; the tick stays at 60s, so pings still land on the reset. With three providers this is 144 requests a day instead of 4 320.- Per-provider
schedule—"mon-fri","mon-fri 07:00-23:30","weekends 10:00-02:00"(wraps midnight),"never","always"(default). Gates pings only; usage is still read outside it. Malformed values fail at config load, not at 3am. /schedule(и/расписание) in the bot: each provider's window and the next moment it opens.mute_hours(default8): the Mute button silences routine messages; an escalation is still delivered, because that is the one worth waking up for.- Batched pings: windows opening in the same tick produce one message.
failed_ping_cooldown(default"5m"): after a failed ping the watcher waits and re-reads usage instead of trusting the cache and hammering the provider.- Retries inside the tick — connection-level failures are retried
ping_retriestimes with doubling delay, and usage readsread_retriestimes. A provider that answers with an error (401, 500, bad payload) is never retried. - Error classification (
errors.py):networkvsprovider, andping_failedevents carry thatkind.
Changed
- One message per outage. A failed ping notifies on the first failure and at every
escalate_afterthreshold, not on every tick; a recovered provider says so. - One network message per incident. While the tunnel is down every provider fails at once, so network-class failures share a
network_notify_cooldown(default 30 minutes) instead of sending N messages. - A cached reading survives a broken read, and the failure is recorded without flipping the provider into an error state — the numbers on screen stay honest.
- A confirmed reset is remembered (
reset_seen), so a provider that cannot be pinged (weekend schedule, exhausted weekly) does not trigger a read per tick.
[0.3.0] — 2026-10-23
Added
windowping statsand a daily digest. Every ping, failure, weekly stop and usage error is appended toevents.jsonlnext to the state file;statsreports windows opened, coverage hours, tokens, time spent and a per-provider breakdown, in text or--json, for any period./statsin the bot, and one quiet summary per day after[telegram] digest_at.windowping doctor— read-only checks for the things that fail silently: config permissions, state directory, event log, clock skew against a real HTTPDate, every provider's usage endpoint, the CLI binaries aping_modeneeds, the bot token viagetMe, quiet-hours and digest syntax, the systemd unit and whether the watcher ticked recently. Exit code 1 only on real failures.- Watchdog and escalation. The unit now runs
Type=notifywithWatchdogSec=300andRestartSec=5s; the watcher sendsREADY,WATCHDOGafter each tick andSTOPPINGon the way out, so systemd can tell "running" from "hung".[general] escalate_after = 3adds an explicit "needs a hand" message after repeated ping failures, pointing atdoctor. - Kimi for Coding and MiniMax coding plan providers (both opt-in). Kimi windows are identified by
duration × timeUnitfrom the payload; MiniMax bills in aligned blocks, so its 5h window is the block spanning ≤ 7.5h and the reset isend_time. Ping endpoints are inferred from the OpenAI-compatible surfaces and unverified on a live plan — see the Supported Providers caveat. - Several accounts of one provider.
[providers.codex.accounts.work]builds the provider once per account, each with its own credentials, state and windows, namedcodex:work; the base name still means "every account".
Changed
http.pysends aUser-Agentthat follows__version__instead of a hardcoded0.1.0.
Fixed
- A ping recorded in the event log can no longer be lost to a timestamp that rounds a fraction of a millisecond into the future.
doctorasked for a real clock source instead of reporting "no network" whenever the caller did not pass one.
[0.2.1] — 2026-10-22
Added
- Quiet hours for Telegram:
[telegram] quiet_hours = "12:00-08:00"delivers notifications and replies withdisable_notification, so the bot never makes a sound inside the configured local-time ranges. Ranges may wrap midnight, several can be comma-separated, and a malformed spec raises at startup instead of quietly leaving the phone loud.
Fixed
- The polling thread no longer dies when Telegram drops a long-poll connection (
http.client.RemoteDisconnectedescaped the thread, and the bot went silent while the watcher kept pinging). Transport, JSON and per-update failures are now logged and retried with a capped backoff, and the update offset advances before handling so a poisoned message cannot replay forever.
[0.2.0] — 2026-10-21
Added
- Claude Code provider (
[providers.claude], opt-in). Usage comes from a read-onlyGET /api/oauth/usagewith the Claude Code login (macOS Keychain or~/.claude/.credentials.json,$CLAUDE_CONFIG_DIRhonoured), with a token refresh on 401. The ping drives one interactiveclaudeturn on a pty — print mode is billed to agent credits and never starts a subscription window — under its own session id, with hooks, tools, MCP servers and CLAUDE.md disabled, and the transcript read to prove a real reply came back. ping_modefor Codex:cli(thecodex execpath) orapi, which posts a single Responses turn to the same backend the CLI uses withmax_output_tokens: 16. Measured 16 tokens instead of ~12 000 per ping.ping_fallbackretries through the CLI when the API path fails.ping_modefor Claude:cli(default) orapi, a single 1-token/v1/messagescall that also returns the fresh meter from theanthropic-ratelimit-unified-5h-*response headers.windowping servicesubcommands —install,uninstall,start,stop,restart,enable,disable,status,logs. The systemd unit is rendered from a template shipped inside the package, so a checkout and a pip install produce the same file.- Russian bot replies.
[telegram] lang = "auto" | "en" | "ru";autofollows each sender's Telegramlanguage_code, and notifications use the owner's last seen language. Everything else in the project is English. docs/provider-research.md— what the survey of coding subscriptions found, with evidence levels (see Provider Research).
Changed
- Telegram output is HTML: bold provider names, a monospace meter block, status icons (🟢 ok, 🟠 weekly exhausted, 🔴 error, ⚪️ no data), translated detail lines, and a plain-text fallback when Telegram rejects an entity.
pyproject.tomlfollows PEP 639 (license = "MIT"pluslicense-files), with wider classifiers, project URLs and package data.
Fixed
- GLM:
glm-4.5-flashanswers200 OKbut never consumes coding-plan quota, so the default is nowglm-5.3-flash. - The watcher re-reads usage after a successful ping, so the notification says when the new window ends, and it logs decisions to the journal only when the state actually changes.
[0.1.0] — 2026-10-21
First release: Codex, Command Code and GLM Coding Plan providers, the window scheduler with its weekly guard, reset buffer, cooldown and registration grace, a single TOML config, Telegram notifications and a status command.