service-update-alerts/update_monitor/__init__.py
Jeena f55f3d8e91 feat: Add AI-driven auto-update & restructure into package
The monolithic check_updates.py has been split into the update_monitor/
package with separate modules for fetching, extraction, comparison,
classification, and notification. This makes the codebase easier to
navigate and test.

The flat services.yaml is replaced by per-service directories under
services/<name>/config.yaml, co-locating config with update scripts
and AI review examples.

When --auto-update is enabled, services with an auto-update.sh script
get their release notes classified by a local Ollama model (using
few-shot examples from review-examples/) to decide whether the update
can be applied automatically or needs manual admin intervention. Results
are reported in a single consolidated Matrix message.

Immich is the first service with auto-update configured, using 7
real release note examples to train the classifier.
2026-04-09 12:49:57 +00:00

34 lines
1.1 KiB
Python

from .checker import build_summary, check_service
from .classifier import Classifier, load_update_examples
from .comparator import compare_versions, normalize_version, parse_version
from .extractor import build_upstream_fallback, extract_version
from .fetcher import authenticate_service, build_headers, fetch_response, fetch_socket_info
from .loader import load_dotenv, load_services, load_services_dir, load_yaml
from .models import ExtractRule, ServiceConfig
from .notifier import send_matrix_message, send_uptime_kuma_ping
from .updater import run_update_script
__all__ = [
"ExtractRule",
"ServiceConfig",
"load_yaml",
"load_dotenv",
"load_services",
"load_services_dir",
"load_update_examples",
"fetch_response",
"authenticate_service",
"fetch_socket_info",
"build_headers",
"extract_version",
"build_upstream_fallback",
"normalize_version",
"parse_version",
"compare_versions",
"check_service",
"build_summary",
"Classifier",
"run_update_script",
"send_matrix_message",
"send_uptime_kuma_ping",
]