revdeck 0.7.0 → 0.8.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 CHANGED
@@ -4,6 +4,25 @@ 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.0] - 2026-11-18
8
+
9
+ ### Changed
10
+
11
+ - Server typechecking runs on the TypeScript 7 native compiler (`typescript-7` npm alias,
12
+ `typecheck:server`). `svelte-check` still requires TypeScript 5/6 as a peer, so the project keeps
13
+ `typescript@6` for the UI checker; `npm run typecheck` runs both.
14
+
15
+ ### Fixed
16
+
17
+ - Devcontainer path mapping: `revdeck devcontainer --write` records `REVDECK_HOST_ROOT` (the host
18
+ working-copy path as a `${localEnv:HOME}` expression) in `containerEnv` and `remoteEnv`. The CLI and
19
+ MCP server in the container map their worktree path to the host path before `reviews.open`,
20
+ `reviews.remoteList` and `projects.register`, so the host daemon reads `.revdeck.yml`, rule
21
+ documents, checks and local diff bases instead of falling back to auto-discovery. Reviews opened
22
+ before the mapping keep the old root and must be reopened; a config root that is not visible to the
23
+ reader now produces an actionable warning. `revdeck eject` removes the variable and the help/docs
24
+ describe the mapping.
25
+
7
26
  ## [0.7.0] - 2026-11-18
8
27
 
9
28
  ### 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 # tsc + svelte-check
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,15 @@ 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` — the host working-copy path, again as
284
+ `${localEnv:HOME}...` — into `containerEnv` and `remoteEnv` (the MCP server inherits it from the
285
+ container). The CLI and MCP
286
+ server inside the container replace their worktree path with that host path before calling the daemon;
287
+ `.revdeck.yml`, rule documents, checks and local diff bases then come from the host checkout. If the
288
+ repository is outside `$HOME`, set `REVDECK_HOST_ROOT` manually. Reviews opened before this mapping
289
+ still point at the container root: reopen them after updating the devcontainer.
290
+
282
291
  The daemon creates the bridge socket on startup, so on the host run `revdeck daemon restart`, then
283
292
  rebuild the container. Inside the container revdeck never starts a local daemon, so `gh`/`glab` are
284
293
  never invoked there; if the host socket is missing it fails with a clear `DEVCONTAINER` error.
@@ -402,7 +411,7 @@ More: [docs/architecture.md](docs/architecture.md), [docs/protocol.md](docs/prot
402
411
 
403
412
  ```bash
404
413
  npm ci
405
- npm run typecheck # tsc + svelte-check
414
+ npm run typecheck # TypeScript 7 (server) + svelte-check (TS 6)
406
415
  npm test # vitest
407
416
  npm run build # dist/cli.js, dist/daemon.js, dist/mcp.js, dist/ui
408
417
  npm run dev:daemon # daemon from source
package/README.ru.md CHANGED
@@ -264,6 +264,15 @@ info-`daemon.json` без токена UI) и выставляет `REVDECK_RUNT
264
264
  путь, поэтому один `.devcontainer/devcontainer.json` работает у всех разработчиков. Комментарии и
265
265
  чужие ключи в существующем JSONC сохраняются.
266
266
 
267
+ Демон живёт на хосте и не видит путь рабочей копии в контейнере (`/workspaces/...`), поэтому команда
268
+ дополнительно записывает `REVDECK_HOST_ROOT` — путь рабочей копии на хосте, тоже через
269
+ `${localEnv:HOME}...` — в `containerEnv` и `remoteEnv` (MCP-сервер наследует его из окружения
270
+ контейнера). CLI и MCP-сервер в
271
+ контейнере заменяют свой путь на путь хоста перед обращением к демону: `.revdeck.yml`, документы
272
+ правил, checks и база локального diff читаются из рабочей копии хоста. Если репозиторий вне `$HOME`,
273
+ задайте `REVDECK_HOST_ROOT` вручную. Ревью, открытые до этого изменения, хранят путь контейнера — их
274
+ нужно открыть заново после обновления devcontainer.
275
+
267
276
  Демон создаёт сокет моста при старте: на хосте выполните `revdeck daemon restart`, затем пересоберите
268
277
  контейнер. В контейнере revdeck никогда не запускает свой демон, поэтому `gh`/`glab` там не
269
278
  вызываются; если сокет хоста недоступен, команда падает с понятной ошибкой `DEVCONTAINER`.
@@ -385,7 +394,7 @@ revdeck ищет `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md` и `docs/*` и пр
385
394
 
386
395
  ```bash
387
396
  npm install
388
- npm run typecheck # tsc + svelte-check
397
+ npm run typecheck # TypeScript 7 (сервер) + svelte-check (TS 6)
389
398
  npm test # vitest
390
399
  npm run build # dist/cli.js, dist/daemon.js, dist/mcp.js, dist/ui
391
400
  ```
package/SECURITY.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Version | Supported |
6
6
  |---|---|
7
- | 0.7.x | yes |
7
+ | 0.8.x | yes |
8
8
 
9
9
  Pre-1.0 releases get fixes on the latest minor line.
10
10
 
package/dist/cli.js CHANGED
@@ -24,6 +24,15 @@ 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 path.resolve(target);
33
+ if (relative.startsWith("..") || path.isAbsolute(relative)) return resolved;
34
+ return path.join(path.resolve(target), relative);
35
+ }
27
36
  function findConfigFile(root) {
28
37
  for (const name of CONFIG_FILES) {
29
38
  const candidate = path.join(root, name);
@@ -563,6 +572,14 @@ function mergeConfigData(base, local) {
563
572
  }
564
573
  async function loadConfig(root = findRepoRoot()) {
565
574
  const warnings = [];
575
+ if (!existsSync2(root)) {
576
+ warnings.push(
577
+ tr(
578
+ `\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`,
579
+ `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`
580
+ )
581
+ );
582
+ }
566
583
  const file = findConfigFile(root);
567
584
  let localFile = findLocalConfigFile(root);
568
585
  if (localFile && existsSync2(path3.join(root, ".git"))) {
@@ -791,7 +808,7 @@ var VERSION;
791
808
  var init_version = __esm({
792
809
  "src/version.ts"() {
793
810
  "use strict";
794
- VERSION = "0.7.0";
811
+ VERSION = "0.8.0";
795
812
  }
796
813
  });
797
814
 
@@ -1544,6 +1561,9 @@ var main_exports = {};
1544
1561
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
1545
1562
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
1546
1563
  import { z as z2 } from "zod";
1564
+ function daemonRoot(root) {
1565
+ return toHostRoot(root, process.env.REVDECK_HOST_ROOT, defaultRoot);
1566
+ }
1547
1567
  async function client() {
1548
1568
  if (!clientPromise) clientPromise = ensureDaemon().then((result) => result.client);
1549
1569
  return clientPromise;
@@ -1733,7 +1753,7 @@ var init_main = __esm({
1733
1753
  }
1734
1754
  const result = await call(
1735
1755
  "reviews.remoteList",
1736
- { root: current2.root, scope: listScope, limit: limit ?? 50 }
1756
+ { root: daemonRoot(current2.root), scope: listScope, limit: limit ?? 50 }
1737
1757
  );
1738
1758
  const text = result.items.map((item) => `#${item.ref.number} ${item.title} \xB7 ${item.author} \xB7 ${item.updatedAt}`).join("\n") || "Empty.";
1739
1759
  return ok(`${result.platform}:${result.project}
@@ -1770,7 +1790,7 @@ ${text}`, result);
1770
1790
  continue;
1771
1791
  }
1772
1792
  const result = await call("reviews.open", {
1773
- root: current2.root,
1793
+ root: daemonRoot(current2.root),
1774
1794
  input: value
1775
1795
  });
1776
1796
  reviews.push(result.review);
@@ -2994,6 +3014,7 @@ import { applyEdits as applyEdits2, modify as modify2 } from "jsonc-parser";
2994
3014
  init_paths();
2995
3015
  import { existsSync as existsSync7 } from "node:fs";
2996
3016
  import { mkdir as mkdir3, readFile as readFile4, writeFile as writeFile2 } from "node:fs/promises";
3017
+ import os3 from "node:os";
2997
3018
  import path8 from "node:path";
2998
3019
  import { applyEdits, modify, parse as parseJsonc2 } from "jsonc-parser";
2999
3020
  init_locale();
@@ -3001,7 +3022,13 @@ init_format();
3001
3022
  var CONTAINER_RUNTIME_DIR = "/run/revdeck";
3002
3023
  var CONTAINER_STATE_DIR = "/var/lib/revdeck";
3003
3024
  var CONTAINER_UI_HOST = "host.docker.internal";
3004
- function devcontainerPatch() {
3025
+ function hostRootExpression(root, home = process.env.HOME || process.env.USERPROFILE || os3.homedir()) {
3026
+ const relative = path8.relative(home, path8.resolve(root));
3027
+ if (path8.isAbsolute(relative) || relative.startsWith("..")) return null;
3028
+ const suffix = relative ? `/${relative.split(path8.sep).join("/")}` : "";
3029
+ return `\${localEnv:HOME}\${localEnv:USERPROFILE}${suffix}`;
3030
+ }
3031
+ function devcontainerPatch(hostRoot) {
3005
3032
  const bridge = "${localEnv:HOME}${localEnv:USERPROFILE}/.local/state/revdeck/devcontainer";
3006
3033
  return {
3007
3034
  mounts: [
@@ -3012,13 +3039,15 @@ function devcontainerPatch() {
3012
3039
  REVDECK_RUNTIME_DIR: CONTAINER_RUNTIME_DIR,
3013
3040
  REVDECK_STATE_DIR: CONTAINER_STATE_DIR,
3014
3041
  REVDECK_DEV_CONTAINER: "1",
3015
- REVDECK_UI_HOST: CONTAINER_UI_HOST
3042
+ REVDECK_UI_HOST: CONTAINER_UI_HOST,
3043
+ ...hostRoot ? { REVDECK_HOST_ROOT: hostRoot } : {}
3016
3044
  },
3017
3045
  remoteEnv: {
3018
3046
  REVDECK_RUNTIME_DIR: CONTAINER_RUNTIME_DIR,
3019
3047
  REVDECK_STATE_DIR: CONTAINER_STATE_DIR,
3020
3048
  REVDECK_DEV_CONTAINER: "1",
3021
- REVDECK_UI_HOST: CONTAINER_UI_HOST
3049
+ REVDECK_UI_HOST: CONTAINER_UI_HOST,
3050
+ ...hostRoot ? { REVDECK_HOST_ROOT: hostRoot } : {}
3022
3051
  },
3023
3052
  runArgs: [`--add-host=${CONTAINER_UI_HOST}:host-gateway`]
3024
3053
  };
@@ -3075,7 +3104,8 @@ function applyDevcontainerPatch(text, patch) {
3075
3104
  }
3076
3105
  async function runDevcontainer(rootInput, options) {
3077
3106
  const root = findRepoRoot(rootInput);
3078
- const patch = devcontainerPatch();
3107
+ const hostRoot = hostRootExpression(root);
3108
+ const patch = devcontainerPatch(hostRoot);
3079
3109
  await ensureDir(devcontainerRunDir());
3080
3110
  await ensureDir(devcontainerStateDir());
3081
3111
  const dir = path8.join(root, ".devcontainer");
@@ -3083,6 +3113,16 @@ async function runDevcontainer(rootInput, options) {
3083
3113
  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
3114
  writers.out(` ${tr("\u0441\u043E\u043A\u0435\u0442", "socket")}: ${devcontainerRunDir()} -> ${CONTAINER_RUNTIME_DIR}`);
3085
3115
  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")})`);
3116
+ if (hostRoot) {
3117
+ writers.out(` ${tr("\u0440\u0430\u0431\u043E\u0447\u0430\u044F \u043A\u043E\u043F\u0438\u044F \u0445\u043E\u0441\u0442\u0430", "host working copy")}: ${hostRoot}`);
3118
+ } else {
3119
+ writers.err(
3120
+ tr(
3121
+ "! \u0440\u0435\u043F\u043E\u0437\u0438\u0442\u043E\u0440\u0438\u0439 \u0432\u043D\u0435 \u0434\u043E\u043C\u0430\u0448\u043D\u0435\u0433\u043E \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430: \u0437\u0430\u0434\u0430\u0439\u0442\u0435 REVDECK_HOST_ROOT=<\u043F\u0443\u0442\u044C \u043D\u0430 \u0445\u043E\u0441\u0442\u0435> \u0432 devcontainer.json \u0432\u0440\u0443\u0447\u043D\u0443\u044E, \u0438\u043D\u0430\u0447\u0435 \u0434\u0435\u043C\u043E\u043D \u043D\u0435 \u0443\u0432\u0438\u0434\u0438\u0442 .revdeck.yml",
3122
+ "! the repository is outside the home directory: set REVDECK_HOST_ROOT=<host path> in devcontainer.json manually, otherwise the daemon will not see .revdeck.yml"
3123
+ )
3124
+ );
3125
+ }
3086
3126
  if (!existsSync7(devcontainerSocketPath())) {
3087
3127
  writers.err(
3088
3128
  tr(
@@ -3135,6 +3175,7 @@ async function runDevcontainer(rootInput, options) {
3135
3175
  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
3176
  }
3137
3177
  async function mergeMcpEnv(root, env) {
3178
+ const mcpEnv = Object.fromEntries(Object.entries(env).filter(([name]) => name !== "REVDECK_HOST_ROOT"));
3138
3179
  let changed = 0;
3139
3180
  for (const relative of [".mcp.json", ".cursor/mcp.json"]) {
3140
3181
  const file = path8.join(root, relative);
@@ -3144,7 +3185,7 @@ async function mergeMcpEnv(root, env) {
3144
3185
  const servers = isRecord2(data.mcpServers) ? data.mcpServers : null;
3145
3186
  const server2 = servers && isRecord2(servers.revdeck) ? servers.revdeck : null;
3146
3187
  if (!server2) continue;
3147
- server2.env = { ...isRecord2(server2.env) ? server2.env : {}, ...env };
3188
+ server2.env = { ...isRecord2(server2.env) ? server2.env : {}, ...mcpEnv };
3148
3189
  await writeFile2(file, `${JSON.stringify(data, null, 2)}
3149
3190
  `);
3150
3191
  changed += 1;
@@ -3242,7 +3283,7 @@ async function runEject(rootInput, options) {
3242
3283
  for (const key of ["containerEnv", "remoteEnv"]) {
3243
3284
  if (!isRecord2(parsed[key])) continue;
3244
3285
  const env = { ...parsed[key] };
3245
- for (const name of ["REVDECK_RUNTIME_DIR", "REVDECK_STATE_DIR", "REVDECK_DEV_CONTAINER", "REVDECK_UI_HOST"]) delete env[name];
3286
+ for (const name of ["REVDECK_RUNTIME_DIR", "REVDECK_STATE_DIR", "REVDECK_DEV_CONTAINER", "REVDECK_UI_HOST", "REVDECK_HOST_ROOT"]) delete env[name];
3246
3287
  if (Object.keys(env).length !== Object.keys(parsed[key]).length) {
3247
3288
  current2 = applyEdits2(current2, modify2(current2, [key], env, formatting));
3248
3289
  changed = true;
@@ -3629,7 +3670,7 @@ var HELP_RU = `revdeck ${VERSION} \u2014 \u0440\u0435\u0432\u044C\u044E GitLab/G
3629
3670
 
3630
3671
  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
3672
  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)
3673
+ 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
3674
  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
3675
  revdeck daemon <start|stop|restart|status|logs|install|uninstall>
3635
3676
  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 +3705,7 @@ var HELP_EN = `revdeck ${VERSION} \u2014 code review for GitLab/GitHub, for huma
3664
3705
 
3665
3706
  revdeck init set up a project: .revdeck.yml, adapters, MCP [--provider gitlab|github|auto]
3666
3707
  revdeck eject remove revdeck from the project (--yes; --keep-config)
3667
- revdeck devcontainer connect a devcontainer to the host daemon (--write)
3708
+ revdeck devcontainer connect a devcontainer to the host daemon (--write; host path in REVDECK_HOST_ROOT)
3668
3709
  revdeck doctor check the environment and access
3669
3710
  revdeck daemon <start|stop|restart|status|logs|install|uninstall>
3670
3711
  revdeck projects projects and their working copies (add <path> \u2014 register)
@@ -3844,7 +3885,7 @@ async function resolveReview(client2, root, arg, values) {
3844
3885
  }
3845
3886
  if (arg) {
3846
3887
  const result = await client2.request("reviews.open", {
3847
- root,
3888
+ root: toHostRoot(root),
3848
3889
  input: arg,
3849
3890
  ...values.platform ? { platform: values.platform } : {},
3850
3891
  ...values.project ? { project: values.project } : {},
@@ -3874,7 +3915,7 @@ async function list(root, values) {
3874
3915
  if (values.remote) {
3875
3916
  await withClient(async ({ client: client2 }) => {
3876
3917
  const result = await client2.request("reviews.remoteList", {
3877
- root,
3918
+ root: toHostRoot(root),
3878
3919
  scope: values.scope ?? "open",
3879
3920
  limit: Number(values.limit ?? 50)
3880
3921
  });
@@ -3888,7 +3929,7 @@ async function list(root, values) {
3888
3929
  }
3889
3930
  await withClient(async ({ client: client2 }) => {
3890
3931
  const project = typeof values.project === "string" && values.project.trim() ? values.project.trim() : void 0;
3891
- const params = values.all === true ? {} : project ? { project } : { root };
3932
+ const params = values.all === true ? {} : project ? { project } : { root: toHostRoot(root) };
3892
3933
  const { reviews } = await client2.request("reviews.list", params);
3893
3934
  if (values.json) return printJson({ reviews });
3894
3935
  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 +3941,9 @@ async function projects(root, args, values) {
3900
3941
  await withClient(async ({ client: client2 }) => {
3901
3942
  if (action === "add") {
3902
3943
  const target = args[1] ?? values.root ?? root;
3903
- const result = await client2.request("projects.register", { root: target });
3944
+ const result = await client2.request("projects.register", {
3945
+ root: toHostRoot(target)
3946
+ });
3904
3947
  if (values.json) return printJson(result);
3905
3948
  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
3949
  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 +4149,7 @@ async function openReview(root, args, values) {
4106
4149
  await withClient(async ({ client: client2 }) => {
4107
4150
  const requests = args.map(async (input) => {
4108
4151
  const result = await client2.request("reviews.open", {
4109
- root,
4152
+ root: toHostRoot(root),
4110
4153
  input,
4111
4154
  ...values.platform ? { platform: values.platform } : {},
4112
4155
  ...values.project ? { project: values.project } : {},
@@ -4249,7 +4292,7 @@ async function daemon(action, values = {}) {
4249
4292
  }
4250
4293
  async function status(root, values) {
4251
4294
  await withClient(async ({ client: client2 }) => {
4252
- const params = values.all === true ? {} : { root };
4295
+ const params = values.all === true ? {} : { root: toHostRoot(root) };
4253
4296
  const { reviews } = await client2.request("reviews.list", params);
4254
4297
  if (!reviews.length) {
4255
4298
  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 +4691,15 @@ async function doctor(root) {
4648
4691
  rows.push(["node", major >= 22 ? "ok" : "fail", process.version]);
4649
4692
  if (container) {
4650
4693
  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")]);
4694
+ const hostRoot = process.env.REVDECK_HOST_ROOT?.trim();
4695
+ rows.push([
4696
+ "host root",
4697
+ hostRoot ? "ok" : "warn",
4698
+ hostRoot ?? tr(
4699
+ "\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",
4700
+ "not set: the host daemon will not see .revdeck.yml \u2014 run revdeck devcontainer --write"
4701
+ )
4702
+ ]);
4651
4703
  }
4652
4704
  const binaries = {};
4653
4705
  for (const bin of ["glab", "gh", "git"]) {