sync_state.py bricht den git-Sync ab + alarmiert per Telegram, wenn der
Live-Arbeitsbaum uncommittete Aenderungen oder ungepushte Commits hat,
statt sie per reset --hard FETCH_HEAD zu vernichten. Watchdog laeuft
unabhaengig weiter. Behebt die Ursache von Issue #123.
Rename lief nur beim Download-Abschluss; POST /api/rename_pending
benennt alle Titel_ID.mp4 auf Hetzner um. savetv_rename_nas.py für
bereits kopierte NAS-Dateien. __ wird zu Bindestrich im Titel.
- list_chats output now ends with an explicit instruction to call
chatlog_recent / chatlog_since next (Gemini 2.5 Flash tends to answer
after a single tool call otherwise)
- list_chats description: clarify it only returns metadata, never content
- recent description: marked as PREFERRED for reading actual messages
- 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.
The earlier prompt explicitly named 'mychatarchive' / 'search_brain' as
forbidden, which planted the term in the LLM's memory. Now only the four
real tool names are mentioned positively, plus an instruction to ignore
old session-history that may contain hallucinated tool names.
Live-test showed Grok 4.1 Fast inventing 'mcp_mychatarchive_search_brain'
when asked about Telegram chat history. Fix:
- Tool descriptions explicitly say 'TELEGRAM' and 'NICHT ChatGPT/Memory/RAG'
- SYSTEM_PROMPT_EXTRA lists all 4 exact tool names and forbids inventing
alternatives like 'mychatarchive' or 'search_brain'
- Forbids using rag_search/openmemory_search/web_search for Telegram-
related queries
- Demands honest 'no data' over hallucination
Prevents 'aktueller Stand zur G2010B-Vermietung?' from being routed to
perplexity/sonar (which can't tool-call) just because 'aktuelle' is in
_WEB_TRIGGERS. New triggers: concierge, listing, vermietung, kaution,
G2010B/D1603 apartment codes, etc.
Grok 4.1 Fast was eskaliereing 'Stand zur G2010B-Vermietung?' to
perplexity/sonar instead of using chatlog_*. Strengthened
SYSTEM_PROMPT_EXTRA with explicit triggers (G2010B, D1603, ARAKAWA,
Concierge, Bnb, Kaution, Mieter) and a 'NO web search for this' rule.
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.
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.