revdeck 0.19.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/CONTRIBUTING.md +3 -2
- package/README.md +25 -0
- package/README.ru.md +24 -0
- package/dist/cli.js +266 -17
- package/dist/cli.js.map +4 -4
- package/dist/daemon.js +405 -55
- package/dist/daemon.js.map +4 -4
- package/dist/mcp.js +61 -14
- package/dist/mcp.js.map +3 -3
- package/dist/ui/assets/{index-BPQZSbvp.js → index-DNDtuzyY.js} +14 -14
- package/dist/ui/index.html +1 -1
- package/docs/architecture.md +15 -0
- package/docs/capabilities.md +4 -0
- package/docs/protocol.md +1 -0
- package/docs/ru/architecture.md +17 -0
- package/docs/ru/capabilities.md +3 -0
- package/docs/ru/protocol.md +1 -0
- package/package.json +2 -1
- package/skills/revdeck/en/Sources.md +7 -4
- package/skills/revdeck/ru/Sources.md +7 -3
package/dist/ui/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="icon" href="/icon-32.png" type="image/png" sizes="32x32" />
|
|
10
10
|
<link rel="apple-touch-icon" href="/icon-128.png" />
|
|
11
11
|
<title>revdeck</title>
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-DNDtuzyY.js"></script>
|
|
13
13
|
<link rel="stylesheet" crossorigin href="/assets/index-ahIeys_y.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
package/docs/architecture.md
CHANGED
|
@@ -63,6 +63,12 @@ agent (MCP/CLI) ──▶ revdeck daemon ──glab/gh──▶ GitLab/GitHub
|
|
|
63
63
|
`rules.get` path. The scenario is a client-side context option: it shapes the agent instructions but
|
|
64
64
|
is not stored in the review, the daemon or the database.
|
|
65
65
|
|
|
66
|
+
A local review (`reviews.openLocal`) bypasses the platform: the daemon runs `git diff base...HEAD`,
|
|
67
|
+
builds the same `Review`/`ReviewView`, but keeps the snapshot, findings and summary in memory — there
|
|
68
|
+
is no table for it. Threads, reactions, checks, approvals, version history and publishing are not
|
|
69
|
+
available; full file content and CODEOWNERS come from git. `revdeck report --local` renders markdown
|
|
70
|
+
from that same view, and `--ui` returns a read-only preview link in the UI.
|
|
71
|
+
|
|
66
72
|
## Data model
|
|
67
73
|
|
|
68
74
|
- `Project` — a repository: `key = platform:host/project` (normalized for comparison), display values,
|
|
@@ -74,6 +80,8 @@ is not stored in the review, the daemon or the database.
|
|
|
74
80
|
refers to the new file.
|
|
75
81
|
- `previews` — in-memory, TTL-limited snapshots for read-only MR/PR viewing; they reuse provider
|
|
76
82
|
`info`/`diff`/`threads` and never enter SQLite or the review list.
|
|
83
|
+
- `locals` — in-memory local branch reviews: a stable `local-…` id, findings, decisions and summary;
|
|
84
|
+
the snapshot survives re-runs and refreshes but not a daemon restart.
|
|
77
85
|
- `review_events` — append-only quality log (actor, type, finding/thread/rule, payload); metrics read
|
|
78
86
|
it instead of relying on the current snapshot.
|
|
79
87
|
- Review evidence (`revdeck evidence`) is derived on request from the snapshot, the rule excerpts and
|
|
@@ -172,6 +180,13 @@ documents declared in `context.sources` of each repository (`context.maxBytes` c
|
|
|
172
180
|
- Idle browser connections stay open for 65 seconds, and a request that fails on the network is retried
|
|
173
181
|
or probed against `/api/health` before the UI treats the daemon as lost: a keep-alive socket the
|
|
174
182
|
server closed must not look like an outage.
|
|
183
|
+
- UI effects are keyed by the review id and never read the loading flag they write: an effect that
|
|
184
|
+
reads its own `$state` runs again after every update and turns one fetch into an endless loop, so
|
|
185
|
+
stale responses are guarded by request counters instead. Draft restore keeps using `untrack`.
|
|
186
|
+
- The API client keeps a per-path request rate and warns once in the console when one path exceeds
|
|
187
|
+
30 calls per second; polling, retries and reconnect backoff stay far below that.
|
|
188
|
+
- `npm run audit:effects` statically checks every `$effect` for reading state it writes, and CI fails
|
|
189
|
+
on a finding that is not in the reviewed list of converging patterns.
|
|
175
190
|
- Threads and findings use a measured, page-windowed virtual list in the UI; only visible pages are in
|
|
176
191
|
the DOM, while focus, editors and deep links stay pinned.
|
|
177
192
|
- Snippets for threads and findings are computed on the server and size-limited.
|
package/docs/capabilities.md
CHANGED
|
@@ -116,6 +116,10 @@ The core guarantees:
|
|
|
116
116
|
- Change groups: explicit or derived by file kind/module.
|
|
117
117
|
- Project checks: argv, path scoping; the agent only plans, a human runs them in the UI or host CLI with the full command shown. Every executed run is stored with the working-copy commit it ran on, exit code and redacted output, and the latest run per check reaches the agent context as evidence; spawn failures and skipped runs are not stored.
|
|
118
118
|
- Read-only reviews: drafts, findings, comments, reactions, checks and publishing are disabled.
|
|
119
|
+
- Local branch review without an MR: `revdeck review --local` builds a `base...HEAD` diff, serves the
|
|
120
|
+
same context and rules, and keeps findings/summary in daemon memory; it has no threads, reactions,
|
|
121
|
+
checks, approvals, version history or publishing, and `revdeck report --local` renders a markdown
|
|
122
|
+
report.
|
|
119
123
|
- Export/import of the legacy file format.
|
|
120
124
|
|
|
121
125
|
## Agent interfaces
|
package/docs/protocol.md
CHANGED
|
@@ -69,6 +69,7 @@ bridge is authorized by transport capability: `agent` may read and draft, but hu
|
|
|
69
69
|
| `features.context` | `feature`, `maxBytes?` | combined brief + review context |
|
|
70
70
|
| `reviews.remoteList` | `root`, `scope`, `limit` | open reviews from the platform |
|
|
71
71
|
| `reviews.open` | `root`, `input`/`platform`/`project`/`host`/`branch` | review snapshot |
|
|
72
|
+
| `reviews.openLocal` | `root`, `base?` | branch-against-base snapshot; in daemon memory, not stored in the database |
|
|
72
73
|
| `reviews.refresh` | `review` | refreshed snapshot |
|
|
73
74
|
| `reviews.remove` | `review` | remove the review from the local list (not the platform) |
|
|
74
75
|
| `reviews.get` | `review`, `refresh?` | snapshot (without the full diff) |
|
package/docs/ru/architecture.md
CHANGED
|
@@ -63,6 +63,12 @@ agent (MCP/CLI) ──▶ revdeck daemon ──glab/gh──▶ GitLab/GitHub
|
|
|
63
63
|
`rules.get`. Сценарий — клиентская опция контекста: она задаёт инструкции агенту, но не сохраняется в
|
|
64
64
|
ревью, демоне или базе.
|
|
65
65
|
|
|
66
|
+
Локальное ревью (`reviews.openLocal`) идёт мимо платформы: демон берёт `git diff base...HEAD`, строит
|
|
67
|
+
тот же `Review`/`ReviewView`, но держит снимок, замечания и выжимку в памяти — отдельной таблицы нет.
|
|
68
|
+
Для него недоступны треды, реакции, checks, approvals, история версий и публикация; полные файлы и
|
|
69
|
+
CODEOWNERS читаются из git. `revdeck report --local` рендерит markdown из того же view, а `--ui`
|
|
70
|
+
отдаёт ссылку на read-only превью в интерфейсе.
|
|
71
|
+
|
|
66
72
|
## Модель данных
|
|
67
73
|
|
|
68
74
|
- `Project` — репозиторий: `key = platform:host/project` (нормализован для сравнения), отображаемые
|
|
@@ -74,6 +80,8 @@ agent (MCP/CLI) ──▶ revdeck daemon ──glab/gh──▶ GitLab/GitHub
|
|
|
74
80
|
новому файлу.
|
|
75
81
|
- `previews` — in-memory снимки с TTL для просмотра MR/PR; используют `info`/`diff`/`threads`
|
|
76
82
|
провайдера и не попадают в SQLite или список ревью.
|
|
83
|
+
- `locals` — in-memory локальные ревью ветки против базы: стабильный `local-…` id, findings, решения и
|
|
84
|
+
выжимка; снимок переживает повторный запуск и refresh, но исчезает при рестарте демона.
|
|
77
85
|
- `review_events` — append-only журнал качества (актор, тип, finding/thread/rule, payload); метрики
|
|
78
86
|
читают его, а не только текущий снимок.
|
|
79
87
|
- Паспорт ревью (`revdeck evidence`) собирается по запросу из снимка, выдержек правил и журнала
|
|
@@ -175,6 +183,15 @@ OpenAPI разбирается на операции и схемы, а конт
|
|
|
175
183
|
- Простаивающие соединения браузера живут 65 секунд, а запрос, упавший на сетевом уровне,
|
|
176
184
|
повторяется или проверяется через `/api/health` раньше, чем UI покажет потерю связи: закрытый
|
|
177
185
|
сервером keep-alive-сокет не должен выглядеть как недоступный демон.
|
|
186
|
+
- Эффекты UI привязаны к id ревью и не читают флаг загрузки, который сами же пишут: эффект,
|
|
187
|
+
читающий собственный `$state`, перезапускается после каждого обновления и превращает один запрос
|
|
188
|
+
в бесконечный цикл, поэтому устаревшие ответы отсекаются счётчиками запросов. Восстановление
|
|
189
|
+
черновиков по-прежнему идёт через `untrack`.
|
|
190
|
+
- Клиент API считает частоту обращений по каждому пути и один раз предупреждает в консоли, если
|
|
191
|
+
путь превышает 30 обращений в секунду; поллинг, повторы и пауза переподключения держатся заметно
|
|
192
|
+
ниже.
|
|
193
|
+
- `npm run audit:effects` статически проверяет каждый `$effect` на чтение состояния, которое он сам
|
|
194
|
+
пишет; CI падает на находке, которой нет в разобранном списке сходящихся шаблонов.
|
|
178
195
|
- Треды и замечания используют измеряемый page-windowed virtual list в UI: в DOM только видимые
|
|
179
196
|
страницы, а фокус, редакторы и deep-link'и остаются рабочими.
|
|
180
197
|
- Сниппеты для тредов и замечаний считаются на сервере и ограничены по размеру.
|
package/docs/ru/capabilities.md
CHANGED
|
@@ -116,6 +116,9 @@ agent (MCP/CLI) ──unix socket──▶ revdeck daemon ──glab/gh──▶
|
|
|
116
116
|
- Группы изменений: явные или автоматические по типу файла/модулю.
|
|
117
117
|
- Проверки проекта: argv, привязка к путям; агент только планирует, человек запускает в UI или CLI на хосте с показом полной команды. Каждый выполненный прогон сохраняется с коммитом рабочей копии, на котором он выполнялся, кодом выхода и очищенным выводом, а последний прогон по каждой проверке попадает в контекст агента как доказательство; сбои запуска и `skipped` не сохраняются.
|
|
118
118
|
- Read-only ревью: черновики, замечания, комментарии, реакции, проверки и публикация отключены.
|
|
119
|
+
- Локальное ревью ветки без MR: `revdeck review --local` строит diff `base...HEAD`, отдаёт тот же
|
|
120
|
+
контекст и правила, держит findings и выжимку в памяти демона; тредов, реакций, checks, approvals,
|
|
121
|
+
истории версий и публикации у него нет, а `revdeck report --local` собирает markdown-отчёт.
|
|
119
122
|
- Экспорт/импорт старого файлового формата.
|
|
120
123
|
|
|
121
124
|
## Интерфейсы агента
|
package/docs/ru/protocol.md
CHANGED
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
| `features.context` | `feature`, `maxBytes?` | общий контекст: бриф + ревью |
|
|
70
70
|
| `reviews.remoteList` | `root`, `scope`, `limit` | открытые ревью с платформы |
|
|
71
71
|
| `reviews.open` | `root`, `input`/`platform`/`project`/`host`/`branch` | снимок ревью |
|
|
72
|
+
| `reviews.openLocal` | `root`, `base?` | снимок ветки против базы; живёт в памяти демона, в базе не сохраняется |
|
|
72
73
|
| `reviews.refresh` | `review` | обновлённый снимок |
|
|
73
74
|
| `reviews.remove` | `review` | удалить ревью из локального списка (не с платформы) |
|
|
74
75
|
| `reviews.get` | `review`, `refresh?` | снимок (без полного diff) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "revdeck",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Agent-first code review for GitLab and GitHub: local daemon, CLI, MCP server and a triage UI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"prepublishOnly": "npm run typecheck && npm test",
|
|
30
30
|
"typecheck": "npm run typecheck:server && npm run typecheck:ui",
|
|
31
31
|
"typecheck:server": "node ./node_modules/typescript-7/bin/tsc --noEmit",
|
|
32
|
+
"audit:effects": "tsx scripts/audit-effects.ts",
|
|
32
33
|
"typecheck:ui": "svelte-check --tsconfig ui/tsconfig.json --threshold error",
|
|
33
34
|
"test": "vitest run",
|
|
34
35
|
"test:watch": "vitest",
|
|
@@ -34,10 +34,13 @@ candidate (`Rules.md`).
|
|
|
34
34
|
|
|
35
35
|
## Local branch without a platform
|
|
36
36
|
|
|
37
|
-
1. `
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
1. `revdeck review --local [--base <ref>]` — context for the current branch against its base:
|
|
38
|
+
`--base` → `provider.base` → `origin/HEAD` → `develop`/`main`/`master`. The comparison is
|
|
39
|
+
three-dot (from the merge-base), and uncommitted changes are not part of the diff. In MCP use
|
|
40
|
+
`revdeck_local`, then the usual `revdeck_context` with the id from the response.
|
|
41
|
+
2. If the working copy has uncommitted changes, say so and do not claim there are no findings.
|
|
42
|
+
3. There are no threads, checks or merge status: this is a local diff. Write findings and the summary
|
|
43
|
+
under the branch id; the human builds the report: `revdeck report --review <id>`, `--ui` for the UI.
|
|
41
44
|
|
|
42
45
|
## Environment constraints
|
|
43
46
|
|
|
@@ -34,9 +34,13 @@
|
|
|
34
34
|
|
|
35
35
|
## Локальная ветка без платформы
|
|
36
36
|
|
|
37
|
-
1. `
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
1. `revdeck review --local [--base <ветка>]` — контекст текущей ветки против базы: `--base` →
|
|
38
|
+
`provider.base` → `origin/HEAD` → `develop`/`main`/`master`. Сравнение трёхточечное (от merge-base),
|
|
39
|
+
незакоммиченные изменения в diff не входят. MCP: `revdeck_local`, дальше обычный `revdeck_context`
|
|
40
|
+
по id из ответа.
|
|
41
|
+
2. Если в рабочей копии есть незакоммиченное, сказать об этом и не выдавать «замечаний нет».
|
|
42
|
+
3. Тредов, checks и merge-статуса нет: это локальный diff. Замечания и выжимку записать по id ветки;
|
|
43
|
+
отчёт собирает человек: `revdeck report --review <id>` и `--ui` для интерфейса.
|
|
40
44
|
|
|
41
45
|
## Ограничения среды
|
|
42
46
|
|