Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
fi
node --check web/app.js

# Приёмка панели: 26 шагов без ACC_DAP (37 с ним — но stdio-сервера в CI нет).
# Приёмка панели: 26 шагов без ACC_DAP (38 с ним — но stdio-сервера в CI нет).
# Ловит то, чего не видит `node --check`: маршруты, формы, темы, ключи, пустые
# состояния. Панель поднимается на чистом каталоге, без пароля, на loopback.
acceptance:
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ repository the project is built in.

## [Unreleased]

Nothing yet.
### Fixed

- The **Tools** column of a set's servers and of the all-servers page takes the
count from the catalog of a running set (`GET /api/sets/<id>/tools`) instead
of waiting for **Check** on every row; a probe still replaces it with a live
count, and a stopped set keeps `—`.

## [0.6.6]

Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@

## [Unreleased]

Новых изменений пока нет.
### Исправлено

- Колонка **Инструментов** в таблице серверов набора и на странице всех
серверов берёт число из каталога работающего набора
(`GET /api/sets/<id>/tools`), а не ждёт **Проверить** у каждой строки;
проверка по-прежнему заменяет его живым счётом, у остановленного набора
остаётся `—`.

## [0.6.6]

Expand Down
2 changes: 1 addition & 1 deletion docs/en/dev/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ skipped run cannot read as a passed gate.
## Panel acceptance

`scripts/acceptance/panel.cjs` walks the panel from an empty data directory and
checks 37 things a person would do by hand — the rail, themes, navigation, sets,
checks 38 things a person would do by hand — the rail, themes, navigation, sets,
servers, keys, tools, statistics, the log, variables, import. 11 of them attach
a stdio MCP server and therefore need `ACC_DAP`; without it those steps are
skipped with a line each and the rest still run. It needs Playwright, and the
Expand Down
16 changes: 10 additions & 6 deletions docs/en/panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CSP: no inline scripts or styles.
| tabs | **Overview**, **Servers**, **Keys**, **Tools**, **Calls** and **Logs** of the open set, at `#/set/<id>`, `#/set/<id>/servers`, `…/keys`, `…/tools`, `…/calls` and `…/logs`; an unknown tab opens **Overview**, a tab click adds a history entry, and the back and forward buttons walk through the tabs |
| KPIs | calls, error rate, p50 and p95 of the selected set over the last 7 days, under the tiles of the set **Overview** |
| servers of the set, on the **Servers** tab | name with a second line (daemon error, isolation, description), type, health, tool count, last request, **Check**, **Log**, **Tools**, **Edit** and the **×** that detaches the server from the set; under the table sit the registry picker and **add to set** |
| all servers page | the whole registry of the host: name with the daemon's reason on the second line, type, health, tool count from the last **Check**, the sets the server belongs to, and **Check**, **Authorize**, **Log**, **Edit** and the **×** that deletes it from the registry; **Add server** sits in the head |
| all servers page | the whole registry of the host: name with the daemon's reason on the second line, type, health, tool count from the set catalog or the last **Check**, the sets the server belongs to, and **Check**, **Authorize**, **Log**, **Edit** and the **×** that deletes it from the registry; **Add server** sits in the head |
| import and export | the **Import / Export** dialog: the whole registry or one set as JSON, with **Download JSON** and **Copy**; import from a JSON file or a pasted `mcpServers` object — the preview names the servers that will be added, sets found in the file are skipped with a note (sets are made in the panel), and `env` and `headers` go out and come in as written |
| calls table | time, server, tool, client, milliseconds, status; search box and **errors only**. Meta-tools (`list_servers`, `list_commands`, `describe_commands`) appear here too, as server `mcprig`; a failure shows its reason next to the status, the full text in a tooltip |
| statistics page | the period (today, 7 days, 30 days, archive), the server, tool and client filters and **reset**, totals and the series. The first answer arrives as soon as the sets are known, so a direct `#/stats/<period>` link is filled at once instead of waiting for the 15 s tick. The three filters are kept in the browser (`localStorage`, `mcprig.stats.*`) and survive a reload; the set of the view still follows the rail |
Expand All @@ -39,9 +39,12 @@ health answer is on its way the cell keeps a skeleton bar instead of guessing.
The badge of the all-servers page uses the same component and the same three
states; a server outside the open set stays **Not checked** until **Check**
probes it there, and a server of a stopped set says that the set is off.
The tool count of one server is not part of the health answer, so the **Tools**
column shows `—` until **Check** probes that server; the head of the set shows
the total for the whole set.
The tool count of one server is not part of the health answer. A server of a
running set takes it from that set's catalog (`GET /api/sets/<id>/tools`, the
descriptors `tools.lock.json` remembers), so the **Tools** column shows the
number as soon as the set has listed its tools; **Check** replaces it with a
live count of the same server. A server of a stopped set, and one no catalog
knows, keeps `—`; the head of the set shows the total for the whole set.

The browser title names what is open: `mcprig — Overview`, `mcprig — Sets` and
the like for other pages, `mcprig — set <name>` on a set, and with ` · <tab>`
Expand Down Expand Up @@ -149,8 +152,9 @@ key stops the set; revoking one of several leaves it running.

The **All servers** page lists the whole registry of the host, not the
composition of one set. A row carries the name with the daemon's reason of a
failure below it, the transport, the health badge, the tool count the last
**Check** found, the sets the server belongs to and the actions: **Check**
failure below it, the transport, the health badge, the tool count of the set
catalog or of the last **Check**, the sets the server belongs to and the
actions: **Check**
(`POST /api/servers/<name>/probe`), **Authorize** for a remote server that
answered `401`, **Log** of the open set, **Edit** and the **×** that deletes the
server from the registry — the dialog names the sets it leaves first. Deleting
Expand Down
2 changes: 1 addition & 1 deletion docs/ru/dev/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ E2E_BASE=http://127.0.0.1:9091 ./scripts/contract-e2e.sh
## Приёмка панели

`scripts/acceptance/panel.cjs` проходит панель с пустого каталога данных и
проверяет 37 вещей, которые человек делает руками: рейл, темы, навигацию,
проверяет 38 вещей, которые человек делает руками: рейл, темы, навигацию,
наборы, серверы, ключи, инструменты, статистику, журнал, переменные, импорт.
11 из них привязывают stdio MCP-сервер и потому требуют `ACC_DAP`; без него
эти шаги пропускаются со строкой в выводе, остальные выполняются. Нужен
Expand Down
16 changes: 10 additions & 6 deletions docs/ru/panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
| вкладки | **Обзор**, **Серверы**, **Ключи**, **Инструменты**, **Вызовы** и **Журнал** открытого набора — по адресам `#/set/<id>`, `#/set/<id>/servers`, `…/keys`, `…/tools`, `…/calls` и `…/logs`; неизвестная вкладка открывает **Обзор**, клик по вкладке добавляет запись в историю, а кнопки «назад» и «вперёд» ходят по вкладкам |
| KPI | вызовы, доля ошибок, p50 и p95 выбранного набора за последние 7 дней — под плитками **Обзора** набора |
| серверы набора, вкладка **Серверы** | имя со второй строкой (ошибка демона, изоляция, описание), тип, здоровье, число инструментов, последний вызов, **Проверить**, **Лог**, **Инструменты**, **Изменить** и **×**, которая убирает сервер из набора; под таблицей — выбор сервера из реестра и **добавить в набор** |
| страница всех серверов | весь реестр хоста: имя с причиной от демона второй строкой, тип, здоровье, число инструментов из последней **проверки**, наборы, куда сервер входит, и действия **Проверить**, **Авторизовать**, **Лог**, **Изменить** и **×**, которая удаляет сервер из реестра; **Добавить сервер** — в шапке блока |
| страница всех серверов | весь реестр хоста: имя с причиной от демона второй строкой, тип, здоровье, число инструментов из каталога набора или последней **проверки**, наборы, куда сервер входит, и действия **Проверить**, **Авторизовать**, **Лог**, **Изменить** и **×**, которая удаляет сервер из реестра; **Добавить сервер** — в шапке блока |
| импорт и экспорт | диалог **Импорт / Экспорт**: весь реестр или один набор как JSON, с **Скачать JSON** и **Копировать**; импорт из файла или вставленного объекта `mcpServers` — предпросмотр называет серверы, которые добавятся, наборы из файла пропускаются с пояснением (наборы делают в панели), а `env` и `headers` уходят и приходят как записаны |
| таблица вызовов | время, сервер, инструмент, клиент, миллисекунды, статус; поиск и **только ошибки**. Сюда попадают и мета-инструменты (`list_servers`, `list_commands`, `describe_commands`) — с сервером `mcprig`; у провала рядом со статусом видна причина, полный текст — во всплывающей подсказке |
| страница статистики | период (сегодня, 7 дней, 30 дней, архив), фильтры по серверу, инструменту и клиенту и **сброс**, итоги и ряд. Первый ответ приходит, как только известны наборы, поэтому прямая ссылка `#/stats/<период>` заполняется сразу, а не ждёт пятнадцатисекундного тика. Три фильтра хранятся в браузере (`localStorage`, `mcprig.stats.*`) и переживают перезагрузку; набор вида по-прежнему следует за рельсом |
Expand All @@ -43,9 +43,13 @@
страницы всех серверов — тот же компонент и те же три состояния: сервер вне
открытого набора остаётся **Без проверки**, пока его не проверит **Проверить**
здесь, а сервер остановленного набора так и говорит, что набор выключен. Число
инструментов одного сервера в ответе о здоровье не приходит, поэтому в колонке
**Инструментов** стоит `—`, пока сервер не проверен кнопкой **Проверить**;
итог по всему набору показывает шапка набора.
инструментов одного сервера в ответе о здоровье не приходит. У сервера
работающего набора число берётся из каталога этого набора
(`GET /api/sets/<id>/tools` — дескрипторы, которые помнит `tools.lock.json`),
поэтому колонка **Инструментов** показывает число сразу, как набор перечислил
свои инструменты; **Проверить** заменяет его живым счётом того же сервера. У
сервера остановленного набора и у сервера, которого каталог не знает, остаётся
`—`; итог по всему набору показывает шапка набора.

Всё на странице приходит из API панели ниже плюс `GET /stats` работающих
наборов. В браузере не хранится ничего, кроме выбранной темы, её цветовой схемы
Expand Down Expand Up @@ -206,8 +210,8 @@ MCP видит у этого сервера только инструменты.

Страница **Все серверы** перечисляет весь реестр хоста, а не состав одного
набора. В строке — имя с причиной отказа от демона второй строкой, транспорт,
бейдж здоровья, число инструментов из последней **проверки**, наборы, куда
сервер входит, и действия: **Проверить**
бейдж здоровья, число инструментов из каталога набора или последней
**проверки**, наборы, куда сервер входит, и действия: **Проверить**
(`POST /api/servers/<name>/probe`), **Авторизовать** у удалённого сервера,
ответившего `401`, **Лог** открытого набора, **Изменить** и **×**, которая
удаляет сервер из реестра — диалог сначала называет наборы, которые он
Expand Down
23 changes: 22 additions & 1 deletion scripts/acceptance/panel.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Приёмка панели: 37 шагов от чистого каталога данных — рейл, темы, навигация,
// Приёмка панели: 38 шагов от чистого каталога данных — рейл, темы, навигация,
// наборы, серверы, ключи, инструменты, статистика, журнал, переменные, импорт.
//
// Запуск (нужен playwright; панель поднимается на чистом каталоге, без пароля):
Expand Down Expand Up @@ -418,6 +418,27 @@ page.on("pageerror", e => consoleErrors.push("pageerror@" + lastStep + ": " + (e
return `${rows} строк, одобрять нечего`;
});

await stepDap("W4 колонка tools берёт число из каталога набора без проверки", async () => {
// чистая страница: проба и каталог в памяти панели пустеют только с
// перезагрузкой документа, и число обязано появиться само, из каталога
await page.evaluate(() => { location.hash = "#/set/alpha/servers"; });
await page.reload();
const cell = await waitFor(async () => {
const t = (await page.textContent('#set-srv-body tr[data-name="dap"] td.num')).trim();
return t && t !== "—" ? t : null;
}, 20000);
if (!cell) throw new Error("колонка tools пуста до проверки");
// реестр хоста живёт тем же числом: сервер из работающего набора известен
await page.evaluate(() => { location.hash = "#/host"; });
await page.reload();
const reg = await waitFor(async () => {
const t = (await page.textContent('#servers tr[data-name="dap"] td.num')).trim();
return t && t !== "—" ? t : null;
}, 20000);
if (!reg) throw new Error("в реестре хоста tools пуст до проверки");
return `набор ${cell}, реестр ${reg}`;
});

await step("X1 выдача ключа с подписью", async () => {
await go("#/set/alpha/keys");
// Ждём по имени, а не по количеству: выдача ключа перезапускает набор,
Expand Down
Loading
Loading