393 Commits
Author SHA1 Message Date
Dushnilin 715a7fee5c refactor(ui): замена сетки кнопок фильтров на компактный выпадающий список в окне проверки 2026-08-13 08:35:56 +03:00
Dushnilin 657c80da79 feat(ui): привести окно проверки доступности сервисов к нативному стилю LuCI и нормализовать наименования 2026-08-13 08:32:31 +03:00
Dushnilin 8724f82d1a feat(ui): добавить кнопку установки при наличии обновления и исправить зависание окна установки 2026-08-13 08:05:43 +03:00
Dushnilin 901c4ea1c1 Fix progress modal hang during self-update by lowering settle delay and status refresh interval 2026-08-12 14:34:38 +03:00
Dushnilin 19a8e2219b Enhance update progress modal step granularity, timers and theme-agnostic styling 2026-08-12 14:17:08 +03:00
Dushnilin bc161ae3ee Include short git commit SHAs in progress modal version badge 2026-08-12 14:14:52 +03:00
Dushnilin ebf9b7eeea Update service check profile titles with clean descriptive group names and badges 2026-08-12 14:06:58 +03:00
Dushnilin 02496fd9fb Add interactive progress modal dialog with animated progress bar and live steps for component updates 2026-08-12 13:51:08 +03:00
Dushnilin ca77b519ea Restore full Russian translation catalog (2400+ lines) and merge missing UI tab/section keys 2026-08-12 13:41:11 +03:00
Dushnilin 2396197d99 Update Russian translation catalogs for UI tabs, sections, and action buttons 2026-08-12 13:29:00 +03:00
Dushnilin e1a0f04e4a Update localization catalogs and fill script for Cannot save settings 2026-08-12 12:51:16 +03:00
Dushnilin fb1d9dfe5b Fix CI test failures: add missing Russian translation for 'Cannot save settings' and use common.background_command in service_check.uc 2026-08-12 12:39:30 +03:00
Dushnilin 5b372f5572 v1.2.75: Add Service Check mode switcher (Active Sections / All Profiles), restore AI Chat Assistant, harmonize action button styles, and fix dark theme compatibility 2026-08-12 12:22:52 +03:00
Dushnilin 2bd2fd7645 feat(diagnostics): нативная кнопка проверки сервисов
Реализована нативная проверка сервисов (watchdog, telegram, sing-box) через ucode, избавляя от внешней зависимости forkop-servicecheck.
2026-08-12 10:42:09 +03:00
Dushnilin 2b4d8cd4e0 fix(i18n): wrap Ollama and LM Studio labels in _() with English defaults and update po/pot 2026-08-11 22:29:34 +03:00
Dushnilin 1a1fd7f4c3 fix(settings): add Ollama & LM Studio to CBI settings tab options and make API key optional for local LLMs 2026-08-11 22:27:57 +03:00
Dushnilin 5db8ed7889 feat(ai-doctor): add dynamic endpoint placeholders and optional API key hint for Ollama and LM Studio 2026-08-11 22:11:48 +03:00
Dushnilin 40e185c143 i18n: actualize translation pot and po files for 1.2.74 2026-08-11 22:01:21 +03:00
Dushnilin da199c236a feat(ai-doctor): super-upgrade with Live Stepper, Root Cause Graph, Smart Fix Badges, Deep Log Inspection & Local LLM Presets 2026-08-11 22:00:20 +03:00
Dushnilin bc8a60fc73 fix(ui): hide legacy doctor repair button and make AI Doctor always clickable 2026-08-11 21:35:27 +03:00
Dushnilin 15a4f8962e fix(ui): add close and copy buttons to AI Doctor modal footer 2026-08-11 20:15:50 +03:00
Dushnilin ee44f21d77 fix(ui): remove duplicate commit sha formatting in header 2026-08-11 19:47:41 +03:00
Dushnilin 999686fea3 fix(ui): display short commit SHA next to Tachyon version in UI and constants 2026-08-11 19:06:00 +03:00
Dushnilin be5f41a52e feat(ai-stack-2026): add OpenAPI 3.0.3 schema, Telegram /ai_doctor & /fix integration, AI language selector, and log deduplication
- Agent REST API (agent_api.uc): Added GET /openapi.json returning OpenAPI 3.0.3 spec for ChatGPT Custom GPTs, N8N, Dify, and LLM Agents
- AI Doctor (runtime.uc): Added compress_log_snippet() for deduplicating repeated log entries and ai_doctor_lang support (ru/en prompt selection)
- Telegram Bot (telegram.uc): Added /ai_doctor and /fix commands with Inline Keyboards for instant quick-fix execution
- Settings (renderAdvancedSettings.ts, settings.js): Added AI Doctor Language selector (ru/en)
- Documentation: Updated README.md and README.en.md with 2026 AI features
2026-08-11 16:10:31 +03:00
Dushnilin 6dd085b777 feat(ai-doctor): supercharge AI Doctor with multi-fix, log context, history, and 13 quick fix codes
Backend (runtime.uc, agent_api.uc, tachyon CLI):
- Enrich AI Doctor LLM context with Watchdog state (OOM, streaks, active repairs) and last 15 critical log lines
- Support multi-fix parsing (quick_fixes array) and comma-separated FIX tags
- Add persistent history saving to /tmp/ai_doctor_last.json and ai_doctor_last endpoint
- Expand quick fix codes from 9 to 13 (added clear_dns_cache, update_subscriptions, reset_firewall, restart_network)
- Implement apply_quick_fix CLI command and REST API endpoint

Frontend (fe-app-tachyon, LuCI main.js):
- Add AI Doctor action button in Diagnostics tab
- Add shell methods aiDoctor, aiDoctorLast, applyQuickFix
- Render AI Doctor modal with Multi-Fix buttons and 'Fix All' option
- Integrate toast notifications and state updates
2026-08-11 16:06:19 +03:00
Dushnilin 3d48a22e3c feat(ai-doctor): add model selection per provider
Backend (runtime.uc):
- query_llm() accepts model_override (5th param), falls back to provider default
- ai_doctor() reads ai_doctor_model from UCI and passes to query_llm

Frontend (renderAdvancedSettings.ts):
- aiDoctorModel state field (type / init / load / save)
- Model dropdown per provider with sensible defaults:
  openai: gpt-4o-mini(default)/gpt-4o/gpt-4.1-mini/gpt-4.1/o4-mini
  anthropic: claude-3-5-haiku(default)/claude-3-5-sonnet/claude-3-7-sonnet
  deepseek: deepseek-chat(default)/deepseek-reasoner
  custom: free-text input
- Switching provider resets model to '' (use new provider default)

Legacy LuCI (settings.js):
- ai_doctor_model Value field with placeholder '(provider default)'
2026-08-11 12:37:31 +03:00
Dushnilin 8be248f9fd fix(ui): непрерывная индикация анимации на кнопке обновления без мигания
- При получении 'Another component action is already running' или сетевого
  RPC-сбоя спиннер на нажатой кнопке больше не сбрасывается сразу.
- Добавлено повторное связывание (fallback lookups) с 800ms задержкой, чтобы
  бэкенд успевал прописать запущенный job в state до снятия индикатора.
- При отслеживании запущенного задания теперь учитываются любые фоновые
  акшны для того же компонента.
2026-08-10 21:38:46 +03:00
Dushnilin dd3546f29a fix(updates): предотвратить ложный сброс индикации загрузки при переустановке одинаковых версий
- В waitComponentActionJob добавлен минимальный порог ожидания (10с)
  перед срабатыванием fallback проверки версии Tachyon. При same-release
  обновлениях (одинаковый номер версии, но новый SHA) совпадение версии
  больше не приводит к мгновенному (за 1с) снятию спиннера loading, пока
  бэкенд на самом деле только скачивает и ставит пакет.
- Расширен список транзиентных RPC ошибок (isTransientRpcError) для
  надежного перешивания перезапуска uhttpd/rpcd/ubus во время переустановки.
- Увеличен COMPONENT_ACTION_TRANSIENT_RPC_GRACE_MS до 60с.
2026-08-10 21:30:03 +03:00
Dushnilin 5cbbd0f661 fix(ui): suppress 'Already running' and DNS retry toasts
Lock contention ('Another component action is already running') is an
expected transient state — user clicked a button while a previous action
was still in flight. Showing [error] toast confuses users into thinking
something broke. Filter it from the log watcher notification pipeline.

Also suppress DNS retry debug lines (issue #24 retry logs) from showing
as error toasts.

Added tests for both suppressed patterns.
2026-08-10 21:01:21 +03:00
Dushnilin 31c36118ef refactor(ui): сгруппировать все параметры Settings по вкладкам (cbi-tabgroup)
- Настройки разделены на 6 категорий: DNS, Сеть, Сервисы, Обновления, ИИ и Системные
- Устранена длинная простыня прокрутки — каждая категория открывается во вкладке
2026-08-10 19:30:51 +03:00
Dushnilin c930c15dc3 feat(ai): добавить поддержку Anthropic Claude API в AI Doctor
- В query_llm (runtime.uc) добавлена интеграция с Anthropic Messages API (https://api.anthropic.com/v1/messages) с заголовком x-api-key
- В настройки Settings и Dashboard добавлен выпадающий выбор провайдера 'Anthropic (Claude API)'
- Добавлен русский перевод для опций AI Doctor
2026-08-10 19:16:19 +03:00
Dushnilin a15490c67d i18n: добавить русский перевод для AI Agent REST API в PO файлы 2026-08-10 19:14:41 +03:00
Dushnilin 8a71a5a1a4 feat(luci): добавить поле AI Agent REST API Token в стандартную вкладку Settings
- Добавлена опция agent_api_token (AI Agent REST API Bearer Token) в CBI-форму настроек settings.js
- Сохраняет токен через стандартную кнопку Save & Apply в LuCI
2026-08-10 19:13:51 +03:00
Dushnilin e67e8c0984 fix(package): исключить воркеры обновления из зачистки процессов при апгрейде
- kill_matching_command и цикл зачистки fd/1000 прокси в package.uc теперь пропускют процессы ucode (action.uc / updates.uc) и их предков, предотвращая выбивание воркера обновлений по SIGKILL во время prerm
- isTransientRpcError теперь учитывает 'failed to execute' в качестве транзиентной ошибки RPC при перезапуске rpcd / служб во время обновления
2026-08-10 18:57:19 +03:00
Dushnilin 7def6e556f i18n: fix Russian-source translation keys in AmneziaWG .conf import
section.js had 10 _() calls with Russian strings as keys instead of English.
This is a i18n antipattern: source keys must be language-neutral (English).

Changes:
- section.js: replace 10 Russian msgids with English equivalents
  - 'Загрузить конфиг .conf' -> 'Load .conf config'
  - 'Импортировать настройки AmneziaWG из файла .conf' -> 'Import AmneziaWG settings from .conf file'
  - 'Загрузить .conf' -> 'Load .conf'
  - 'Ошибка' (3x) -> 'Error' (reuses existing key)
  - 'Выберите файл с расширением .conf' -> 'Select a file with .conf extension'
  - 'Не удалось разобрать файл:' -> 'Failed to parse file:'
  - 'Загружено!' -> 'Loaded!'
  - 'Готово' -> 'Done'
  - 'Конфиг AmneziaWG успешно загружен!' -> 'AmneziaWG config loaded successfully!'
  - 'Ошибка чтения' -> 'Read error'

- tachyon.ru.po: add RU translations for 9 new English keys
- calls.json / tachyon.pot / tachyon.po: regenerated via locales:actualize

Result: 1108/1108 translated (no orphaned Russian-source entries)
2026-08-10 14:00:35 +03:00
Dushnilin 92f1b4e991 i18n: complete RU translations — 1109/1109 (was 1030/1109)
Translated 79 missing strings:
- 15 country names (Belarus, China, Finland, France, Germany, Japan,
  Kazakhstan, Netherlands, Russia, Singapore, Sweden, Turkey,
  Ukraine, United Kingdom, United States)
- TUIC URL validation errors (14 strings)
- UI general: Cancel, Conflict, Error, Fixed, Issues, Success, etc.
- Protocol abbreviations kept as-is: DNS, HTTP, MTU, RDP, SSH, TLS
- Doctor/watchdog: 'Doctor failed', 'Doctor repair', 'No issues found'
- WARP: registration detour, proxy, skip TLS cert, country code
- Hosts file descriptions, URL validation message
- Monitoring & Analytics, Optimization, Protection sections
- Checking… and Generating… (Unicode ellipsis U+2026 variants)
- Russian-source keys: 'Ошибка', 'Не удалось разобрать файл:'

Distributed to luci-app-tachyon/po/ via npm run locales:actualize
2026-08-10 13:53:23 +03:00
Dushnilin 90980917e4 feat(telegram): выбор секции прокси для Telegram-бота + фикс краша при null cb.from
- get_proxy_args() теперь поддерживает опцию UCI bot_proxy_section:
  если sing-box запущен и секция указана, переключает GLOBAL outbound через REST API
- Исправлен краш 'left-hand side expression is null' при обработке
  callback_query без поля from (например channel_post callbacks)
- В LuCI settings.js добавлен ListValue 'bot_proxy_section' с выпадающим
  списком активных секций (паттерн аналогичен download_via_proxy_section)
- Локализация: ru/tachyon.po и templates/tachyon.pot синхронизированы
- Пересборка main.js через npm run build
2026-08-09 22:34:06 +03:00
Dushnilin ba69e3d240 fix(i18n): синхронизация упакованного русского каталога
Переводы для "Rebuilt release" и "Installed build → Available build"
были добавлены в исходный каталог после locales:distribute, поэтому
копия в luci-app-tachyon/po/ru разошлась и тест luci_localization
падал на cmp исходного и упакованного каталогов.
2026-08-09 17:09:33 +03:00
Dushnilin af2d07b056 fix(updates): установка пересобранных релизов в рамках одного тега
opkg считает пакет уже установленным при равенстве версий, поэтому
пересборка под тем же тегом молча не применялась: задание завершалось
успехом, билд оставался старым. Добавлен --force-reinstall в
pkg_install_files_command (opkg) и в install.sh; apk не тронут, он
всегда пишет переданный файл.

Детект пересборки больше не зависит только от SHA, которого нет в
релизах старше f974e4a0: добавлен отпечаток билда по published_at и
метаданным ipk-ассета, решение вынесено в tachyon_build_differs с
префиксным сравнением SHA разной длины. Отпечаток установленного
билда пишется в state-файл и попадает в extra.

Telegram уведомляет о пересборках: check_notified_updates пропускает
outdated_same_release, дедуп идёт по версии и SHA, текст показывает
короткие SHA вместо пары одинаковых версий.

Кэш проверки обновлений сохраняет current_sha из результата действия
вместо безусловного latest, иначе неудачная установка выглядела как
"актуально".

Фронт пересобран из TS, ручная правка main.js снята. Добавлен
describeSameReleaseBuild с фолбэк-текстом, когда SHA недоступен.
2026-08-09 16:57:10 +03:00
Dushnilin 3d84d96e49 feat(ui): display short commit SHA alongside release version across LuCI UI 2026-08-09 08:50:38 +03:00
Dushnilin d6860d8a15 fix(fe): исправить типизацию fetchHostnames и обновить бандл LuCI 2026-08-08 13:00:17 +03:00
Dushnilin 810f6dbfc8 fix: убрать rpcd из shell uci-defaults (нарушал тест shell_inventory) 2026-08-07 20:51:38 +03:00
Dushnilin 55e0f9b303 fix: исправить список серверов в URLTest, ACL для rpcd, Telegram-бот
UI (section.js):
- showUrlTestSettingsModal и showPriorityLevelSettingsModal: предзагрузка
  кэша outbound-имён до открытия модала — CBINamedSection.render() не
  вызывает section.load(), из-за чего DynamicList рендерился без данных
- renderStackedJsonSettingsModal: вызов map.load() перед map.render()

LuCI ACL (luci-app-tachyon.json):
- Добавлены пути /tmp/run/tachyon/... наряду с /var/run/tachyon/...
  На OpenWrt /var — симлинк на /tmp; rpcd резолвит симлинки перед
  проверкой ACL, поэтому /var/run/... никогда не давал прав чтения
  и fs.read() возвращал PermissionError

Postinstall (50_luci-tachyon):
- Добавлен перезапуск rpcd после установки пакета, чтобы новые ACL
  вступали в силу без ручного logout/login в LuCI

Telegram-бот (telegram.uc):
- handle_toggle_mac(): блокировка/разблокировка устройств теперь
  через правила firewall (fw4), а не через UCI blocked_macs
- /cb команда: разрешение токенизированных коллбэков для oversized
  inline-клавиатур (лимит Telegram 64 байта на callback_data)
- /qh_start, /qh_end: интерактивная настройка часов тихого режима
- in_quiet_hours() и daily report: исправлен localtime(time())
  вместо clock() — clock() возвращает [сек, мксек], а не tm-структуру
- Уведомления об обновлениях: current_version вместо installed_version
- Описание команды /restart исправлено

Backend (api.uc, state.uc):
- http_probe(): выделена функция с проверкой HTTP-статуса
  (curl выходит 0 даже при 4xx/5xx — теперь проверяем код явно)
- run_speedtest(): учёт curl exit status
- Math.random() заменён на clock()[1] (Math недоступен без import)
- current_year(): убрано +1900 — localtime().year уже полный год
2026-08-07 20:45:06 +03:00
Dushnilin 138a3831b9 fix(tests): restore exact dashboardFilterChoiceRefreshers registration signature for tests 2026-08-07 17:58:24 +03:00
Dushnilin 7c0959a969 fix(ui): dynamic refresh of outbound choices when focusing or loading section cache 2026-08-07 17:34:42 +03:00
Dushnilin ff92e79c5b fix(ui): resolve empty server list in subscription and urltest filter dropdowns 2026-08-07 17:30:50 +03:00
Dushnilin 37569768d8 fix(tracer): fix rpcd ACL permissions for ruleset files and add source URL display for external .lst lists 2026-08-07 13:35:01 +03:00
Dushnilin 1599a7239c fix(tracer): implement resilient 3-way ruleset reading for domain/IP lists in routing tracer 2026-08-07 13:21:49 +03:00
Dushnilin f2a22a6730 fix(tracer): fix fs.readfile call for domain/IP lists and implement sing-box SIGHUP graceful recovery 2026-08-07 13:14:06 +03:00
Dushnilin 769598390d fix(ui): dynamic Sing-box repository globe link based on installed variant (shtorm-7/Leadaxe/SagerNet) 2026-08-06 22:07:38 +03:00