revdeck 0.7.0 → 0.8.1
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 +29 -0
- package/CONTRIBUTING.md +5 -1
- package/README.md +11 -1
- package/README.ru.md +11 -1
- package/SECURITY.md +1 -1
- package/dist/cli.js +54 -15
- package/dist/cli.js.map +2 -2
- package/dist/daemon.js +9 -1
- package/dist/daemon.js.map +2 -2
- package/dist/mcp.js +26 -3
- package/dist/mcp.js.map +2 -2
- package/docs/capabilities.md +2 -1
- package/docs/configuration.md +1 -0
- package/docs/integrations.md +16 -2
- package/docs/ru/capabilities.md +2 -1
- package/docs/ru/configuration.md +1 -0
- package/docs/ru/integrations.md +15 -2
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,35 @@ All notable changes to this project are documented here. The format is based on
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.8.1] - 2026-11-18
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- `revdeck devcontainer --write` now writes `REVDECK_HOST_ROOT` as `${localWorkspaceFolder}` instead
|
|
12
|
+
of a `${localEnv:HOME}`-relative path. Each developer's devcontainer tooling expands the variable
|
|
13
|
+
to their own checkout, so the shared `devcontainer.json` no longer contains a user-specific path
|
|
14
|
+
that breaks colleagues who clone into another folder. A Windows host path (`C:\...`) from Docker
|
|
15
|
+
Desktop is passed to the daemon without POSIX normalization.
|
|
16
|
+
|
|
17
|
+
## [0.8.0] - 2026-11-18
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Server typechecking runs on the TypeScript 7 native compiler (`typescript-7` npm alias,
|
|
22
|
+
`typecheck:server`). `svelte-check` still requires TypeScript 5/6 as a peer, so the project keeps
|
|
23
|
+
`typescript@6` for the UI checker; `npm run typecheck` runs both.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- Devcontainer path mapping: `revdeck devcontainer --write` records `REVDECK_HOST_ROOT` (the host
|
|
28
|
+
working-copy path as a `${localEnv:HOME}` expression) in `containerEnv` and `remoteEnv`. The CLI and
|
|
29
|
+
MCP server in the container map their worktree path to the host path before `reviews.open`,
|
|
30
|
+
`reviews.remoteList` and `projects.register`, so the host daemon reads `.revdeck.yml`, rule
|
|
31
|
+
documents, checks and local diff bases instead of falling back to auto-discovery. Reviews opened
|
|
32
|
+
before the mapping keep the old root and must be reopened; a config root that is not visible to the
|
|
33
|
+
reader now produces an actionable warning. `revdeck eject` removes the variable and the help/docs
|
|
34
|
+
describe the mapping.
|
|
35
|
+
|
|
7
36
|
## [0.7.0] - 2026-11-18
|
|
8
37
|
|
|
9
38
|
### Security
|
package/CONTRIBUTING.md
CHANGED
|
@@ -28,7 +28,7 @@ If a change is intentionally undocumented, say why in the pull request.
|
|
|
28
28
|
git clone https://github.com/katrov/revdeck.git
|
|
29
29
|
cd revdeck
|
|
30
30
|
npm ci
|
|
31
|
-
npm run typecheck #
|
|
31
|
+
npm run typecheck # TypeScript 7 (server) + svelte-check (TS 6)
|
|
32
32
|
npm test
|
|
33
33
|
npm run build
|
|
34
34
|
```
|
|
@@ -36,6 +36,10 @@ npm run build
|
|
|
36
36
|
For manual testing, `npm run dev:daemon` starts the daemon from source; `npm run dev:ui` starts Vite.
|
|
37
37
|
The daemon serves the built UI from `dist/ui`, so run `npm run build:ui` before checking the full app.
|
|
38
38
|
|
|
39
|
+
Server code is checked with the TypeScript 7 native compiler (`typescript-7` npm alias,
|
|
40
|
+
`typecheck:server`). `svelte-check` still declares TypeScript 5/6 as its peer, so the project keeps
|
|
41
|
+
`typescript@6` for the UI checker; `npm run typecheck` runs both.
|
|
42
|
+
|
|
39
43
|
`glab`/`gh` are optional for development: provider tests use recorded CLI responses. To test against a
|
|
40
44
|
real platform, authenticate the CLI and run `revdeck doctor`.
|
|
41
45
|
|
package/README.md
CHANGED
|
@@ -279,6 +279,16 @@ info `daemon.json` without the UI token), and sets `REVDECK_RUNTIME_DIR`, `REVDE
|
|
|
279
279
|
home path, so the same `.devcontainer/devcontainer.json` works for every developer. Comments and
|
|
280
280
|
foreign keys in an existing JSONC file are preserved.
|
|
281
281
|
|
|
282
|
+
The daemon runs on the host and cannot read the container workspace path (`/workspaces/...`), so the
|
|
283
|
+
same command also writes `REVDECK_HOST_ROOT: "${localWorkspaceFolder}"` into `containerEnv` and
|
|
284
|
+
`remoteEnv` (the MCP server inherits it from the container). The devcontainer tooling expands
|
|
285
|
+
`${localWorkspaceFolder}` to each developer's host path, so the shared file has no user-specific path.
|
|
286
|
+
The CLI and MCP server inside the container replace their worktree path with that host path before
|
|
287
|
+
calling the daemon; `.revdeck.yml`, rule documents, checks and local diff bases then come from the host
|
|
288
|
+
checkout. If the repository is not the opened workspace folder, set `REVDECK_HOST_ROOT` to the host
|
|
289
|
+
repository root manually (for example `${localWorkspaceFolder}/subdir`). Reviews opened before this
|
|
290
|
+
mapping still point at the container root: reopen them after updating the devcontainer.
|
|
291
|
+
|
|
282
292
|
The daemon creates the bridge socket on startup, so on the host run `revdeck daemon restart`, then
|
|
283
293
|
rebuild the container. Inside the container revdeck never starts a local daemon, so `gh`/`glab` are
|
|
284
294
|
never invoked there; if the host socket is missing it fails with a clear `DEVCONTAINER` error.
|
|
@@ -402,7 +412,7 @@ More: [docs/architecture.md](docs/architecture.md), [docs/protocol.md](docs/prot
|
|
|
402
412
|
|
|
403
413
|
```bash
|
|
404
414
|
npm ci
|
|
405
|
-
npm run typecheck #
|
|
415
|
+
npm run typecheck # TypeScript 7 (server) + svelte-check (TS 6)
|
|
406
416
|
npm test # vitest
|
|
407
417
|
npm run build # dist/cli.js, dist/daemon.js, dist/mcp.js, dist/ui
|
|
408
418
|
npm run dev:daemon # daemon from source
|
package/README.ru.md
CHANGED
|
@@ -264,6 +264,16 @@ info-`daemon.json` без токена UI) и выставляет `REVDECK_RUNT
|
|
|
264
264
|
путь, поэтому один `.devcontainer/devcontainer.json` работает у всех разработчиков. Комментарии и
|
|
265
265
|
чужие ключи в существующем JSONC сохраняются.
|
|
266
266
|
|
|
267
|
+
Демон живёт на хосте и не видит путь рабочей копии в контейнере (`/workspaces/...`), поэтому команда
|
|
268
|
+
дополнительно записывает `REVDECK_HOST_ROOT: "${localWorkspaceFolder}"` в `containerEnv` и
|
|
269
|
+
`remoteEnv` (MCP-сервер наследует его из окружения контейнера). Клиент devcontainer раскрывает
|
|
270
|
+
`${localWorkspaceFolder}` в путь конкретного разработчика, поэтому общий файл не содержит личного
|
|
271
|
+
пути. CLI и MCP-сервер в контейнере заменяют свой путь на путь хоста перед обращением к демону:
|
|
272
|
+
`.revdeck.yml`, документы правил, checks и база локального diff читаются из рабочей копии хоста. Если
|
|
273
|
+
репозиторий — не открытая папка workspace, задайте `REVDECK_HOST_ROOT` вручную (например,
|
|
274
|
+
`${localWorkspaceFolder}/subdir`). Ревью, открытые до этого изменения, хранят путь контейнера — их
|
|
275
|
+
нужно открыть заново после обновления devcontainer.
|
|
276
|
+
|
|
267
277
|
Демон создаёт сокет моста при старте: на хосте выполните `revdeck daemon restart`, затем пересоберите
|
|
268
278
|
контейнер. В контейнере revdeck никогда не запускает свой демон, поэтому `gh`/`glab` там не
|
|
269
279
|
вызываются; если сокет хоста недоступен, команда падает с понятной ошибкой `DEVCONTAINER`.
|
|
@@ -385,7 +395,7 @@ revdeck ищет `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md` и `docs/*` и пр
|
|
|
385
395
|
|
|
386
396
|
```bash
|
|
387
397
|
npm install
|
|
388
|
-
npm run typecheck #
|
|
398
|
+
npm run typecheck # TypeScript 7 (сервер) + svelte-check (TS 6)
|
|
389
399
|
npm test # vitest
|
|
390
400
|
npm run build # dist/cli.js, dist/daemon.js, dist/mcp.js, dist/ui
|
|
391
401
|
```
|
package/SECURITY.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -24,6 +24,18 @@ function findRepoRoot(start = process.cwd()) {
|
|
|
24
24
|
dir = parent;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
function toHostRoot(root, hostRoot = process.env.REVDECK_HOST_ROOT, containerRoot = findRepoRoot()) {
|
|
28
|
+
const resolved = path.resolve(root);
|
|
29
|
+
const target = hostRoot?.trim();
|
|
30
|
+
if (!target) return resolved;
|
|
31
|
+
const relative = path.relative(path.resolve(containerRoot), resolved);
|
|
32
|
+
if (relative === "") return target;
|
|
33
|
+
if (relative.startsWith("..") || path.isAbsolute(relative)) return resolved;
|
|
34
|
+
const windows = /^[A-Za-z]:[\\/]/.test(target) || target.startsWith("\\\\");
|
|
35
|
+
const separator = windows ? "\\" : "/";
|
|
36
|
+
const prefix = target.replace(/[\\/]+$/, "");
|
|
37
|
+
return `${prefix}${separator}${relative.split(path.sep).join(separator)}`;
|
|
38
|
+
}
|
|
27
39
|
function findConfigFile(root) {
|
|
28
40
|
for (const name of CONFIG_FILES) {
|
|
29
41
|
const candidate = path.join(root, name);
|
|
@@ -563,6 +575,14 @@ function mergeConfigData(base, local) {
|
|
|
563
575
|
}
|
|
564
576
|
async function loadConfig(root = findRepoRoot()) {
|
|
565
577
|
const warnings = [];
|
|
578
|
+
if (!existsSync2(root)) {
|
|
579
|
+
warnings.push(
|
|
580
|
+
tr(
|
|
581
|
+
`\u043A\u0430\u0442\u0430\u043B\u043E\u0433 ${root} \u043D\u0435 \u0432\u0438\u0434\u0435\u043D \u0442\u043E\u043C\u0443, \u043A\u0442\u043E \u0447\u0438\u0442\u0430\u0435\u0442 \u043A\u043E\u043D\u0444\u0438\u0433: \u0432 devcontainer \u0434\u0435\u043C\u043E\u043D \u043D\u0430 \u0445\u043E\u0441\u0442\u0435 \u043D\u0435 \u0432\u0438\u0434\u0438\u0442 \u043F\u0443\u0442\u044C \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u0430 \u2014 \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u0435 revdeck devcontainer --write \u0438\u043B\u0438 \u0437\u0430\u0434\u0430\u0439\u0442\u0435 REVDECK_HOST_ROOT`,
|
|
582
|
+
`the directory ${root} is not visible to the config reader: in a devcontainer the host daemon cannot see the container path \u2014 run revdeck devcontainer --write or set REVDECK_HOST_ROOT`
|
|
583
|
+
)
|
|
584
|
+
);
|
|
585
|
+
}
|
|
566
586
|
const file = findConfigFile(root);
|
|
567
587
|
let localFile = findLocalConfigFile(root);
|
|
568
588
|
if (localFile && existsSync2(path3.join(root, ".git"))) {
|
|
@@ -791,7 +811,7 @@ var VERSION;
|
|
|
791
811
|
var init_version = __esm({
|
|
792
812
|
"src/version.ts"() {
|
|
793
813
|
"use strict";
|
|
794
|
-
VERSION = "0.
|
|
814
|
+
VERSION = "0.8.1";
|
|
795
815
|
}
|
|
796
816
|
});
|
|
797
817
|
|
|
@@ -1544,6 +1564,9 @@ var main_exports = {};
|
|
|
1544
1564
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
1545
1565
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
1546
1566
|
import { z as z2 } from "zod";
|
|
1567
|
+
function daemonRoot(root) {
|
|
1568
|
+
return toHostRoot(root, process.env.REVDECK_HOST_ROOT, defaultRoot);
|
|
1569
|
+
}
|
|
1547
1570
|
async function client() {
|
|
1548
1571
|
if (!clientPromise) clientPromise = ensureDaemon().then((result) => result.client);
|
|
1549
1572
|
return clientPromise;
|
|
@@ -1733,7 +1756,7 @@ var init_main = __esm({
|
|
|
1733
1756
|
}
|
|
1734
1757
|
const result = await call(
|
|
1735
1758
|
"reviews.remoteList",
|
|
1736
|
-
{ root: current2.root, scope: listScope, limit: limit ?? 50 }
|
|
1759
|
+
{ root: daemonRoot(current2.root), scope: listScope, limit: limit ?? 50 }
|
|
1737
1760
|
);
|
|
1738
1761
|
const text = result.items.map((item) => `#${item.ref.number} ${item.title} \xB7 ${item.author} \xB7 ${item.updatedAt}`).join("\n") || "Empty.";
|
|
1739
1762
|
return ok(`${result.platform}:${result.project}
|
|
@@ -1770,7 +1793,7 @@ ${text}`, result);
|
|
|
1770
1793
|
continue;
|
|
1771
1794
|
}
|
|
1772
1795
|
const result = await call("reviews.open", {
|
|
1773
|
-
root: current2.root,
|
|
1796
|
+
root: daemonRoot(current2.root),
|
|
1774
1797
|
input: value
|
|
1775
1798
|
});
|
|
1776
1799
|
reviews.push(result.review);
|
|
@@ -3001,6 +3024,7 @@ init_format();
|
|
|
3001
3024
|
var CONTAINER_RUNTIME_DIR = "/run/revdeck";
|
|
3002
3025
|
var CONTAINER_STATE_DIR = "/var/lib/revdeck";
|
|
3003
3026
|
var CONTAINER_UI_HOST = "host.docker.internal";
|
|
3027
|
+
var HOST_ROOT_EXPRESSION = "${localWorkspaceFolder}";
|
|
3004
3028
|
function devcontainerPatch() {
|
|
3005
3029
|
const bridge = "${localEnv:HOME}${localEnv:USERPROFILE}/.local/state/revdeck/devcontainer";
|
|
3006
3030
|
return {
|
|
@@ -3012,13 +3036,15 @@ function devcontainerPatch() {
|
|
|
3012
3036
|
REVDECK_RUNTIME_DIR: CONTAINER_RUNTIME_DIR,
|
|
3013
3037
|
REVDECK_STATE_DIR: CONTAINER_STATE_DIR,
|
|
3014
3038
|
REVDECK_DEV_CONTAINER: "1",
|
|
3015
|
-
REVDECK_UI_HOST: CONTAINER_UI_HOST
|
|
3039
|
+
REVDECK_UI_HOST: CONTAINER_UI_HOST,
|
|
3040
|
+
REVDECK_HOST_ROOT: HOST_ROOT_EXPRESSION
|
|
3016
3041
|
},
|
|
3017
3042
|
remoteEnv: {
|
|
3018
3043
|
REVDECK_RUNTIME_DIR: CONTAINER_RUNTIME_DIR,
|
|
3019
3044
|
REVDECK_STATE_DIR: CONTAINER_STATE_DIR,
|
|
3020
3045
|
REVDECK_DEV_CONTAINER: "1",
|
|
3021
|
-
REVDECK_UI_HOST: CONTAINER_UI_HOST
|
|
3046
|
+
REVDECK_UI_HOST: CONTAINER_UI_HOST,
|
|
3047
|
+
REVDECK_HOST_ROOT: HOST_ROOT_EXPRESSION
|
|
3022
3048
|
},
|
|
3023
3049
|
runArgs: [`--add-host=${CONTAINER_UI_HOST}:host-gateway`]
|
|
3024
3050
|
};
|
|
@@ -3083,6 +3109,7 @@ async function runDevcontainer(rootInput, options) {
|
|
|
3083
3109
|
writers.out(tr("\u041C\u043E\u0441\u0442 revdeck \u0434\u043B\u044F \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u0430:", "revdeck bridge for the container:"));
|
|
3084
3110
|
writers.out(` ${tr("\u0441\u043E\u043A\u0435\u0442", "socket")}: ${devcontainerRunDir()} -> ${CONTAINER_RUNTIME_DIR}`);
|
|
3085
3111
|
writers.out(` ${tr("\u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435", "state")}: ${devcontainerStateDir()} -> ${CONTAINER_STATE_DIR} (${tr("\u0442\u043E\u043B\u044C\u043A\u043E \u0447\u0442\u0435\u043D\u0438\u0435", "read-only")})`);
|
|
3112
|
+
writers.out(` ${tr("\u0440\u0430\u0431\u043E\u0447\u0430\u044F \u043A\u043E\u043F\u0438\u044F \u0445\u043E\u0441\u0442\u0430", "host working copy")}: ${HOST_ROOT_EXPRESSION}`);
|
|
3086
3113
|
if (!existsSync7(devcontainerSocketPath())) {
|
|
3087
3114
|
writers.err(
|
|
3088
3115
|
tr(
|
|
@@ -3135,6 +3162,7 @@ async function runDevcontainer(rootInput, options) {
|
|
|
3135
3162
|
writers.out(tr(" macOS/Docker Desktop: \u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E revdeck daemon restart; Linux \u043F\u0440\u0438 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u043C \u0441\u043E\u043A\u0435\u0442\u0435: revdeck daemon restart --host 0.0.0.0.", " macOS/Docker Desktop: revdeck daemon restart is enough; on Linux with an unreachable socket: revdeck daemon restart --host 0.0.0.0."));
|
|
3136
3163
|
}
|
|
3137
3164
|
async function mergeMcpEnv(root, env) {
|
|
3165
|
+
const mcpEnv = Object.fromEntries(Object.entries(env).filter(([name]) => name !== "REVDECK_HOST_ROOT"));
|
|
3138
3166
|
let changed = 0;
|
|
3139
3167
|
for (const relative of [".mcp.json", ".cursor/mcp.json"]) {
|
|
3140
3168
|
const file = path8.join(root, relative);
|
|
@@ -3144,7 +3172,7 @@ async function mergeMcpEnv(root, env) {
|
|
|
3144
3172
|
const servers = isRecord2(data.mcpServers) ? data.mcpServers : null;
|
|
3145
3173
|
const server2 = servers && isRecord2(servers.revdeck) ? servers.revdeck : null;
|
|
3146
3174
|
if (!server2) continue;
|
|
3147
|
-
server2.env = { ...isRecord2(server2.env) ? server2.env : {}, ...
|
|
3175
|
+
server2.env = { ...isRecord2(server2.env) ? server2.env : {}, ...mcpEnv };
|
|
3148
3176
|
await writeFile2(file, `${JSON.stringify(data, null, 2)}
|
|
3149
3177
|
`);
|
|
3150
3178
|
changed += 1;
|
|
@@ -3242,7 +3270,7 @@ async function runEject(rootInput, options) {
|
|
|
3242
3270
|
for (const key of ["containerEnv", "remoteEnv"]) {
|
|
3243
3271
|
if (!isRecord2(parsed[key])) continue;
|
|
3244
3272
|
const env = { ...parsed[key] };
|
|
3245
|
-
for (const name of ["REVDECK_RUNTIME_DIR", "REVDECK_STATE_DIR", "REVDECK_DEV_CONTAINER", "REVDECK_UI_HOST"]) delete env[name];
|
|
3273
|
+
for (const name of ["REVDECK_RUNTIME_DIR", "REVDECK_STATE_DIR", "REVDECK_DEV_CONTAINER", "REVDECK_UI_HOST", "REVDECK_HOST_ROOT"]) delete env[name];
|
|
3246
3274
|
if (Object.keys(env).length !== Object.keys(parsed[key]).length) {
|
|
3247
3275
|
current2 = applyEdits2(current2, modify2(current2, [key], env, formatting));
|
|
3248
3276
|
changed = true;
|
|
@@ -3629,7 +3657,7 @@ var HELP_RU = `revdeck ${VERSION} \u2014 \u0440\u0435\u0432\u044C\u044E GitLab/G
|
|
|
3629
3657
|
|
|
3630
3658
|
revdeck init \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043F\u0440\u043E\u0435\u043A\u0442: .revdeck.yml, \u0430\u0434\u0430\u043F\u0442\u0435\u0440\u044B, MCP [--provider gitlab|github|auto]
|
|
3631
3659
|
revdeck eject \u0443\u0434\u0430\u043B\u0438\u0442\u044C revdeck \u0438\u0437 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 (--yes; --keep-config)
|
|
3632
|
-
revdeck devcontainer \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C devcontainer \u043A \u0434\u0435\u043C\u043E\u043D\u0443 \u0445\u043E\u0441\u0442\u0430 (--write)
|
|
3660
|
+
revdeck devcontainer \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C devcontainer \u043A \u0434\u0435\u043C\u043E\u043D\u0443 \u0445\u043E\u0441\u0442\u0430 (--write; \u043F\u0443\u0442\u044C \u0445\u043E\u0441\u0442\u0430 \u0432 REVDECK_HOST_ROOT)
|
|
3633
3661
|
revdeck doctor \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u0435 \u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u044B
|
|
3634
3662
|
revdeck daemon <start|stop|restart|status|logs|install|uninstall>
|
|
3635
3663
|
revdeck projects \u043F\u0440\u043E\u0435\u043A\u0442\u044B \u0438 \u0438\u0445 \u0440\u0430\u0431\u043E\u0447\u0438\u0435 \u043A\u043E\u043F\u0438\u0438 (add <path> \u2014 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C)
|
|
@@ -3664,7 +3692,7 @@ var HELP_EN = `revdeck ${VERSION} \u2014 code review for GitLab/GitHub, for huma
|
|
|
3664
3692
|
|
|
3665
3693
|
revdeck init set up a project: .revdeck.yml, adapters, MCP [--provider gitlab|github|auto]
|
|
3666
3694
|
revdeck eject remove revdeck from the project (--yes; --keep-config)
|
|
3667
|
-
revdeck devcontainer connect a devcontainer to the host daemon (--write)
|
|
3695
|
+
revdeck devcontainer connect a devcontainer to the host daemon (--write; host path in REVDECK_HOST_ROOT)
|
|
3668
3696
|
revdeck doctor check the environment and access
|
|
3669
3697
|
revdeck daemon <start|stop|restart|status|logs|install|uninstall>
|
|
3670
3698
|
revdeck projects projects and their working copies (add <path> \u2014 register)
|
|
@@ -3844,7 +3872,7 @@ async function resolveReview(client2, root, arg, values) {
|
|
|
3844
3872
|
}
|
|
3845
3873
|
if (arg) {
|
|
3846
3874
|
const result = await client2.request("reviews.open", {
|
|
3847
|
-
root,
|
|
3875
|
+
root: toHostRoot(root),
|
|
3848
3876
|
input: arg,
|
|
3849
3877
|
...values.platform ? { platform: values.platform } : {},
|
|
3850
3878
|
...values.project ? { project: values.project } : {},
|
|
@@ -3874,7 +3902,7 @@ async function list(root, values) {
|
|
|
3874
3902
|
if (values.remote) {
|
|
3875
3903
|
await withClient(async ({ client: client2 }) => {
|
|
3876
3904
|
const result = await client2.request("reviews.remoteList", {
|
|
3877
|
-
root,
|
|
3905
|
+
root: toHostRoot(root),
|
|
3878
3906
|
scope: values.scope ?? "open",
|
|
3879
3907
|
limit: Number(values.limit ?? 50)
|
|
3880
3908
|
});
|
|
@@ -3888,7 +3916,7 @@ async function list(root, values) {
|
|
|
3888
3916
|
}
|
|
3889
3917
|
await withClient(async ({ client: client2 }) => {
|
|
3890
3918
|
const project = typeof values.project === "string" && values.project.trim() ? values.project.trim() : void 0;
|
|
3891
|
-
const params = values.all === true ? {} : project ? { project } : { root };
|
|
3919
|
+
const params = values.all === true ? {} : project ? { project } : { root: toHostRoot(root) };
|
|
3892
3920
|
const { reviews } = await client2.request("reviews.list", params);
|
|
3893
3921
|
if (values.json) return printJson({ reviews });
|
|
3894
3922
|
if (!reviews.length) return writers.out(tr("\u0432 \u044D\u0442\u043E\u043C \u043F\u0440\u043E\u0435\u043A\u0442\u0435 \u0440\u0435\u0432\u044C\u044E \u0435\u0449\u0451 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u043B\u0438\u0441\u044C: revdeck open <N>", "no reviews opened in this project yet: revdeck open <N>"));
|
|
@@ -3900,7 +3928,9 @@ async function projects(root, args, values) {
|
|
|
3900
3928
|
await withClient(async ({ client: client2 }) => {
|
|
3901
3929
|
if (action === "add") {
|
|
3902
3930
|
const target = args[1] ?? values.root ?? root;
|
|
3903
|
-
const result = await client2.request("projects.register", {
|
|
3931
|
+
const result = await client2.request("projects.register", {
|
|
3932
|
+
root: toHostRoot(target)
|
|
3933
|
+
});
|
|
3904
3934
|
if (values.json) return printJson(result);
|
|
3905
3935
|
if (!result.project) return writers.out(tr("\u043F\u0440\u043E\u0435\u043A\u0442 \u043D\u0435 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0451\u043D: \u043F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 git remote \u0438 .revdeck.yml", "could not determine the project: check git remote and .revdeck.yml"));
|
|
3906
3936
|
writers.out(`${tr("\u043F\u0440\u043E\u0435\u043A\u0442 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D", "project registered")}: ${result.project.key}`);
|
|
@@ -4106,7 +4136,7 @@ async function openReview(root, args, values) {
|
|
|
4106
4136
|
await withClient(async ({ client: client2 }) => {
|
|
4107
4137
|
const requests = args.map(async (input) => {
|
|
4108
4138
|
const result = await client2.request("reviews.open", {
|
|
4109
|
-
root,
|
|
4139
|
+
root: toHostRoot(root),
|
|
4110
4140
|
input,
|
|
4111
4141
|
...values.platform ? { platform: values.platform } : {},
|
|
4112
4142
|
...values.project ? { project: values.project } : {},
|
|
@@ -4249,7 +4279,7 @@ async function daemon(action, values = {}) {
|
|
|
4249
4279
|
}
|
|
4250
4280
|
async function status(root, values) {
|
|
4251
4281
|
await withClient(async ({ client: client2 }) => {
|
|
4252
|
-
const params = values.all === true ? {} : { root };
|
|
4282
|
+
const params = values.all === true ? {} : { root: toHostRoot(root) };
|
|
4253
4283
|
const { reviews } = await client2.request("reviews.list", params);
|
|
4254
4284
|
if (!reviews.length) {
|
|
4255
4285
|
writers.out(tr("\u0432 \u044D\u0442\u043E\u043C \u043F\u0440\u043E\u0435\u043A\u0442\u0435 \u0440\u0435\u0432\u044C\u044E \u0435\u0449\u0451 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u043B\u0438\u0441\u044C", "no reviews opened in this project yet"));
|
|
@@ -4648,6 +4678,15 @@ async function doctor(root) {
|
|
|
4648
4678
|
rows.push(["node", major >= 22 ? "ok" : "fail", process.version]);
|
|
4649
4679
|
if (container) {
|
|
4650
4680
|
rows.push(["mode", "ok", tr("devcontainer: revdeck \u0438 gh/glab \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442 \u043D\u0430 \u0445\u043E\u0441\u0442\u0435", "devcontainer: revdeck and gh/glab run on the host")]);
|
|
4681
|
+
const hostRoot = process.env.REVDECK_HOST_ROOT?.trim();
|
|
4682
|
+
rows.push([
|
|
4683
|
+
"host root",
|
|
4684
|
+
hostRoot ? "ok" : "warn",
|
|
4685
|
+
hostRoot ?? tr(
|
|
4686
|
+
"\u043D\u0435 \u0437\u0430\u0434\u0430\u043D: \u0434\u0435\u043C\u043E\u043D \u0445\u043E\u0441\u0442\u0430 \u043D\u0435 \u0443\u0432\u0438\u0434\u0438\u0442 .revdeck.yml \u2014 \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u0435 revdeck devcontainer --write",
|
|
4687
|
+
"not set: the host daemon will not see .revdeck.yml \u2014 run revdeck devcontainer --write"
|
|
4688
|
+
)
|
|
4689
|
+
]);
|
|
4651
4690
|
}
|
|
4652
4691
|
const binaries = {};
|
|
4653
4692
|
for (const bin of ["glab", "gh", "git"]) {
|