Commit graph

3 commits

Author SHA1 Message Date
Homelab Cursor
2fa011fa2a chatlogger: add tailscale-only HTTP API + Hermes MCP wrapper
- chatlogger/api.py — read-only HTTP API (stdlib http.server, bearer-token
  auth, bound to 100.123.47.7:8770) with /list_chats, /recent, /search,
  /since, /stats, /healthz
- chatlogger/chatlogger-api.service — hardened systemd unit
- chatlogger/api.env.example — env template (token + bind + db)
- mac-clients/chatlog_mcp.py — stdio MCP wrapper for Hermes Agent on the
  Mac (4 tools: chatlog_list_chats / recent / search / since), uses only
  Python stdlib, talks to the REST API via Tailscale.

Hermes registers as 4th MCP server (chatlog) — verified live with
76 tool(s) from 4 server(s) in gateway.log.
2026-05-01 12:55:38 +02:00
Homelab Cursor
d82b6f97ef feat(chatlogger): multi-tenant + Jarvis tool integration
Phase 2 of the chatlogger feature.

Multi-tenant:
- chatlogger-bot.service -> chatlogger-bot@.service (systemd template)
- /opt/chatlogger/<instance>.env per bot, all share /opt/chatlogger/chats.db
- existing bot migrated: chatlogger-bot@arakawa.service
- adding a second group bot is now: cp arakawa.env <name>.env, edit token+chats,
  systemctl enable --now chatlogger-bot@<name>

Jarvis (hausmeister-bot) tool:
- homelab-ai-bot/tools/chatlog.py (autodiscovered by tool_loader.py)
- 4 tools: chatlog_list_chats, chatlog_recent, chatlog_search, chatlog_since
- Reads SQLite directly via sys.path += /opt/homelab-brain/chatlogger
- SYSTEM_PROMPT_EXTRA tells the LLM when to use these (Concierge, Airbnb,
  Listing, 'aktueller Stand', 'wer hat zugesagt', 'muss ich reagieren').

Tested live: hausmeister-bot loads 48 tools (44 + 4 new), all chatlog
handlers callable, returns real messages from the @arakawa_concierge_bot
recording of -1003924901022.
2026-05-01 12:13:00 +02:00
Homelab Cursor
e1be45399e feat(chatlogger): Arakawa Concierge — passive Telegram group chat logger
Standalone bot @arakawa_concierge_bot that silently records configured
group chats into SQLite (FTS5). Phase 1 — capture only, no LLM, no
auto-replies. Reads token + chat allowlist from /opt/chatlogger/env
(NOT in git). Runs as systemd unit chatlogger-bot.service on CT 116
sharing /opt/bot-venv with the hausmeister-bot.

- chatlogger_bot.py: telegram polling, message/edit handlers, admin cmds
  (/whichchat, /log_status, /recent, /search) — silent in groups
- store.py: SQLite schema + FTS5 search + edit audit
- query.py: CLI (recent, search, stats, chats, since, export JSONL)
- chatlogger-bot.service: systemd unit, hardened (ProtectSystem=strict)
- env.example, README.md

Tested live: message 'hallo' from -1003924901022 stored, retrieved
via CLI within seconds. Group privacy must be off in BotFather.
2026-05-01 12:03:22 +02:00