Спасибо!

Мы очень рады, что Вам нравится данный проект и вы проголосовали за его развитие.

Работа над задачами по проекту отнимает у его разработчика самое ценное — время, так что небольшая компенсация в виде материальной поддержки поднимет интерес к разработке и позволит сделать больше задач для общей пользы :)

OK

Дополнение OpenCode

Владелец задачи: golnet, Moscow - Russia
Текущий статус: Поддержка
Страница дополнения

Модуль интеграции opencode.ai с Majordomo. Добавляет AI-ассистента с поддержкой любых LLM-провайдеров (Ollama, OpenAI и др.), управление устройствами через MCP, выполнение bash-команд и работу с файлами прямо из админки и пользовательского интерфейса.

21.10.2026

Настройка показа времени сообщений и секунды в чате

(golnet)

Настройка показа времени сообщений и секунды в чате

  • Чекбокс «Показывать время сообщений» в новой секции «Интерфейс чата»
    (вкладка «Провайдеры, модели и MCP»), настройка OC_SHOW_TIME в конфиге.
  • Время под сообщением теперь с секундами: 12:30:56 вместо 12:30.
  • Документация в справке модуля.
    https://github.com/golnet1/majordomo-opencode/comm...
Обсуждение (0) (0)

16.10.2026

Revert "Fix form answer matching: ordinal words, sentiment-aware fall…

(golnet)

Revert "Fix form answer matching: ordinal words, sentiment-aware fallback (prefer allow for affirmative/any; deny for negative), use first option by default"

This reverts commit 3a5284eff681a77338f3f7e2c03a5b3398316e27.
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

16.10.2026

Fix form answer matching: ordinal words, sentiment-aware fallback (pr…

(golnet)

Fix form answer matching: ordinal words, sentiment-aware fallback (prefer allow for affirmative/any; deny for negative), use first option by default
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

16.10.2026

Bound REST timeouts and prevent poll pile-up in Apache workers

(golnet)

Bound REST timeouts and prevent poll pile-up in Apache workers
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

16.10.2026

opencode: поднимать MCP-серверы перед запросом к ассистенту

(golnet)

opencode: поднимать MCP-серверы перед запросом к ассистенту

В OpenCode 2 инструменты MCP попадают к модели через динамический
«Code Mode»-каталог. Когда MCP-сервер не в статусе connected, его
инструменты исчезают из каталога, и ассистент отвечает, что управление
умным домом недоступно (в наборе остаются только музыка и служебные
функции) — это и есть «отвалы MCP».

MCP-соединение периодически отваливается: stdio-процесс завершился,
opencode закрыл простаивающее соединение, сервис перечитал конфиг и
перезапустился.

ensureMcpConnected() перед каждым запросом проверяет статусы через
/api/mcp и через /api/experimental/mcp/{server}/connect поднимает
отключённые серверы, дожидаясь статуса connected. Если всё в порядке —
почти бесплатная проверка (один GET /api/mcp).
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

16.10.2026

opencode: не показывать ошибку, если обновлять было нечего

(golnet)

opencode: не показывать ошибку, если обновлять было нечего

Кнопка «Обновить OpenCode» при уже установленной последней версии
запускала opencode upgrade, он завершался быстро без смены версии, и
модуль показывал красное «Не удалось обновить OpenCode: версия не
изменилась», хотя всё было в порядке.

  • Критерий успеха — фактическая смена версии. Вывод npm проверяется
    только когда версия не изменилась.
  • Если ошибок нет и версия та же — это не ошибка: показываем зелёное
    «OpenCode уже последней версии: X».
  • Добавлены маркеры ошибок самого CLI (could not install OpenCode и др.).
  • При отсутствии изменений не перезаписываем конфиг и не перезапускаем
    сервис.
  • Новая строка LANG_OPENCODE_UPGRADE_LATEST (ru + default).
    https://github.com/golnet1/majordomo-opencode/comm...
Обсуждение (0) (0)

15.10.2026

Fix MCP status display: unwrap the v2 /mcp response envelope

(golnet)

Fix MCP status display: unwrap the v2 /mcp response envelope

The v2 API answers GET /mcp with a wrapper object:
{"location": {...}, "data": [{"name": ..., "status": {"status": "connected"}}]}.
The status poll passed that wrapper straight to the template, whose JS
iterated Object.keys() and rendered "location" and "data" as MCP servers
with a red (unknown) indicator.

  • Add getMcpStatuses(): normalizes both the v2 wrapper (list of
    {name, status: {status}}) and the v1 object (name => status) into
    [{name, status}] with a plain status string.
  • opencode_ajax.php check_status now returns that list.
  • The template JS renders the list instead of iterating object keys.
    https://github.com/golnet1/majordomo-opencode/comm...
Обсуждение (0) (0)

15.10.2026

Speed up module pages: avoid heavy Python import on every request

(golnet)

Speed up module pages: avoid heavy Python import on every request

Opening the module admin page (and the 5-second status poll) ran 'python3 -c import mcp' on every request. The mcp package pulls in pydantic/httpx/anyio and takes ~4s to import, on top of ~0.5s to spawn the opencode binary for the version check, so pages took 4-5s.

  • checkPythonPackage() now uses importlib.util.find_spec (~0.1s); the real import is only done after installing the package (\ = true).
  • getMcpPython() does the same and caches the result (it is called once per MCP server when writing the config).
  • binaryVersion() caches the probe result keyed by the binary signature (path+size+mtime), so a normal page load no longer spawns the binary; an upgrade/replace changes the signature and invalidates the cache.

Measured on dacha: check_status 4.2s -> 0.07s.
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

15.10.2026

Fix: remember 'Require authorization' checkbox state on admin page

(golnet)

Fix: remember 'Require authorization' checkbox state on admin page
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

15.10.2026

Support OpenCode v2 alongside v1

(golnet)

Support OpenCode v2 alongside v1

  • Detect v2 by 'opencode --version'; use the 'serve' subcommand, the /api prefix and password auth for v2, keep 'web' for v1.

  • Unwrap the {data: ...} response envelope for v2 (session create, message list, model list); v1 paths unchanged.

  • v2 flow: create session with model+agent, POST /session/{id}/prompt, POST /experimental/session/{id}/wait, then read the newest assistant message (?type=assistant&order=desc).

  • v2 system prompt is delivered via agents.<agent>.system in opencode.jsonc (the v2 prompt endpoint has no system field): regenerate the config and restart the service on save.

  • Fold the 'no reasoning' instruction into the default system prompt; bump the About version to 2.0.2.
    https://github.com/golnet1/majordomo-opencode/comm...
Обсуждение (0) (0)

14.10.2026

Send the system prompt with each message and forbid reasoning in replies

(golnet)

Send the system prompt with each message and forbid reasoning in replies

OpenCode ignores 'system' on session creation, so the module's system prompt was never applied. It is now sent with every message (POST /session/:id/message). Added a LANG_OPENCODE_NO_REASONING instruction so the model keeps its chain of thought out of the reply.
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

27.09.2026

Merge config updates instead of rewriting the whole row

(golnet)

Merge config updates instead of rewriting the whole row

saveConfig() serializes the entire in-memory array back over the row, using
whatever getConfig() read at the start of the request. Callers that hold that
snapshot for a while then discard edits made in between, which is why the MCP
server list kept reverting:

  • background.php keeps the snapshot for the length of the request, up to
    OC_TIMEOUT seconds, then saveTokensFromResponse() writes it back. Editing
    the settings within that window lost the change.
  • the status poll calls canSudo(), which writes the whole config when its
    hourly cache expires.
  • noteMinVersion() fires on any API error and does the same.

updateConfig() re-reads the row and merges only the keys it was given, with
null removing one. All eleven call sites outside the settings form now use it;
the form keeps saveConfig(), since there writing every posted field is the
point.

Verified with two processes: a worker holding a stale snapshot and an admin
save. The admin's value survives and the worker's key is still written.
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

20.07.2026

feat: remote MCP через mcp-proxy + type: remote

(golnet)

feat: remote MCP через mcp-proxy + type: remote

  • syncMCPProxies() управляет mcp-proxy процессами на dom
  • buildRemoteConfig() конвертирует local MCP в type: remote URL
  • PATCH /global/config синхронизирует трансформированный конфиг
  • Поля MCP Proxy IP/Port в настройках модуля
  • Один порт 18765 для всех MCP серверов (named servers через mcp-proxy)
    https://github.com/golnet1/majordomo-opencode/comm...
Обсуждение (0) (0)

13.07.2026

Add Parameters section with memory limit UI in server tab

(golnet)

Add Parameters section with memory limit UI in server tab

  • New accordion 'Parameters' between Network/Auth and Full Access
  • Checkbox to enable/disable memory limit
  • Editable MemoryMax and MemoryHigh fields (shown on checkbox)
  • Conditionally adds MemoryMax/MemoryHigh to systemd drop-in
  • Language constants for EN (default) and RU
    https://github.com/golnet1/majordomo-opencode/comm...
Обсуждение (0) (0)

13.07.2026

Add Parameters section with memory limit UI in server tab

(golnet)

Add Parameters section with memory limit UI in server tab

  • New accordion 'Parameters' between Network/Auth and Full Access
  • Checkbox to enable/disable memory limit
  • Editable MemoryMax and MemoryHigh fields (shown on checkbox)
  • Conditionally adds MemoryMax/MemoryHigh to systemd drop-in
  • Language constants for EN (default) and RU
    https://github.com/golnet1/majordomo-opencode/comm...
Обсуждение (0) (0)

11.07.2026

fix: add MemoryMax/MemoryHigh limits to opencode-web systemd service

(golnet)

fix: add MemoryMax/MemoryHigh limits to opencode-web systemd service
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

02.07.2026

fix: only add default MCP server if OC_MCP_SERVERS key missing from c…

(golnet)

fix: only add default MCP server if OC_MCP_SERVERS key missing from config
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

02.07.2026

fix: check OC_MCP_SERVERS in config instead of file existence

(golnet)

fix: check OC_MCP_SERVERS in config instead of file existence
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

02.07.2026

fix: load config before saveConfig in install() to prevent settings wipe

(golnet)

fix: load config before saveConfig in install() to prevent settings wipe
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

02.07.2026

fix: tab value override in run() prevents saving settings on first visit

(golnet)

fix: tab value override in run() prevents saving settings on first visit
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

01.07.2026

feat: add default music MCP server example on first install only

(golnet)

feat: add default music MCP server example on first install only
https://github.com/golnet1/majordomo-opencode/comm...

Обсуждение (0) (0)

 
(0)
 
Подписаться на обновления (0)
 

Идеи по развитию

Вы можете помочь в развитии проекта, сообщив об ошибках, поделившись своими идеями или проголосовав за уже добавленные. В случае добавления ошибок, обязательно указывайте детали окружения (ОС, версия ПО и т.п.), сообщения об ошибках без деталей будут игнорироваться.

Другие задачи пользователя

Дополнение DashBoard Pro
Дополнение Piper TTS
Модуль MCP XiaoZhi AI
Дополнение PHP Manager
Дополнение Котел Stout Plus