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.
@@ -201,7 +201,8 @@ the agent process and containers would still need a host process. File exchange
201
201
 
202
202
  Consequences: daemon lifecycle, socket permissions, a bridge for containers, version-matched clients,
203
203
  background sync and SSE. One daemon serves several repositories; `root` is passed on open and config is
204
- read from that root.
204
+ read from that root. A devcontainer client passes the host worktree path (`REVDECK_HOST_ROOT`) instead
205
+ of the container mount path, so the host daemon reads the project config and rules.
205
206
 
206
207
  ### Project scopes
207
208
 
@@ -353,6 +353,7 @@ reviews disable the runner. The agent can only show the plan; the bridge returns
353
353
  | `REVDECK_RUNTIME_DIR` | socket directory (default `$XDG_RUNTIME_DIR/revdeck`) |
354
354
  | `REVDECK_URL` + `REVDECK_TOKEN` | connect to the daemon over HTTP (container/port forwarding); the token is agent-scoped, not the UI token |
355
355
  | `REVDECK_DEV_CONTAINER=1` | do not start a local daemon; fail with a host-daemon hint instead |
356
+ | `REVDECK_HOST_ROOT` | host path of the worktree mounted into a devcontainer; `revdeck devcontainer --write` sets `${localWorkspaceFolder}`, and the container client maps its root to it before RPC |
356
357
  | `REVDECK_UI_HOST` | host used by `revdeck ui` from a container (for example `host.docker.internal`) |
357
358
  | `REVDECK_ROOT` | project root for the MCP server |
358
359
  | `REVDECK_FEATURE` | feature id for a feature-scoped MCP session; the current project must be a member |
@@ -148,6 +148,17 @@ absolute home directory, so the shared repository file is valid for every develo
148
148
  environment variables, `runArgs`, comments and foreign keys are preserved; only the two revdeck mounts
149
149
  and the `REVDECK_*` keys are managed.
150
150
 
151
+ `REVDECK_HOST_ROOT` closes the path gap between the two sides: the daemon reads `.revdeck.yml` and rule
152
+ documents on the host, while the container sees the same worktree under `/workspaces/...`. `--write`
153
+ writes `${localWorkspaceFolder}`, which the devcontainer tooling expands to the host path of the
154
+ opened folder, so no user-specific path is committed. If the repository is a subfolder of the opened
155
+ workspace, set `REVDECK_HOST_ROOT` manually (for example `${localWorkspaceFolder}/subdir`). The CLI and
156
+ MCP server in the container map their worktree path (and paths under it) to the host path before
157
+ `reviews.open`, `reviews.remoteList` and `projects.register`. Without the mapping the review still opens
158
+ (platform calls run on the host), but the UI shows auto-discovery and a "directory is not visible"
159
+ warning instead of the project config. Reviews opened before the mapping keep the old container root;
160
+ reopen them.
161
+
151
162
  The daemon creates the bridge socket on startup. On the host run `revdeck daemon restart`, then rebuild
152
163
  the container. Inside the container `revdeck` never starts its own daemon: if the socket is unreachable
153
164
  it fails with a `DEVCONTAINER` error and a hint. `revdeck doctor` does not look for `glab`/`gh` in the
@@ -164,8 +175,11 @@ expose the UI token to the container; `--host 0.0.0.0` is for a browser on anoth
164
175
  not for giving the agent more rights.
165
176
 
166
177
  `revdeck devcontainer --write` adds the `REVDECK_*` variables to the `revdeck` MCP server in `.mcp.json`
167
- and `.cursor/mcp.json` inside the repository. A user-level MCP configuration outside the repository
168
- needs the same variables manually, otherwise it may start a second daemon in the container.
178
+ and `.cursor/mcp.json` inside the repository. `REVDECK_HOST_ROOT` is the exception: `${localEnv:...}`
179
+ and `${localWorkspaceFolder}` are expanded only in `devcontainer.json`, so it is set in
180
+ `containerEnv`/`remoteEnv` and inherited by the MCP server. A user-level MCP configuration outside the
181
+ repository needs the same variables manually (with an absolute `REVDECK_HOST_ROOT`), otherwise it may
182
+ start a second daemon in the container.
169
183
 
170
184
  The container user must be able to connect to the host bridge socket (the bridge socket is `0666`
171
185
  inside the mounted directory `0755`; its methods are limited by the `read`/`draft` capability). The UI
@@ -203,7 +203,8 @@ MCP — тонкие клиенты. Альтернатива — MCP-проце
203
203
 
204
204
  Последствия: жизненный цикл демона, права сокета, мост для контейнеров, совпадение версий клиентов,
205
205
  фоновый sync и SSE. Один демон обслуживает несколько репозиториев; `root` передаётся при открытии, а
206
- конфиг читается из этого root'а.
206
+ конфиг читается из этого root'а. Клиент в devcontainer передаёт путь рабочей копии на хосте
207
+ (`REVDECK_HOST_ROOT`), а не путь монтирования в контейнере, поэтому демон хоста видит конфиг и правила.
207
208
 
208
209
  ### Скоупы проектов
209
210
 
@@ -349,6 +349,7 @@ argv) или выполняет `revdeck checks <N> --run --yes` на хосте
349
349
  | `REVDECK_RUNTIME_DIR` | каталог сокета (по умолчанию `$XDG_RUNTIME_DIR/revdeck`) |
350
350
  | `REVDECK_URL` + `REVDECK_TOKEN` | подключение к демону по HTTP (контейнер/проброс порта); токен агентский, не UI |
351
351
  | `REVDECK_DEV_CONTAINER=1` | не запускать локальный демон, а подсказать про демон хоста |
352
+ | `REVDECK_HOST_ROOT` | путь рабочей копии на хосте для devcontainer: `revdeck devcontainer --write` ставит `${localWorkspaceFolder}`, клиент в контейнере заменяет на него свой root перед RPC |
352
353
  | `REVDECK_UI_HOST` | хост для `revdeck ui` из контейнера (например, `host.docker.internal`) |
353
354
  | `REVDECK_ROOT` | корень проекта для MCP-сервера |
354
355
  | `REVDECK_FEATURE` | id фичи для MCP-сессии; текущий проект должен быть участником |
@@ -150,6 +150,16 @@ revdeck devcontainer --write # добавить их в .devcontainer/devcontai
150
150
  репозитория подходит всем разработчикам. Чужие mounts, переменные окружения, `runArgs`, комментарии
151
151
  и ключи сохраняются; revdeck управляет только двумя своими mounts и ключами `REVDECK_*`.
152
152
 
153
+ `REVDECK_HOST_ROOT` закрывает разрыв путей между сторонами: демон читает `.revdeck.yml` и документы
154
+ правил на хосте, а контейнер видит ту же рабочую копию в `/workspaces/...`. `--write` записывает
155
+ `${localWorkspaceFolder}`; клиент devcontainer раскрывает его в путь открытой папки на хосте, поэтому
156
+ личный путь не коммитится. Если репозиторий — подпапка открытого workspace, задайте
157
+ `REVDECK_HOST_ROOT` вручную (например, `${localWorkspaceFolder}/subdir`). CLI и MCP-сервер в
158
+ контейнере заменяют свой путь (и пути внутри него) на путь хоста перед `reviews.open`,
159
+ `reviews.remoteList` и `projects.register`. Без этого ревью всё равно открывается (платформенные
160
+ вызовы идут на хосте), но UI показывает автообнаружение и предупреждение «каталог не виден» вместо
161
+ конфига проекта. Ревью, открытые до появления маппинга, хранят путь контейнера — откройте их заново.
162
+
153
163
  Демон создаёт сокет моста при старте. На хосте выполните `revdeck daemon restart`, затем пересоберите
154
164
  контейнер. В контейнере revdeck никогда не запускает свой демон: если сокет недоступен, команда
155
165
  падает с ошибкой `DEVCONTAINER` и подсказкой. `revdeck doctor` не ищет `glab`/`gh` в контейнере.
@@ -164,8 +174,11 @@ revdeck devcontainer --write # добавить их в .devcontainer/devcontai
164
174
  расширения прав агента.
165
175
 
166
176
  `revdeck devcontainer --write` добавляет `REVDECK_*` в MCP-сервер `revdeck` в `.mcp.json` и
167
- `.cursor/mcp.json` внутри репозитория. Пользовательский MCP вне репозитория нужно снабдить теми же
168
- переменными вручную, иначе он может поднять второй демон в контейнере.
177
+ `.cursor/mcp.json` внутри репозитория. Исключение — `REVDECK_HOST_ROOT`: `${localEnv:...}` и
178
+ `${localWorkspaceFolder}` раскрываются только в `devcontainer.json`, поэтому переменная задаётся в
179
+ `containerEnv`/`remoteEnv`, а MCP-сервер наследует её. Пользовательский MCP вне репозитория нужно
180
+ снабдить теми же переменными вручную (`REVDECK_HOST_ROOT` — абсолютным путём), иначе он может поднять
181
+ второй демон в контейнере.
169
182
 
170
183
  Пользователь контейнера должен иметь доступ к сокету моста (сокет `0666` в смонтированном каталоге
171
184
  `0755`; методы ограничены капабилити `read`/`draft`). UI открывается на хосте через `revdeck ui`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdeck",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
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",
@@ -27,7 +27,9 @@
27
27
  "build:ui": "vite build --config ui/vite.config.ts",
28
28
  "prepack": "npm run build",
29
29
  "prepublishOnly": "npm run typecheck && npm test",
30
- "typecheck": "tsc --noEmit && svelte-check --tsconfig ui/tsconfig.json --threshold error",
30
+ "typecheck": "npm run typecheck:server && npm run typecheck:ui",
31
+ "typecheck:server": "node ./node_modules/typescript-7/bin/tsc --noEmit",
32
+ "typecheck:ui": "svelte-check --tsconfig ui/tsconfig.json --threshold error",
31
33
  "test": "vitest run",
32
34
  "test:watch": "vitest",
33
35
  "dev:daemon": "tsx src/daemon/main.ts",
@@ -50,6 +52,7 @@
50
52
  "svelte-check": "^4.5.0",
51
53
  "tsx": "^4.23.15",
52
54
  "typescript": "^6.0.3",
55
+ "typescript-7": "npm:typescript@^7.0.2",
53
56
  "vite": "^8.3.6",
54
57
  "vitest": "^5.1.0"
55
58
  },