Commit Graph

11 Commits

Author SHA1 Message Date
maksarsanjeev b8541465ec ops: Xray in the installer (mihomo fails REALITY against Xray servers), watchdog rebuilds a poisoned Telegram app 2026-11-09 00:53:46 +03:00
maksarsanjeev a4f5a89026 ops bot: task lists go out one card per task with Сделано / Перенести buttons 2026-11-09 00:47:21 +03:00
maksarsanjeev 1889439ed7 ops bot: task lists carry ✓/⏰ buttons again (tasks, today, free-text asks) 2026-11-09 00:44:13 +03:00
maksarsanjeev 977665806f Ops bot: remember the last exchanges so follow-ups have context
Each message started a fresh claude -p with only the database snapshot, so
«да, поправь» had nothing to refer to. Keep the last 6 exchanges (2 h, in
memory, shared by Telegram and BroV) and put them into the prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 21:54:19 +03:00
maksarsanjeev 65d44c412e ops bot: timeouts on Telegram polling and a watchdog that restarts a stuck poll
On 12.10 one ConnectError through the proxy left getUpdates hanging on a dead (CLOSE-WAIT)
connection for 1.5 days: reminders still went out, incoming messages got no answer.
Explicit connect/read/pool timeouts for both request pools, long-poll timeout 25 s, and a
watchdog: no successful getUpdates for 3 minutes → exit, systemd starts a fresh process.
Tested on the VM by stopping the proxy: restart after 185 s, polling back once the proxy
returned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 23:15:17 +03:00
maksarsanjeev 882632b7ce Subscriptions: «Оплачено?» → paid status → «repeat?»; edit and create everything
- ops: paying marks the current charge paid (paid_for, persisted) instead of jumping to
  the next date; repeat_sub moves to the next period or closes the subscription.
  Paid-and-undecided subscriptions leave reminders and show in agenda['paid'].
  update_sub can set paid; tasks reopen when their status goes back; delete for subs and
  routines (BroV only, /api/delete); /api/tasks?all=1 and /api/subs?all=1.
- Bot: «₽ Оплачено?» on reminders, then «🔁 Да, <date> / Нет, закрыть»; after paying by
  text it asks the same with buttons.
- BroV: «Оплачено?» everywhere; «Оплачено — повторить?» section under the notch;
  «Весь план»: forms to edit or create tasks (title, description, status, due, company),
  subscriptions (amount, currency, period, date, reminder, company, paid, active) and
  routines, delete with confirmation, «+» per list, done tasks on demand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 03:57:18 +03:00
maksarsanjeev 18aed2beb9 Subscriptions belong to a company; BroV owns its Keychain token
- ops: subscriptions get a client (company) column (migrated in place); the brain fills it
  from «компания сага / для планеты»; /subs and «Весь план» group by company with
  per-company monthly totals; the company shows in agenda rows and the calendar.
- BroV: the API token handed over in ops-token.import is saved by BroV itself, so the
  Keychain item belongs to BroV and macOS stops asking for the password.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 03:42:41 +03:00
maksarsanjeev e47b97a462 ops: dates shown as DD.MM.YYYY (bot, digest, reminders, BroV)
Storage and the API stay ISO; ru_day() formats every user-facing date, Claude is asked
to write dates in its replies the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 03:21:24 +03:00
maksarsanjeev 549f8d046d ops: fix voice (pin PyAV 13), keep the bot token out of the journal
- faster-whisper 1.1.1 calls av.open(metadata_errors=…), removed in PyAV 14+: pin av.
- httpx logged every Telegram URL, which contains the bot token: silenced to WARNING
  (the VM journal was vacuumed).
- Voice notes: «слушаю…» while transcribing, an answer on failure; an error handler
  for the bot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 03:17:54 +03:00
maksarsanjeev 14c1f740d9 ops: installer asks for the subscription and bot token; first /start claims the bot
- install.sh prompts (hidden) for the VLESS subscription URL and the Telegram token on
  the first run, and picks Whisper base on VMs under 3.5 GB RAM.
- The owner chat no longer has to be looked up: whoever sends /start first becomes the
  owner (saved in the settings table); OWNER_CHAT_ID still overrides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 02:55:02 +03:00
maksarsanjeev ac94227b94 ops: BroV Ops service for the homelab VM (tasks, subscriptions, routines)
- SQLite: tasks with subtasks and time tracking, subscriptions + payments, routines +
  history, reminder log. All rules in core.Ops (tested: ops/tests).
- brain: free text → JSON actions via the local claude CLI (Haiku, the subscription);
  only whitelisted operations are applied, nothing is deleted.
- Telegram bot (owner only): text and voice (faster-whisper on the VM), /today /tasks
  /subs /routines /stop, morning digest and daily reminders with Done/Paid/Tomorrow.
- HTTP API for BroV (bearer token): agenda, tasks, subs, routines, say, action.
- deploy/install.sh: user brovops, venv, systemd; a proxy-only mihomo (127.0.0.1:7890,
  checksum-verified) so Telegram and Claude work from Russia without a VPN on the VM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 02:45:20 +03:00