revdeck 0.3.2 → 0.4.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 +27 -0
- package/CONTRIBUTING.md +3 -2
- package/README.md +15 -4
- package/README.ru.md +15 -4
- package/dist/cli.js +71 -19
- package/dist/cli.js.map +3 -3
- package/dist/daemon.js +185 -18
- package/dist/daemon.js.map +3 -3
- package/dist/mcp.js +39 -2
- package/dist/mcp.js.map +2 -2
- package/dist/ui/assets/index-B2o_eogg.js +10 -0
- package/dist/ui/index.html +1 -1
- package/docs/integrations.md +12 -5
- package/docs/protocol.md +6 -0
- package/docs/ru/integrations.md +12 -4
- package/docs/ru/protocol.md +6 -0
- package/package.json +1 -1
- package/skills/revdeck/en/SKILL.md +4 -0
- package/skills/revdeck/ru/SKILL.md +4 -0
- package/dist/ui/assets/index-DinUxV1o.js +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,33 @@ All notable changes to this project are documented here. The format is based on
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.4.0] - 2026-11-12
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Private **Note for the agent** on every finding; it is included in the CLI/MCP context and never
|
|
14
|
+
published.
|
|
15
|
+
- Reactions on the MR/PR itself (description) in the UI, HTTP API and RPC, in addition to thread-note
|
|
16
|
+
reactions. The current GitLab/GitHub user is stored with the review.
|
|
17
|
+
- Edit and delete own platform comments from the thread card; local line comments can also be edited and
|
|
18
|
+
deleted before publishing.
|
|
19
|
+
- Devcontainer MCP: `revdeck devcontainer --write` adds the `REVDECK_*` env to the `revdeck` server in
|
|
20
|
+
`.mcp.json` / `.cursor/mcp.json`, and a client in a devcontainer falls back to HTTP via the mounted
|
|
21
|
+
`daemon.json` when the Unix socket is unavailable.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- The sidebar is ordered by the MR/PR update time, not by local sync time, so opening a review no longer
|
|
26
|
+
reorders the list. Switching reviews keeps the active tab.
|
|
27
|
+
|
|
28
|
+
## [0.3.3] - 2026-11-12
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- `revdeck init` installs only `.claude/skills/revdeck/SKILL.md` — a symlink to
|
|
33
|
+
`.agents/skills/revdeck/SKILL.md`. The procedure files stay in `.agents`; old copied skill
|
|
34
|
+
directories are replaced, and Windows gets a short shim instead of a directory copy.
|
|
35
|
+
|
|
9
36
|
## [0.3.2] - 2026-11-12
|
|
10
37
|
|
|
11
38
|
### Fixed
|
package/CONTRIBUTING.md
CHANGED
|
@@ -57,8 +57,9 @@ Rules of thumb:
|
|
|
57
57
|
## Adding a harness adapter
|
|
58
58
|
|
|
59
59
|
Add a `SPECS` entry in `src/cli/init.ts` with the MCP config path, command file or `linkSkill` flag, then
|
|
60
|
-
document it in `docs/integrations.md`. The canonical skill is always `.agents/skills/revdeck`;
|
|
61
|
-
|
|
60
|
+
document it in `docs/integrations.md`. The canonical skill is always `.agents/skills/revdeck`; Claude
|
|
61
|
+
gets only a `SKILL.md` symlink, and other adapters must not copy the procedure files. `init` must never
|
|
62
|
+
overwrite files it does not own.
|
|
62
63
|
|
|
63
64
|
## Translations
|
|
64
65
|
|
package/README.md
CHANGED
|
@@ -149,6 +149,12 @@ Comment editors have GitLab/GitHub-style **Write / Preview** tabs and a Markdown
|
|
|
149
149
|
videos from the platform host (including GitLab `/uploads/...` links and `{width=... height=...}`)
|
|
150
150
|
render in the preview and in thread comments; external images are shown as links and are never loaded.
|
|
151
151
|
|
|
152
|
+
## Notes for the agent
|
|
153
|
+
|
|
154
|
+
Every finding has a private **Note for the agent** field, and every thread has the same note next to the
|
|
155
|
+
reply. The text is included in `revdeck_context` / MCP but never published to GitLab or GitHub. Findings
|
|
156
|
+
also keep their decision note separately.
|
|
157
|
+
|
|
152
158
|
## Devcontainer
|
|
153
159
|
|
|
154
160
|
The daemon, `glab` and `gh` stay on the host. From the repository root:
|
|
@@ -168,8 +174,13 @@ foreign keys in an existing JSONC file are preserved.
|
|
|
168
174
|
The daemon creates the bridge socket on startup, so on the host run `revdeck daemon restart`, then
|
|
169
175
|
rebuild the container. Inside the container revdeck never starts a local daemon, so `gh`/`glab` are
|
|
170
176
|
never invoked there; if the host socket is missing it fails with a clear `DEVCONTAINER` error.
|
|
171
|
-
`revdeck doctor` is aware of this mode.
|
|
172
|
-
|
|
177
|
+
`revdeck doctor` is aware of this mode.
|
|
178
|
+
|
|
179
|
+
If a Unix socket cannot be mounted (for example Docker Desktop on macOS), start the host daemon with
|
|
180
|
+
`revdeck daemon start --host 0.0.0.0`. The container reads `daemon.json` from the mounted state and
|
|
181
|
+
falls back to HTTP with the same session token; `.mcp.json` / `.cursor/mcp.json` get the required
|
|
182
|
+
`REVDECK_*` env from `revdeck devcontainer --write`. Binding the daemon to `0.0.0.0` exposes its HTTP
|
|
183
|
+
port to the network, so use it only on a trusted network.
|
|
173
184
|
|
|
174
185
|
## MCP
|
|
175
186
|
|
|
@@ -280,8 +291,8 @@ Provider tests use recorded CLI responses and need no network. See [CONTRIBUTING
|
|
|
280
291
|
- Project checks are planned by the agent; running them requires `revdeck checks --run --yes`.
|
|
281
292
|
- The UI opens a review from the **Open review** dialog; the working-copy root is required so the daemon
|
|
282
293
|
can read `.revdeck.yml`.
|
|
283
|
-
- Thread resolution is in the thread card; reactions are available on thread notes
|
|
284
|
-
|
|
294
|
+
- Thread resolution is in the thread card; reactions are available on thread notes and on the MR/PR
|
|
295
|
+
description. Own platform comments can be edited or deleted from the thread card.
|
|
285
296
|
- GitHub has no public attachment API: the Attach button is disabled there; uploads work in GitLab.
|
|
286
297
|
- Auto-start is supported on Linux and macOS; on Windows run the daemon manually.
|
|
287
298
|
|
package/README.ru.md
CHANGED
|
@@ -135,6 +135,12 @@ API загрузки вложений, поэтому кнопка там отк
|
|
|
135
135
|
отображаются в предпросмотре и в комментариях тредов; внешние картинки показываются ссылкой и не
|
|
136
136
|
загружаются.
|
|
137
137
|
|
|
138
|
+
## Заметки агенту
|
|
139
|
+
|
|
140
|
+
У каждого замечания есть приватное поле **Заметка агенту**, у каждого треда — такая же заметка рядом с
|
|
141
|
+
ответом. Текст попадает в `revdeck_context` / MCP, но никогда не публикуется в GitLab или GitHub.
|
|
142
|
+
Решение по замечанию хранится отдельно.
|
|
143
|
+
|
|
138
144
|
## Devcontainer
|
|
139
145
|
|
|
140
146
|
Демон, `glab` и `gh` остаются на хосте. Из корня репозитория:
|
|
@@ -154,8 +160,13 @@ revdeck devcontainer --write # добавить их в .devcontainer/devcontai
|
|
|
154
160
|
Демон создаёт сокет моста при старте: на хосте выполните `revdeck daemon restart`, затем пересоберите
|
|
155
161
|
контейнер. В контейнере revdeck никогда не запускает свой демон, поэтому `gh`/`glab` там не
|
|
156
162
|
вызываются; если сокет хоста недоступен, команда падает с понятной ошибкой `DEVCONTAINER`.
|
|
157
|
-
`revdeck doctor` знает об этом режиме.
|
|
158
|
-
|
|
163
|
+
`revdeck doctor` знает об этом режиме.
|
|
164
|
+
|
|
165
|
+
Если Unix-сокет не монтируется (например, Docker Desktop на macOS), запустите демон на хосте с
|
|
166
|
+
`revdeck daemon start --host 0.0.0.0`. Клиент в контейнере прочитает `daemon.json` из смонтированного
|
|
167
|
+
state и переключится на HTTP с тем же токеном сессии; `revdeck devcontainer --write` добавляет нужные
|
|
168
|
+
`REVDECK_*` в `.mcp.json` / `.cursor/mcp.json`. Привязка к `0.0.0.0` открывает HTTP-порт в сеть —
|
|
169
|
+
используйте это только в доверенной сети.
|
|
159
170
|
|
|
160
171
|
## MCP
|
|
161
172
|
|
|
@@ -266,8 +277,8 @@ npm run build # dist/cli.js, dist/daemon.js, dist/mcp.js, dist/ui
|
|
|
266
277
|
- Проверки проекта агент только планирует; запуск — `revdeck checks --run --yes`.
|
|
267
278
|
- UI открывает ревью через диалог **Открыть ревью**; нужен корень рабочей копии, чтобы демон
|
|
268
279
|
прочитал `.revdeck.yml`.
|
|
269
|
-
- Резолв тредов есть в карточке треда; реакции доступны на комментариях тредов
|
|
270
|
-
|
|
280
|
+
- Резолв тредов есть в карточке треда; реакции доступны на комментариях тредов и на описании MR/PR.
|
|
281
|
+
Свои комментарии платформы можно редактировать и удалять из карточки треда.
|
|
271
282
|
- У GitHub нет публичного API загрузки вложений: кнопка «Прикрепить» там отключена; загрузка работает
|
|
272
283
|
в GitLab.
|
|
273
284
|
- Поддержаны Linux и macOS для автозапуска; Windows — запуск вручную.
|
package/dist/cli.js
CHANGED
|
@@ -168,7 +168,7 @@ var VERSION;
|
|
|
168
168
|
var init_version = __esm({
|
|
169
169
|
"src/version.ts"() {
|
|
170
170
|
"use strict";
|
|
171
|
-
VERSION = "0.
|
|
171
|
+
VERSION = "0.4.0";
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
174
|
|
|
@@ -217,6 +217,12 @@ function devcontainerHint() {
|
|
|
217
217
|
"gh/glab \u0434\u043E\u043B\u0436\u043D\u044B \u043E\u0441\u0442\u0430\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 \u0445\u043E\u0441\u0442\u0435: \u0432\u043D\u0443\u0442\u0440\u0438 \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u0430 \u0438\u0445 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u0442\u044C \u043D\u0435 \u043D\u0443\u0436\u043D\u043E"
|
|
218
218
|
].join("; ");
|
|
219
219
|
}
|
|
220
|
+
async function devcontainerHttpClient() {
|
|
221
|
+
const info = await daemonInfo();
|
|
222
|
+
if (!info?.port || !info.token) return null;
|
|
223
|
+
const host = process.env.REVDECK_UI_HOST ?? "host.docker.internal";
|
|
224
|
+
return new HttpClient(`http://${host}:${info.port}`, info.token);
|
|
225
|
+
}
|
|
220
226
|
async function ensureDaemon(options = {}) {
|
|
221
227
|
const url = process.env.REVDECK_URL;
|
|
222
228
|
if (url) {
|
|
@@ -228,6 +234,19 @@ async function ensureDaemon(options = {}) {
|
|
|
228
234
|
return { client: await connectSocket(), started: false };
|
|
229
235
|
} catch (error) {
|
|
230
236
|
if (isDevContainer()) {
|
|
237
|
+
const http = await devcontainerHttpClient();
|
|
238
|
+
if (http) {
|
|
239
|
+
try {
|
|
240
|
+
await http.request("ping");
|
|
241
|
+
return { client: http, started: false };
|
|
242
|
+
} catch (httpError) {
|
|
243
|
+
throw new RpcError(
|
|
244
|
+
`devcontainer HTTP: ${httpError.message}`,
|
|
245
|
+
"DEVCONTAINER",
|
|
246
|
+
"\u043D\u0430 \u0445\u043E\u0441\u0442\u0435: revdeck daemon start --host 0.0.0.0; \u043F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 REVDECK_UI_HOST \u0438 mounts"
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
231
250
|
throw new RpcError(`devcontainer: ${devcontainerHint()}`, "DEVCONTAINER", "revdeck devcontainer --write \u0438 \u043F\u0435\u0440\u0435\u0441\u043E\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440");
|
|
232
251
|
}
|
|
233
252
|
if (options.autoStart === false) throw error;
|
|
@@ -279,7 +298,7 @@ function uiBaseUrl(info) {
|
|
|
279
298
|
}
|
|
280
299
|
async function daemonBinaries() {
|
|
281
300
|
try {
|
|
282
|
-
const client2 = await
|
|
301
|
+
const { client: client2 } = await ensureDaemon({ autoStart: false });
|
|
283
302
|
const ping = await client2.request("ping");
|
|
284
303
|
client2.close();
|
|
285
304
|
return ping.binaries ?? null;
|
|
@@ -289,7 +308,7 @@ async function daemonBinaries() {
|
|
|
289
308
|
}
|
|
290
309
|
async function isDaemonRunning() {
|
|
291
310
|
try {
|
|
292
|
-
const client2 = await
|
|
311
|
+
const { client: client2 } = await ensureDaemon({ autoStart: false });
|
|
293
312
|
await client2.request("ping");
|
|
294
313
|
client2.close();
|
|
295
314
|
return true;
|
|
@@ -528,6 +547,7 @@ function renderContext(review, rules2, options = {}) {
|
|
|
528
547
|
for (const finding of review.findings) {
|
|
529
548
|
push(`- \`${finding.id}\` \xB7 ${finding.level} \xB7 ${finding.file}:${finding.line ?? "-"} \xB7 ${finding.status} \xB7 ${truncate(finding.title, 300)}`);
|
|
530
549
|
if (finding.body) push(` ${truncate(finding.body, 500)}`);
|
|
550
|
+
if (finding.agentNote) push(` \u2192 ${t("\u0430\u0433\u0435\u043D\u0442\u0443", "to agent")}: ${truncate(finding.agentNote, 500)}`);
|
|
531
551
|
}
|
|
532
552
|
push("");
|
|
533
553
|
if (review.notes.length) {
|
|
@@ -893,7 +913,8 @@ Next: revdeck_context(review="${result.review.id}").`, { reviewId: result.review
|
|
|
893
913
|
endLine: z2.number().int().positive().nullable().optional(),
|
|
894
914
|
title: z2.string().min(1),
|
|
895
915
|
body: z2.string(),
|
|
896
|
-
comment: z2.string().optional().describe("Ready-to-post comment text; defaults to body")
|
|
916
|
+
comment: z2.string().optional().describe("Ready-to-post comment text; defaults to body"),
|
|
917
|
+
agentNote: z2.string().optional().describe("Private note for the agent; never published")
|
|
897
918
|
})
|
|
898
919
|
).describe("The complete findings list, not only new ones")
|
|
899
920
|
}
|
|
@@ -1654,7 +1675,7 @@ init_format();
|
|
|
1654
1675
|
// src/cli/init.ts
|
|
1655
1676
|
init_paths();
|
|
1656
1677
|
import { existsSync as existsSync5 } from "node:fs";
|
|
1657
|
-
import { appendFile, cp, lstat as lstat2, mkdir as mkdir2, readdir, readFile as readFile3,
|
|
1678
|
+
import { appendFile, cp, lstat as lstat2, mkdir as mkdir2, readdir, readFile as readFile3, rm, symlink, writeFile } from "node:fs/promises";
|
|
1658
1679
|
import path6 from "node:path";
|
|
1659
1680
|
init_redact();
|
|
1660
1681
|
init_locale();
|
|
@@ -1776,7 +1797,7 @@ async function installAdapter(root, adapter, mcp, locale2, canonicalSkill) {
|
|
|
1776
1797
|
writers.err(`! ${tr("\u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0439 \u0430\u0434\u0430\u043F\u0442\u0435\u0440", "unknown adapter")}: ${adapter} (${Object.keys(SPECS).join(", ")})`);
|
|
1777
1798
|
return;
|
|
1778
1799
|
}
|
|
1779
|
-
if (spec.linkSkill && canonicalSkill) await linkSkill(root, canonicalSkill);
|
|
1800
|
+
if (spec.linkSkill && canonicalSkill) await linkSkill(root, canonicalSkill, locale2);
|
|
1780
1801
|
if (spec.mcp) await mergeMcpJson(path6.join(root, spec.mcp), root, mcp);
|
|
1781
1802
|
for (const file of spec.files ?? []) {
|
|
1782
1803
|
const target = path6.join(root, file.path);
|
|
@@ -1821,32 +1842,42 @@ async function copySkill(source, target) {
|
|
|
1821
1842
|
await cp(path6.join(source, entry), file, { force: true });
|
|
1822
1843
|
}
|
|
1823
1844
|
}
|
|
1824
|
-
async function linkSkill(root, canonicalSkill) {
|
|
1845
|
+
async function linkSkill(root, canonicalSkill, locale2) {
|
|
1825
1846
|
const target = path6.join(root, ".claude", "skills", "revdeck");
|
|
1826
|
-
const
|
|
1847
|
+
const source = path6.join(canonicalSkill, "SKILL.md");
|
|
1848
|
+
const skillTarget = path6.join(target, "SKILL.md");
|
|
1827
1849
|
await mkdir2(path6.dirname(target), { recursive: true });
|
|
1828
1850
|
const existing = await lstat2(target).catch(() => null);
|
|
1829
1851
|
if (existing) {
|
|
1830
1852
|
if (existing.isSymbolicLink()) {
|
|
1831
|
-
const current2 = await readlink(target).catch(() => "");
|
|
1832
|
-
if (current2 === relative) {
|
|
1833
|
-
writers.out(`\u2714 ${tr("\u0441\u043A\u0438\u043B\u043B", "skill")}: .claude/skills/revdeck -> ${CANONICAL_SKILL}`);
|
|
1834
|
-
return;
|
|
1835
|
-
}
|
|
1836
1853
|
await rm(target, { force: true });
|
|
1837
1854
|
} else if (existing.isDirectory() && await isManagedSkillDir(target)) {
|
|
1838
1855
|
await rm(target, { recursive: true, force: true });
|
|
1839
1856
|
} else {
|
|
1840
|
-
writers.out(`! .claude/skills/revdeck ${tr("\u0443\u0436\u0435 \u0435\u0441\u0442\u044C: \u043D\u0435 \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0438\u0441\u044B\u0432\u0430\u044E", "already exists: not overwriting")}`);
|
|
1857
|
+
writers.out(`! .claude/skills/revdeck ${tr("\u0443\u0436\u0435 \u0435\u0441\u0442\u044C \u0438 \u043D\u0435 \u043F\u043E\u0445\u043E\u0436 \u043D\u0430 revdeck: \u043D\u0435 \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0438\u0441\u044B\u0432\u0430\u044E", "already exists and does not look like revdeck: not overwriting")}`);
|
|
1841
1858
|
return;
|
|
1842
1859
|
}
|
|
1843
1860
|
}
|
|
1861
|
+
await mkdir2(target, { recursive: true });
|
|
1844
1862
|
if (process.platform === "win32") {
|
|
1845
|
-
|
|
1863
|
+
const shim = locale2 === "ru" ? `---
|
|
1864
|
+
name: revdeck
|
|
1865
|
+
description: "\u041A\u0430\u043D\u043E\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0441\u043A\u0438\u043B\u043B revdeck"
|
|
1866
|
+
---
|
|
1867
|
+
|
|
1868
|
+
\u042D\u0442\u043E\u0442 \u0444\u0430\u0439\u043B \u2014 shim. \u041F\u043E\u043B\u043D\u0430\u044F \u043F\u0440\u043E\u0446\u0435\u0434\u0443\u0440\u0430: \`.agents/skills/revdeck/SKILL.md\`; \u0432\u0441\u043F\u043E\u043C\u043E\u0433\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0444\u0430\u0439\u043B\u044B \u2014 \u0432 \`.agents/skills/revdeck/\`.
|
|
1869
|
+
` : `---
|
|
1870
|
+
name: revdeck
|
|
1871
|
+
description: "Canonical revdeck skill"
|
|
1872
|
+
---
|
|
1873
|
+
|
|
1874
|
+
This file is a shim. The full procedure is \`.agents/skills/revdeck/SKILL.md\`; supporting files are in \`.agents/skills/revdeck/\`.
|
|
1875
|
+
`;
|
|
1876
|
+
await writeFile(skillTarget, shim);
|
|
1846
1877
|
} else {
|
|
1847
|
-
await symlink(relative,
|
|
1878
|
+
await symlink(path6.relative(target, source), skillTarget, "file");
|
|
1848
1879
|
}
|
|
1849
|
-
writers.out(`\u2714 ${tr("\u0441\u043A\u0438\u043B\u043B", "skill")}: .claude/skills/revdeck -> ${CANONICAL_SKILL}`);
|
|
1880
|
+
writers.out(`\u2714 ${tr("\u0441\u043A\u0438\u043B\u043B", "skill")}: .claude/skills/revdeck/SKILL.md -> ${CANONICAL_SKILL}/SKILL.md`);
|
|
1850
1881
|
}
|
|
1851
1882
|
async function isManagedSkillDir(dir) {
|
|
1852
1883
|
const skill = path6.join(dir, "SKILL.md");
|
|
@@ -1875,7 +1906,9 @@ async function mergeMcpJson(file, root, mcp) {
|
|
|
1875
1906
|
}
|
|
1876
1907
|
}
|
|
1877
1908
|
const servers = data.mcpServers ?? {};
|
|
1878
|
-
servers["revdeck"]
|
|
1909
|
+
const previous = servers["revdeck"];
|
|
1910
|
+
const previousEnv = previous && typeof previous === "object" && "env" in previous && previous.env && typeof previous.env === "object" ? previous.env : {};
|
|
1911
|
+
servers["revdeck"] = { ...mcp, env: { ...previousEnv, ...mcp.env ?? {} } };
|
|
1879
1912
|
data.mcpServers = servers;
|
|
1880
1913
|
await writeFile(file, `${JSON.stringify(data, null, 2)}
|
|
1881
1914
|
`);
|
|
@@ -2185,13 +2218,32 @@ async function runDevcontainer(rootInput, options) {
|
|
|
2185
2218
|
}
|
|
2186
2219
|
await writeFile2(file, output);
|
|
2187
2220
|
writers.out(`\u2714 ${path7.relative(root, file)}`);
|
|
2221
|
+
await mergeMcpEnv(root, patch.containerEnv);
|
|
2188
2222
|
if (existed) writers.out(tr(" \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B.", " comments were preserved."));
|
|
2189
2223
|
writers.out("");
|
|
2190
2224
|
writers.out(tr("\u0414\u0430\u043B\u044C\u0448\u0435:", "Next:"));
|
|
2191
2225
|
writers.out(tr(" 1. \u041D\u0430 \u0445\u043E\u0441\u0442\u0435: revdeck daemon restart \u2014 \u043E\u043D \u0441\u043E\u0437\u0434\u0430\u0441\u0442 \u0441\u043E\u043A\u0435\u0442 \u043C\u043E\u0441\u0442\u0430.", " 1. On the host: revdeck daemon restart \u2014 it creates the bridge socket."));
|
|
2192
2226
|
writers.out(tr(" 2. \u041F\u0435\u0440\u0435\u0441\u043E\u0431\u0435\u0440\u0438\u0442\u0435/\u043F\u0435\u0440\u0435\u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 devcontainer.", " 2. Rebuild/reopen the devcontainer."));
|
|
2193
2227
|
writers.out(tr(" 3. \u0412 \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u0435: revdeck doctor \u2014 \u043E\u043D \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043A\u0430\u0442\u044C glab/gh \u0432\u043D\u0443\u0442\u0440\u0438.", " 3. In the container: revdeck doctor \u2014 it will not look for glab/gh inside."));
|
|
2194
|
-
writers.out(tr(" \u0414\u043B\u044F UI \u0438\u0437 \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u0430 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0434\u0435\u043C\u043E\u043D \u043D\u0430 \u0445\u043E\u0441\u0442\u0435 \u0441 --host 0.0.0.0.", " For the UI from the container, start the daemon on the host with --host 0.0.0.0."));
|
|
2228
|
+
writers.out(tr(" \u0414\u043B\u044F UI/MCP \u0438\u0437 \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u0430 (\u0438\u043B\u0438 \u0435\u0441\u043B\u0438 \u0441\u043E\u043A\u0435\u0442 \u043D\u0435 \u043C\u043E\u043D\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044F) \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0434\u0435\u043C\u043E\u043D \u043D\u0430 \u0445\u043E\u0441\u0442\u0435 \u0441 --host 0.0.0.0.", " For the UI/MCP from the container (or when the socket cannot be mounted), start the daemon on the host with --host 0.0.0.0."));
|
|
2229
|
+
}
|
|
2230
|
+
async function mergeMcpEnv(root, env) {
|
|
2231
|
+
for (const relative of [".mcp.json", ".cursor/mcp.json"]) {
|
|
2232
|
+
const file = path7.join(root, relative);
|
|
2233
|
+
if (!existsSync6(file)) continue;
|
|
2234
|
+
try {
|
|
2235
|
+
const data = JSON.parse(await readFile4(file, "utf8"));
|
|
2236
|
+
const servers = isRecord(data.mcpServers) ? data.mcpServers : null;
|
|
2237
|
+
const server2 = servers && isRecord(servers.revdeck) ? servers.revdeck : null;
|
|
2238
|
+
if (!server2) continue;
|
|
2239
|
+
server2.env = { ...isRecord(server2.env) ? server2.env : {}, ...env };
|
|
2240
|
+
await writeFile2(file, `${JSON.stringify(data, null, 2)}
|
|
2241
|
+
`);
|
|
2242
|
+
writers.out(`\u2714 MCP env: ${relative}`);
|
|
2243
|
+
} catch (error) {
|
|
2244
|
+
writers.err(`! ${relative}: ${tr("\u043D\u0435 JSON \u2014 \u043D\u0435 \u0442\u0440\u043E\u0433\u0430\u044E", "not JSON \u2014 leaving it untouched")} (${error.message})`);
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2195
2247
|
}
|
|
2196
2248
|
|
|
2197
2249
|
// src/cli/eject.ts
|