revdeck 0.6.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 +66 -1
- package/CONTRIBUTING.md +5 -1
- package/README.md +57 -17
- package/README.ru.md +59 -21
- package/SECURITY.md +1 -1
- package/dist/cli.js +485 -263
- package/dist/cli.js.map +4 -4
- package/dist/daemon.js +428 -121
- package/dist/daemon.js.map +4 -4
- package/dist/mcp.js +76 -28
- package/dist/mcp.js.map +4 -4
- package/dist/ui/assets/index-BIVPy49b.css +1 -0
- package/dist/ui/assets/index-BcvEWwhI.js +18 -0
- package/dist/ui/favicon.svg +8 -3
- package/dist/ui/icon-128.png +0 -0
- package/dist/ui/icon-32.png +0 -0
- package/dist/ui/index.html +4 -2
- package/docs/README.md +3 -0
- package/docs/architecture.md +10 -6
- package/docs/assets/brand/README.md +49 -0
- package/docs/assets/brand/icon-1024.png +0 -0
- package/docs/assets/brand/icon-128.png +0 -0
- package/docs/assets/brand/icon-256.png +0 -0
- package/docs/assets/brand/icon-32.png +0 -0
- package/docs/assets/brand/icon-512.png +0 -0
- package/docs/assets/brand/icon-64.png +0 -0
- package/docs/assets/brand/icon.svg +9 -0
- package/docs/assets/brand/logo-dark.png +0 -0
- package/docs/assets/brand/logo-dark.svg +13 -0
- package/docs/assets/brand/logo.png +0 -0
- package/docs/assets/brand/logo.svg +13 -0
- package/docs/capabilities.md +23 -11
- package/docs/configuration.md +25 -8
- package/docs/integrations.md +30 -16
- package/docs/protocol.md +34 -13
- package/docs/ru/README.md +3 -0
- package/docs/ru/architecture.md +10 -6
- package/docs/ru/capabilities.md +24 -10
- package/docs/ru/configuration.md +21 -6
- package/docs/ru/integrations.md +29 -16
- package/docs/ru/protocol.md +33 -12
- package/docs/ru/threat-model.md +6 -5
- package/docs/threat-model.md +10 -8
- package/package.json +5 -2
- package/skills/revdeck/en/Feedback.md +3 -2
- package/skills/revdeck/en/Review.md +3 -2
- package/skills/revdeck/ru/Feedback.md +3 -2
- package/skills/revdeck/ru/Review.md +2 -2
- package/dist/ui/assets/index-BH0dNFhd.css +0 -1
- package/dist/ui/assets/index-Wz1DYbiv.js +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,72 @@ 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
|
-
## [
|
|
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
|
+
|
|
26
|
+
## [0.7.0] - 2026-11-18
|
|
27
|
+
|
|
28
|
+
### Security
|
|
29
|
+
|
|
30
|
+
- The devcontainer bridge is agent-scoped: only `read`/`draft` RPC methods are allowed; `publish.approve`,
|
|
31
|
+
`publish.commit`, `checks.run`, decisions, platform writes, review removal and feature/project
|
|
32
|
+
administration return `CAPABILITY`. The bridge info file contains an agent-scoped token, never the
|
|
33
|
+
UI token; HTTP `/api/rpc` accepts it with read/draft only, and all UI `/api/*` endpoints reject it.
|
|
34
|
+
The CLI refuses `--run --yes` and `--yes` for publish inside a devcontainer. Bridge protocol is
|
|
35
|
+
now version 2.
|
|
36
|
+
- Rule and `context.sources` documents must be git-tracked, have a safe extension and are denied for
|
|
37
|
+
local secrets (`.env*`, `.git/**`, `.npmrc`, `.revdeck.local.*`, keys). A tracked
|
|
38
|
+
`.revdeck.local.yml` is ignored as a repository file. File reads verify the opened fd's realpath
|
|
39
|
+
inside the repository, closing a parent-symlink TOCTOU.
|
|
40
|
+
- Feature note authors are set by the server: the bridge always writes `agent` notes and may change or
|
|
41
|
+
delete only agent-authored notes; `notes.update` ignores server-only publication fields on the
|
|
42
|
+
bridge.
|
|
43
|
+
- The checks confirmation in the UI shows the full argv; `revdeck checks` prints the commands before
|
|
44
|
+
execution.
|
|
45
|
+
- Malformed Cookie headers and request targets now return `400` instead of terminating the daemon.
|
|
46
|
+
- Documentation (English and Russian) is updated for capabilities, bridge tokens, human-only checks,
|
|
47
|
+
document policy, project management and the command reference.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- Development dependencies: Vite 8.3.8 and Playwright Core 1.65.1. TypeScript 7.0.2 from the
|
|
52
|
+
Dependabot development update is deferred: svelte-check 4.x requires TypeScript 5/6, so the bump
|
|
53
|
+
would break `npm run typecheck`; it needs the dual TS6/TS7 `--tsgo` setup separately.
|
|
54
|
+
|
|
55
|
+
### Added
|
|
56
|
+
|
|
57
|
+
- `revdeck init --provider gitlab|github|auto`; generated configs now use the git-remote platform and
|
|
58
|
+
fall back to `gitlab` when the host is not recognized (default for self-hosted GitLab).
|
|
59
|
+
- Project management in the UI: add a project from the projects home or switcher, edit its display
|
|
60
|
+
title and working-copy roots, and delete a project with its cached reviews (`projects.update`,
|
|
61
|
+
`projects.remove`, `/api/projects/update`, `/api/projects/remove`, `project` SSE event). Deleting
|
|
62
|
+
never touches the platform.
|
|
63
|
+
- Command reference page (`#/help`): searchable CLI commands, examples, common flags and UI
|
|
64
|
+
shortcuts with click-to-copy; reachable from the sidebar, the command palette and `h`.
|
|
65
|
+
- Brand assets: logo and icon variants in `docs/assets/brand`, a dark-mode README logo, a documentation index icon, UI favicon/Apple touch icons and the sidebar mark.
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- The sidebar can be reopened from every view when it was collapsed before a review was selected;
|
|
70
|
+
the floating menu button is no longer mobile-only.
|
|
71
|
+
- The projects header no longer leaves “Open review” on its own wrapped line: search and actions stay
|
|
72
|
+
together, and the whole action group moves below the intro at narrow widths.
|
|
8
73
|
|
|
9
74
|
## [0.6.0] - 2026-11-16
|
|
10
75
|
|
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
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/brand/logo-dark.svg">
|
|
4
|
+
<img src="docs/assets/brand/logo.svg" alt="revdeck" width="360">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
1
8
|
# revdeck
|
|
2
9
|
|
|
3
10
|
[](https://www.npmjs.com/package/revdeck)
|
|
@@ -21,9 +28,14 @@ and a web UI. Platform tokens stay on the host.
|
|
|
21
28
|
sections (`AGENTS.md`, architecture, style guides, ADRs). The agent gets a deterministic, size-limited
|
|
22
29
|
context instead of generic “review this PR” instructions.
|
|
23
30
|
- **Humans publish.** The agent writes drafts. The UI shows exactly what will be posted; publishing is
|
|
24
|
-
bound to a hash of the plan and is idempotent.
|
|
31
|
+
bound to a hash of the plan and is idempotent. The devcontainer bridge has no `publish.approve` or
|
|
32
|
+
`publish.commit`: only the human UI or the host CLI can create and execute an approval.
|
|
25
33
|
- **Tokens never reach the agent.** The daemon calls `glab`/`gh` on the host and scrubs platform tokens
|
|
26
|
-
from child environments. A sandboxed agent only gets an RPC
|
|
34
|
+
from child environments. A sandboxed agent only gets an RPC with read/draft capabilities; the UI
|
|
35
|
+
token is not mounted into the container.
|
|
36
|
+
- **Documents are repository files, not local secrets.** Rule and profile documents must be tracked by
|
|
37
|
+
git, have a safe extension and are not read from `.env`, `.git/config`, `.npmrc` or
|
|
38
|
+
`.revdeck.local.yml`.
|
|
27
39
|
- **GitLab and GitHub.** One model: MR/PR, threads, diff, resolve, reactions, line comments, attachments.
|
|
28
40
|
- **Many projects, separated contexts.** A project is a repository. The UI switches between projects and
|
|
29
41
|
shows only the current one's reviews; an MCP server is scoped to its repository.
|
|
@@ -67,7 +79,9 @@ revdeck open 42 # load an MR/PR
|
|
|
67
79
|
revdeck ui # open the local UI
|
|
68
80
|
```
|
|
69
81
|
|
|
70
|
-
`init`
|
|
82
|
+
`init` writes `provider.type` from the git remote and falls back to `gitlab` when the host is not
|
|
83
|
+
recognized (typical for self-hosted GitLab). Override it with `--provider gitlab|github|auto`.
|
|
84
|
+
It never overwrites an existing config without `--force`, and it merges `.mcp.json` instead of
|
|
71
85
|
replacing it. `revdeck eject` is the inverse: it removes the config, installed skills and command files,
|
|
72
86
|
the `revdeck` MCP entry and the local `.revdeck/` cache, leaving foreign files and other MCP servers
|
|
73
87
|
untouched. It only shows the plan by default; add `--yes` to apply (`--keep-config` keeps
|
|
@@ -104,7 +118,7 @@ Russian READMEs live in this repository; translation fixes are welcome.
|
|
|
104
118
|
|
|
105
119
|
| Command | What it does |
|
|
106
120
|
|---|---|
|
|
107
|
-
| `revdeck init` | config, harness adapters, MCP |
|
|
121
|
+
| `revdeck init [--provider gitlab/github/auto]` | config, harness adapters, MCP |
|
|
108
122
|
| `revdeck eject [--yes]` | remove revdeck-owned config, adapters and MCP entry |
|
|
109
123
|
| `revdeck devcontainer [--write]` | mount the host daemon socket/state into a devcontainer |
|
|
110
124
|
| `revdeck doctor` | environment, `glab`/`gh` auth, daemon, adapters |
|
|
@@ -137,6 +151,11 @@ A project is a repository. revdeck keeps a project registry (`projects`, `projec
|
|
|
137
151
|
reviews. The daemon still runs as one process with one SQLite database; project separation is about
|
|
138
152
|
context, not tenants.
|
|
139
153
|
|
|
154
|
+
Projects are managed in the projects home: **Add project** registers a working copy
|
|
155
|
+
(`revdeck projects add <path>` works too), **Edit** changes the display title and the list of
|
|
156
|
+
working-copy roots, and **Delete** removes the project and its cached reviews from revdeck. Deleting
|
|
157
|
+
never touches MRs/PRs or comments on the platform.
|
|
158
|
+
|
|
140
159
|
Each repository's MCP server resolves its project from the working copy and lists only that project.
|
|
141
160
|
An id or URL from another project is rejected with a hint to open a separate session. Devcontainers and
|
|
142
161
|
separate agent sessions work naturally: each container mounts the same host daemon bridge and stays
|
|
@@ -173,8 +192,9 @@ See [capabilities](docs/capabilities.md#features).
|
|
|
173
192
|
|
|
174
193
|
UI shortcuts: `1`–`5` switch tabs, `o` opens a review, `r` refreshes, `s` hides/shows the
|
|
175
194
|
sidebar, `p` opens the project switcher (or publishing when a plan is ready), `?` opens the command
|
|
176
|
-
palette. The sidebar
|
|
177
|
-
|
|
195
|
+
palette, `h` opens the command reference. The sidebar has a **Command reference** link (`#/help`) with
|
|
196
|
+
searchable CLI usage, common flags and UI shortcuts; click a command to copy it. The sidebar and the
|
|
197
|
+
active project are stored in `localStorage`.
|
|
178
198
|
|
|
179
199
|
The UI shows the MR/PR description, supports deep links to threads, findings and diff lines (with
|
|
180
200
|
working browser Back/Forward), and keeps a per-review "viewed" state and file filter in the diff.
|
|
@@ -253,12 +273,21 @@ revdeck devcontainer --write # merge them into .devcontainer/devcontainer.json
|
|
|
253
273
|
```
|
|
254
274
|
|
|
255
275
|
The command mounts the stable host bridge `~/.local/state/revdeck/devcontainer/run` at `/run/revdeck`
|
|
256
|
-
(socket) and `~/.local/state/revdeck/devcontainer/state` at `/var/lib/revdeck` (read-only
|
|
257
|
-
`daemon.json`), and sets `REVDECK_RUNTIME_DIR`, `REVDECK_STATE_DIR`,
|
|
258
|
-
`REVDECK_UI_HOST`. The JSON uses `${localEnv:HOME}${localEnv:USERPROFILE}` instead of an absolute
|
|
276
|
+
(agent-scoped socket) and `~/.local/state/revdeck/devcontainer/state` at `/var/lib/revdeck` (read-only
|
|
277
|
+
info `daemon.json` without the UI token), and sets `REVDECK_RUNTIME_DIR`, `REVDECK_STATE_DIR`,
|
|
278
|
+
`REVDECK_DEV_CONTAINER=1` and `REVDECK_UI_HOST`. The JSON uses `${localEnv:HOME}${localEnv:USERPROFILE}` instead of an absolute
|
|
259
279
|
home path, so the same `.devcontainer/devcontainer.json` works for every developer. Comments and
|
|
260
280
|
foreign keys in an existing JSONC file are preserved.
|
|
261
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
|
+
|
|
262
291
|
The daemon creates the bridge socket on startup, so on the host run `revdeck daemon restart`, then
|
|
263
292
|
rebuild the container. Inside the container revdeck never starts a local daemon, so `gh`/`glab` are
|
|
264
293
|
never invoked there; if the host socket is missing it fails with a clear `DEVCONTAINER` error.
|
|
@@ -294,8 +323,9 @@ Tools: `revdeck_status`, `revdeck_list`, `revdeck_open`, `revdeck_context`, `rev
|
|
|
294
323
|
`revdeck_set_summary`, `revdeck_notes`, `revdeck_feature`, `revdeck_feature_note`,
|
|
295
324
|
`revdeck_publish_preview`, `revdeck_publish`.
|
|
296
325
|
|
|
297
|
-
Publishing requires an `approval_id`
|
|
298
|
-
does not create one. Prompts `review-mr`, `close-feedback` and
|
|
326
|
+
Publishing requires an `approval_id` created by the human UI or the host CLI. The agent bridge has no
|
|
327
|
+
`publish.approve`, and the MCP tool does not create one. Prompts `review-mr`, `close-feedback` and
|
|
328
|
+
`review-feature` are available in
|
|
299
329
|
clients that support MCP prompts.
|
|
300
330
|
|
|
301
331
|
Harness matrix and slash commands: [docs/integrations.md](docs/integrations.md).
|
|
@@ -303,8 +333,9 @@ Harness matrix and slash commands: [docs/integrations.md](docs/integrations.md).
|
|
|
303
333
|
## Rules
|
|
304
334
|
|
|
305
335
|
`.revdeck.yml` at the repository root; personal overrides go to `.revdeck.local.yml` (ignored by git and
|
|
306
|
-
added by `init`).
|
|
307
|
-
|
|
336
|
+
added by `init`). If `.revdeck.local.yml` is tracked by git, it came from the repository and is ignored
|
|
337
|
+
as personal overrides. Local objects merge recursively, local arrays replace, and a base
|
|
338
|
+
`review.readOnly` cannot be disabled locally.
|
|
308
339
|
|
|
309
340
|
```yaml
|
|
310
341
|
version: 1
|
|
@@ -340,10 +371,19 @@ found. Full schema: [docs/configuration.md](docs/configuration.md).
|
|
|
340
371
|
|
|
341
372
|
## Security
|
|
342
373
|
|
|
343
|
-
- The daemon listens on loopback and a unix socket (0600). The
|
|
344
|
-
`
|
|
374
|
+
- The daemon listens on loopback and a unix socket (0600). The devcontainer bridge exposes only the
|
|
375
|
+
`read`/`draft` capability set; `publish.*`, `checks.run`, decisions, platform writes and
|
|
376
|
+
feature/project administration return `CAPABILITY`. The UI token stays on the host and is not
|
|
377
|
+
mounted into the container.
|
|
378
|
+
- The UI uses a launch token (rotated with the daemon), an `HttpOnly`/`SameSite=Strict` cookie,
|
|
379
|
+
`Host`/`Origin` checks and CSP.
|
|
345
380
|
- `glab`/`gh` run without a shell, with `cwd` outside the working copy and a scrubbed environment;
|
|
346
381
|
secrets are redacted from logs and errors.
|
|
382
|
+
- Rule/profile documents must be git-tracked, have a safe extension and are denied for local secrets
|
|
383
|
+
(`.env*`, `.git/**`, `.npmrc`, `.revdeck.local.*`, keys); `.revdeck.local.yml` tracked by git is
|
|
384
|
+
ignored as a repository file. Reads use an opened-fd realpath check to close symlink TOCTOU.
|
|
385
|
+
- Checks are planned by the agent and run by a human in the UI or the host CLI. The bridge denies
|
|
386
|
+
`checks.run`; the CLI refuses `--run --yes` inside a devcontainer.
|
|
347
387
|
- Comments are checked for GitLab quick actions, HTML, hidden/bidi characters, mass mentions and
|
|
348
388
|
external images (only uploads from the platform host are allowed).
|
|
349
389
|
- Review text is untrusted data; agent instructions say so explicitly.
|
|
@@ -371,7 +411,7 @@ More: [docs/architecture.md](docs/architecture.md), [docs/protocol.md](docs/prot
|
|
|
371
411
|
|
|
372
412
|
```bash
|
|
373
413
|
npm ci
|
|
374
|
-
npm run typecheck #
|
|
414
|
+
npm run typecheck # TypeScript 7 (server) + svelte-check (TS 6)
|
|
375
415
|
npm test # vitest
|
|
376
416
|
npm run build # dist/cli.js, dist/daemon.js, dist/mcp.js, dist/ui
|
|
377
417
|
npm run dev:daemon # daemon from source
|
|
@@ -384,7 +424,7 @@ Provider tests use recorded CLI responses and need no network. See [CONTRIBUTING
|
|
|
384
424
|
|
|
385
425
|
- Publishing uses regular comments; native drafts (GitLab draft notes, GitHub pending review) are not
|
|
386
426
|
used yet, though the provider interface is ready.
|
|
387
|
-
- Project checks are planned by the agent;
|
|
427
|
+
- Project checks are planned by the agent; a human runs them in the UI or the host CLI (`revdeck checks --run --yes`); the bridge denies `checks.run`.
|
|
388
428
|
- The UI opens a review from the **Open review** dialog; the working-copy root is required so the daemon
|
|
389
429
|
can read `.revdeck.yml`.
|
|
390
430
|
- Thread resolution is in the thread card; the **Close thread** button records the resolve intent and
|
package/README.ru.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/brand/logo-dark.svg">
|
|
4
|
+
<img src="docs/assets/brand/logo.svg" alt="revdeck" width="360">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
1
8
|
# revdeck
|
|
2
9
|
|
|
3
10
|
[English](README.md) | Русский · [Документация](docs/ru/README.md)
|
|
@@ -21,10 +28,14 @@
|
|
|
21
28
|
а не «отревьюй PR по best practices».
|
|
22
29
|
- **Публикация только человеком.** Агент пишет черновики ответов и замечаний. В UI видно ровно то, что
|
|
23
30
|
уйдёт в платформу; публикация выполняется по подтверждению, привязанному к хешу плана, и повторно
|
|
24
|
-
не отправляет уже отправленное.
|
|
31
|
+
не отправляет уже отправленное. У моста devcontainer нет `publish.approve`/`publish.commit`:
|
|
32
|
+
подтверждение создаёт и выполняет человек в UI или CLI на хосте.
|
|
25
33
|
- **Токены не уезжают агенту.** Демон вызывает `glab`/`gh` на хосте и вычищает токены из окружения
|
|
26
|
-
дочерних процессов. Агент в песочнице получает
|
|
27
|
-
|
|
34
|
+
дочерних процессов. Агент в песочнице получает RPC с правами read/draft; токен UI в контейнер не
|
|
35
|
+
монтируется.
|
|
36
|
+
- **Документы — это файлы репозитория, а не локальные секреты.** Правила и профили читаются только
|
|
37
|
+
из git-отслеживаемых файлов безопасного типа; `.env`, `.git/config`, `.npmrc` и
|
|
38
|
+
`.revdeck.local.yml` запрещены.
|
|
28
39
|
- **GitLab и GitHub.** Одна модель: MR/PR, треды, diff, резолв, реакции, комментарии к строкам, вложения.
|
|
29
40
|
- **Много проектов, раздельные контексты.** Проект — это репозиторий. UI переключается между
|
|
30
41
|
проектами и показывает только ревью текущего; MCP-сервер привязан к своему репозиторию.
|
|
@@ -55,13 +66,15 @@ revdeck open 42 # открыть MR/PR по номеру
|
|
|
55
66
|
revdeck ui # ссылка на локальный интерфейс
|
|
56
67
|
```
|
|
57
68
|
|
|
58
|
-
`revdeck init`
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
`revdeck init` пишет `provider.type` из git remote; если хост не распознан (обычный случай для
|
|
70
|
+
self-hosted GitLab), по умолчанию выбирается `gitlab`. Переопределить можно через
|
|
71
|
+
`--provider gitlab|github|auto`. Команда не перезаписывает существующий конфиг без `--force` и не
|
|
72
|
+
трогает чужие ключи в `.mcp.json`. Обратная операция — `revdeck eject`: удаляет конфиг, установленные
|
|
73
|
+
скиллы и файлы команд, запись `revdeck` в MCP и локальный кеш `.revdeck/`, не трогая чужие файлы и
|
|
74
|
+
другие MCP-серверы. По умолчанию команда только показывает план; применить — с `--yes`
|
|
75
|
+
(`--keep-config` оставляет `.revdeck.yml`). Автозапуск демона при входе в систему —
|
|
76
|
+
`revdeck daemon install`: создаёт systemd user unit (Linux) или launchd plist (macOS) и печатает
|
|
77
|
+
команду включения. Для автозапуска ставьте пакет глобально: путь в кеше `npx` может быть очищен.
|
|
65
78
|
|
|
66
79
|
Если `glab` работает в шелле, а обновление в UI падает с `spawn glab ENOENT`, у демона другой `PATH`
|
|
67
80
|
(так часто бывает у systemd/launchd). Запустите `revdeck doctor`: он покажет путь, который видит
|
|
@@ -89,7 +102,7 @@ revdeck ui # ссылка на локальный интерфейс
|
|
|
89
102
|
|
|
90
103
|
| Команда | Что делает |
|
|
91
104
|
|---|---|
|
|
92
|
-
| `revdeck init` | конфиг, адаптеры, MCP |
|
|
105
|
+
| `revdeck init [--provider gitlab/github/auto]` | конфиг, адаптеры, MCP |
|
|
93
106
|
| `revdeck eject [--yes]` | удалить конфиг, адаптеры и MCP-запись revdeck |
|
|
94
107
|
| `revdeck devcontainer [--write]` | смонтировать сокет/state демона хоста в devcontainer |
|
|
95
108
|
| `revdeck doctor` | окружение, `glab`/`gh`, демон, адаптеры |
|
|
@@ -122,6 +135,11 @@ revdeck ui # ссылка на локальный интерфейс
|
|
|
122
135
|
текущего. Демон по-прежнему один процесс с одной SQLite; разделение проектов — про контекст, а не
|
|
123
136
|
про тенантов.
|
|
124
137
|
|
|
138
|
+
Проектами управляют на домашнем экране проектов: **Добавить проект** регистрирует рабочую копию
|
|
139
|
+
(альтернатива — `revdeck projects add <path>`), **Изменить** меняет отображаемое название и список
|
|
140
|
+
root'ов рабочих копий, **Удалить** убирает проект и его локальные ревью из revdeck. MR/PR и
|
|
141
|
+
комментарии на платформе при удалении не затрагиваются.
|
|
142
|
+
|
|
125
143
|
MCP-сервер каждого репозитория определяет свой проект по рабочей копии и показывает только его.
|
|
126
144
|
Id или URL чужого проекта отклоняется с подсказкой открыть отдельную сессию. Devcontainer'ы и
|
|
127
145
|
отдельные сессии агента работают естественно: каждый контейнер монтирует общий мост к демону хоста
|
|
@@ -158,7 +176,9 @@ MCP-сервер из репозитория-участника с `REVDECK_FEAT
|
|
|
158
176
|
|
|
159
177
|
Горячие клавиши UI: `1`–`5` переключают вкладки, `o` открывает ревью, `r` обновляет, `s`
|
|
160
178
|
скрывает/показывает сайдбар, `p` открывает переключатель проектов (или публикацию, если готов
|
|
161
|
-
план), `?` — палитру
|
|
179
|
+
план), `?` — палитру команд, `h` — справку по командам. В сайдбаре есть ссылка **Справка по
|
|
180
|
+
командам** (`#/help`) с поиском по CLI, общими флагами и горячими клавишами; клик по команде
|
|
181
|
+
копирует её. Выбор сайдбара и активный проект запоминаются в `localStorage`.
|
|
162
182
|
|
|
163
183
|
UI показывает описание MR/PR, поддерживает deep links на треды, замечания и строки diff (с рабочей
|
|
164
184
|
кнопкой «назад»), а в diff — фильтр файлов и отметку «просмотрено» для каждого ревью. Ревью можно убрать
|
|
@@ -238,12 +258,21 @@ revdeck devcontainer --write # добавить их в .devcontainer/devcontai
|
|
|
238
258
|
```
|
|
239
259
|
|
|
240
260
|
Команда монтирует стабильный мост хоста `~/.local/state/revdeck/devcontainer/run` в `/run/revdeck`
|
|
241
|
-
(сокет) и `~/.local/state/revdeck/devcontainer/state` в `/var/lib/revdeck` (только чтение,
|
|
242
|
-
|
|
243
|
-
`REVDECK_UI_HOST`. В JSON пишется `${localEnv:HOME}${localEnv:USERPROFILE}`, а не абсолютный домашний
|
|
261
|
+
(агентский сокет) и `~/.local/state/revdeck/devcontainer/state` в `/var/lib/revdeck` (только чтение,
|
|
262
|
+
info-`daemon.json` без токена UI) и выставляет `REVDECK_RUNTIME_DIR`, `REVDECK_STATE_DIR`,
|
|
263
|
+
`REVDECK_DEV_CONTAINER=1` и `REVDECK_UI_HOST`. В JSON пишется `${localEnv:HOME}${localEnv:USERPROFILE}`, а не абсолютный домашний
|
|
244
264
|
путь, поэтому один `.devcontainer/devcontainer.json` работает у всех разработчиков. Комментарии и
|
|
245
265
|
чужие ключи в существующем JSONC сохраняются.
|
|
246
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
|
+
|
|
247
276
|
Демон создаёт сокет моста при старте: на хосте выполните `revdeck daemon restart`, затем пересоберите
|
|
248
277
|
контейнер. В контейнере revdeck никогда не запускает свой демон, поэтому `gh`/`glab` там не
|
|
249
278
|
вызываются; если сокет хоста недоступен, команда падает с понятной ошибкой `DEVCONTAINER`.
|
|
@@ -278,7 +307,7 @@ HTTP: достаточно `revdeck daemon restart`, потому что `daemon
|
|
|
278
307
|
`revdeck_threads`, `revdeck_diff`, `revdeck_rules`, `revdeck_draft_reply`,
|
|
279
308
|
`revdeck_draft_findings`, `revdeck_set_summary`, `revdeck_notes`, `revdeck_feature`,
|
|
280
309
|
`revdeck_feature_note`, `revdeck_publish_preview`, `revdeck_publish`. Публикация требует
|
|
281
|
-
`approval_id`, который
|
|
310
|
+
`approval_id`, который создаёт человек в UI или CLI на хосте; у моста агента нет `publish.approve`.
|
|
282
311
|
|
|
283
312
|
Промпты `review-mr`, `close-feedback` и `review-feature` доступны в клиентах, поддерживающих
|
|
284
313
|
MCP prompts. В харнессах без MCP используйте CLI — возможности те же. Матрица адаптеров и `/`-команд: [docs/ru/integrations.md](docs/ru/integrations.md).
|
|
@@ -325,12 +354,21 @@ revdeck ищет `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md` и `docs/*` и пр
|
|
|
325
354
|
|
|
326
355
|
## Безопасность
|
|
327
356
|
|
|
328
|
-
- Демон слушает только loopback и unix-сокет (0600)
|
|
329
|
-
`
|
|
357
|
+
- Демон слушает только loopback и unix-сокет (0600). Мост devcontainer даёт только права
|
|
358
|
+
`read`/`draft`; `publish.*`, `checks.run`, решения, записи в платформу и администрирование
|
|
359
|
+
фич/проектов возвращают `CAPABILITY`. Токен UI остаётся на хосте и в контейнер не монтируется.
|
|
360
|
+
- UI использует launch-токен (меняется при перезапуске демона), cookie `HttpOnly`/`SameSite=Strict`,
|
|
361
|
+
проверку `Host`/`Origin` и CSP.
|
|
330
362
|
- `glab`/`gh` вызываются без shell, с `cwd` вне рабочей копии и вычищенным окружением; секреты
|
|
331
363
|
редактируются в логах и ошибках.
|
|
364
|
+
- Документы правил/профилей должны быть отслеживаемы git, иметь безопасное расширение и не быть
|
|
365
|
+
локальным секретом (`.env*`, `.git/**`, `.npmrc`, `.revdeck.local.*`, ключи); `.revdeck.local.yml`,
|
|
366
|
+
отслеживаемый git, игнорируется как файл репозитория. Чтение проверяет realpath уже открытого fd,
|
|
367
|
+
чтобы закрыть symlink-TOCTOU.
|
|
368
|
+
- Проверки планирует агент, запускает человек в UI или CLI на хосте. Мост запрещает `checks.run`;
|
|
369
|
+
CLI в devcontainer отказывает `--run --yes`.
|
|
332
370
|
- Комментарии проверяются на быстрые команды GitLab, HTML, скрытые/bidi-символы, `@all` и внешние
|
|
333
|
-
|
|
371
|
+
картинки (разрешены только загрузки с хоста платформы).
|
|
334
372
|
- Текст MR — недоверенные данные; агентские инструкции это оговаривают.
|
|
335
373
|
|
|
336
374
|
Подробно: [docs/ru/threat-model.md](docs/ru/threat-model.md). Гарантия формулируется так: токен не
|
|
@@ -356,7 +394,7 @@ revdeck ищет `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md` и `docs/*` и пр
|
|
|
356
394
|
|
|
357
395
|
```bash
|
|
358
396
|
npm install
|
|
359
|
-
npm run typecheck #
|
|
397
|
+
npm run typecheck # TypeScript 7 (сервер) + svelte-check (TS 6)
|
|
360
398
|
npm test # vitest
|
|
361
399
|
npm run build # dist/cli.js, dist/daemon.js, dist/mcp.js, dist/ui
|
|
362
400
|
```
|
|
@@ -368,7 +406,7 @@ npm run build # dist/cli.js, dist/daemon.js, dist/mcp.js, dist/ui
|
|
|
368
406
|
|
|
369
407
|
- Публикация идёт обычными комментариями; native drafts (GitLab draft notes, GitHub pending review)
|
|
370
408
|
ещё не используются, хотя провайдеры к этому готовы.
|
|
371
|
-
- Проверки проекта агент только планирует; запуск — `revdeck checks --run --yes
|
|
409
|
+
- Проверки проекта агент только планирует; запуск — человек в UI или `revdeck checks --run --yes` на хосте (в контейнере CLI откажет).
|
|
372
410
|
- UI открывает ревью через диалог **Открыть ревью**; нужен корень рабочей копии, чтобы демон
|
|
373
411
|
прочитал `.revdeck.yml`.
|
|
374
412
|
- Резолв тредов есть в карточке треда; кнопка **Закрыть тред** записывает намерение закрыть и открывает
|