[TOOLS] Tool Gateway подключён к секретарю через MCP: mcp.servers.toolgateway (stdio, env TG_URL/TG_TOKEN), агент вызывает 10 инструментов нативно. Проверено: hub.status (74/0), calendar.create (201, удалено), ha.states+ha.call (свет), аудит в SQLite. Добавлены ретрай hub.status, валидация аргументов (400), selfcheck-проверка Tool Gateway. Дальше: подтверждения через Matrix, rate limit, family-токен

This commit is contained in:
root committed 2026-11-17 16:19:51 +03:00
1 parent 623acdc690
commit a026315f08
5 files changed
+187 -3

No files matched your search

+9 -1
View File
@@ -250,12 +250,20 @@ def check_pg_conn():
pct = 100.0 * total / limit if limit else 100
add("Postgres соединения", pct < 80, "%d/%d (%.0f%%)" % (total, limit, pct))
def check_tool_gateway():
"""Tool Gateway: служба и /health."""
active = sh("systemctl is-active tool-gateway 2>/dev/null").strip()
health = sh("curl -s -m 5 http://127.0.0.1:9140/health 2>/dev/null").strip()
ok = active == "active" and '"ok": true' in health
add("Tool Gateway", ok, "active=%s health=%s" % (active, health[:60]))
def main():
print("Самопроверка платформы", date.today().isoformat())
checks = [check_units, check_services, check_bots, check_matrix_sso, check_ollama,
check_n8n, check_digests, check_reports, check_registry, check_cron_dots,
check_tasks, check_approvals, check_hermes, check_errors, check_disk,
check_lvm, check_pg_conn]
check_lvm, check_pg_conn, check_tool_gateway]
for fn in checks:
try:
fn()