revdeck 0.5.0 → 0.7.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 +105 -2
- package/README.md +102 -22
- package/README.ru.md +105 -29
- package/SECURITY.md +1 -1
- package/dist/cli.js +1484 -593
- package/dist/cli.js.map +4 -4
- package/dist/daemon.js +1768 -283
- package/dist/daemon.js.map +4 -4
- package/dist/mcp.js +980 -117
- 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 +4 -1
- package/docs/architecture.md +60 -11
- 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 +238 -0
- package/docs/configuration.md +87 -8
- package/docs/integrations.md +52 -14
- package/docs/protocol.md +85 -14
- package/docs/ru/README.md +4 -1
- package/docs/ru/architecture.md +60 -10
- package/docs/ru/capabilities.md +240 -0
- package/docs/ru/configuration.md +74 -6
- package/docs/ru/integrations.md +52 -14
- package/docs/ru/protocol.md +83 -13
- package/docs/ru/threat-model.md +34 -5
- package/docs/screenshot.png +0 -0
- package/docs/screenshot.ru.png +0 -0
- package/docs/threat-model.md +36 -5
- package/examples/analytics-platform.yml +40 -0
- package/examples/monorepo.yml +1 -1
- package/package.json +1 -1
- package/skills/revdeck/en/Feature.md +61 -0
- package/skills/revdeck/en/Feedback.md +3 -2
- package/skills/revdeck/en/Review.md +3 -2
- package/skills/revdeck/en/SKILL.md +17 -1
- package/skills/revdeck/ru/Feature.md +61 -0
- package/skills/revdeck/ru/Feedback.md +3 -2
- package/skills/revdeck/ru/Review.md +2 -2
- package/skills/revdeck/ru/SKILL.md +18 -1
- package/dist/ui/assets/index-CcmcJhhu.css +0 -1
- package/dist/ui/assets/index-CuvK5owY.js +0 -10
- package/docs/adr/0001-daemon-first.md +0 -65
- package/docs/ru/adr/0001-daemon-first.md +0 -63
- package/examples/web-chat-core.yml +0 -45
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,110 @@ 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.7.0] - 2026-11-18
|
|
8
|
+
|
|
9
|
+
### Security
|
|
10
|
+
|
|
11
|
+
- The devcontainer bridge is agent-scoped: only `read`/`draft` RPC methods are allowed; `publish.approve`,
|
|
12
|
+
`publish.commit`, `checks.run`, decisions, platform writes, review removal and feature/project
|
|
13
|
+
administration return `CAPABILITY`. The bridge info file contains an agent-scoped token, never the
|
|
14
|
+
UI token; HTTP `/api/rpc` accepts it with read/draft only, and all UI `/api/*` endpoints reject it.
|
|
15
|
+
The CLI refuses `--run --yes` and `--yes` for publish inside a devcontainer. Bridge protocol is
|
|
16
|
+
now version 2.
|
|
17
|
+
- Rule and `context.sources` documents must be git-tracked, have a safe extension and are denied for
|
|
18
|
+
local secrets (`.env*`, `.git/**`, `.npmrc`, `.revdeck.local.*`, keys). A tracked
|
|
19
|
+
`.revdeck.local.yml` is ignored as a repository file. File reads verify the opened fd's realpath
|
|
20
|
+
inside the repository, closing a parent-symlink TOCTOU.
|
|
21
|
+
- Feature note authors are set by the server: the bridge always writes `agent` notes and may change or
|
|
22
|
+
delete only agent-authored notes; `notes.update` ignores server-only publication fields on the
|
|
23
|
+
bridge.
|
|
24
|
+
- The checks confirmation in the UI shows the full argv; `revdeck checks` prints the commands before
|
|
25
|
+
execution.
|
|
26
|
+
- Malformed Cookie headers and request targets now return `400` instead of terminating the daemon.
|
|
27
|
+
- Documentation (English and Russian) is updated for capabilities, bridge tokens, human-only checks,
|
|
28
|
+
document policy, project management and the command reference.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Development dependencies: Vite 8.3.8 and Playwright Core 1.65.1. TypeScript 7.0.2 from the
|
|
33
|
+
Dependabot development update is deferred: svelte-check 4.x requires TypeScript 5/6, so the bump
|
|
34
|
+
would break `npm run typecheck`; it needs the dual TS6/TS7 `--tsgo` setup separately.
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- `revdeck init --provider gitlab|github|auto`; generated configs now use the git-remote platform and
|
|
39
|
+
fall back to `gitlab` when the host is not recognized (default for self-hosted GitLab).
|
|
40
|
+
- Project management in the UI: add a project from the projects home or switcher, edit its display
|
|
41
|
+
title and working-copy roots, and delete a project with its cached reviews (`projects.update`,
|
|
42
|
+
`projects.remove`, `/api/projects/update`, `/api/projects/remove`, `project` SSE event). Deleting
|
|
43
|
+
never touches the platform.
|
|
44
|
+
- Command reference page (`#/help`): searchable CLI commands, examples, common flags and UI
|
|
45
|
+
shortcuts with click-to-copy; reachable from the sidebar, the command palette and `h`.
|
|
46
|
+
- 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.
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- The sidebar can be reopened from every view when it was collapsed before a review was selected;
|
|
51
|
+
the floating menu button is no longer mobile-only.
|
|
52
|
+
- The projects header no longer leaves “Open review” on its own wrapped line: search and actions stay
|
|
53
|
+
together, and the whole action group moves below the intro at narrow widths.
|
|
54
|
+
|
|
55
|
+
## [0.6.0] - 2026-11-16
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
|
|
59
|
+
- Cross-project features: human-created bundles of reviews with a Markdown brief/contract, roles and
|
|
60
|
+
order (`features`, `feature_reviews`), combined read-only context, and feature UI (`#/features`,
|
|
61
|
+
review badges, add-to-feature flow).
|
|
62
|
+
- Feature-scoped MCP sessions via `REVDECK_FEATURE`: only feature members are visible; drafts may be
|
|
63
|
+
written to any member, while publishing remains per review and requires human approval.
|
|
64
|
+
- Feature-level contract (Markdown or OpenAPI): OpenAPI is parsed into operations, parameters,
|
|
65
|
+
request bodies, responses and schemas; context marks which changed reviews mention each operation.
|
|
66
|
+
- Application profiles via `context.sources` / `context.maxBytes` in `.revdeck.yml`, included per
|
|
67
|
+
project in the feature context.
|
|
68
|
+
- Feature notes/findings: stored on the feature, visible in UI/context, writable by humans and by an
|
|
69
|
+
agent in a feature session (`revdeck_feature_note`); never published.
|
|
70
|
+
- Feature UI reorder (up/down) and delete, plus contract and notes editors.
|
|
71
|
+
- `revdeck_feature` MCP tool and `review-feature` prompt; `revdeck feature list|create|get|add|remove|context|update|archive|delete`.
|
|
72
|
+
- Capabilities and design documentation for features in English and Russian.
|
|
73
|
+
- Removing a tracked review that belongs to a feature is blocked until it is removed from the feature.
|
|
74
|
+
- Project separation: a `projects` registry with working-copy roots, a normalized
|
|
75
|
+
`platform:host/project` key and a `reviews.project_key` column; existing databases are backfilled.
|
|
76
|
+
- Project switcher and projects home in the UI; the review queue is scoped to the selected project
|
|
77
|
+
and the choice is kept in the URL and local storage.
|
|
78
|
+
- Project-scoped MCP server: it resolves the project from the repository root, lists only that
|
|
79
|
+
project and rejects review ids/URLs from other projects. `REVDECK_ROOT` supports multi-root
|
|
80
|
+
workspaces and devcontainers.
|
|
81
|
+
- `revdeck projects` and `revdeck projects add <path>`; `revdeck list --all` for a human-wide list.
|
|
82
|
+
- Project-isolation documentation (capabilities, architecture, protocol, configuration, integrations,
|
|
83
|
+
threat model) in English and Russian.
|
|
84
|
+
|
|
85
|
+
### Fixed
|
|
86
|
+
|
|
87
|
+
- Config, rules and profile reads now resolve real paths and reject symlinked files or directories
|
|
88
|
+
that escape the repository; all reads use `O_NOFOLLOW` for the final component.
|
|
89
|
+
- Feature notes written by an agent can only be updated/deleted by MCP when they were authored by an
|
|
90
|
+
agent; human notes are read-only to MCP. Notes and profiles are quoted as data in feature context.
|
|
91
|
+
- Feature-context `maxBytes` is now a real cap (including brief, contract, profiles, notes and review
|
|
92
|
+
sections); `context.maxBytes` is an aggregate per-project profile limit.
|
|
93
|
+
- A review URL from another configured project is rejected when opened from the wrong checkout.
|
|
94
|
+
- Feature member roles can be cleared; reorder rejects duplicate ids; up/down arrows move within the
|
|
95
|
+
visible project group.
|
|
96
|
+
- UI navigation uses `pushState` for user transitions, ignores stale feature/review requests, resets
|
|
97
|
+
feature-local forms when switching features, refreshes an open feature page on SSE, and exposes the
|
|
98
|
+
sidebar on mobile project/feature pages.
|
|
99
|
+
- Feature badges and the active sidebar row use theme variables in dark mode.
|
|
100
|
+
|
|
101
|
+
### Changed
|
|
102
|
+
|
|
103
|
+
- Consolidated the daemon-first, project-scope and feature decision records into
|
|
104
|
+
`docs/capabilities.md` / `docs/ru/capabilities.md`; the `docs/adr` directories were removed.
|
|
105
|
+
- Replaced the retired internal monorepo example with a neutral analytics-platform example and added
|
|
106
|
+
tests for every example config.
|
|
107
|
+
- `revdeck list` and `revdeck status` default to the current repository's project; `--all` restores the
|
|
108
|
+
previous global list.
|
|
109
|
+
- MCP `revdeck_open`, `revdeck_context` and the review tools no longer accept a working-copy `root` or
|
|
110
|
+
project overrides; cross-project access is rejected unless it is opened through an explicit feature.
|
|
8
111
|
|
|
9
112
|
## [0.5.0] - 2026-11-13
|
|
10
113
|
|
|
@@ -247,5 +350,5 @@ First public release.
|
|
|
247
350
|
- English documentation as the canonical set under `docs/`, with Russian translations under `docs/ru/`.
|
|
248
351
|
- Security: token scrubbing, redaction, publish sanitizer, loopback-only UI, one-time launch token,
|
|
249
352
|
cookie/Origin/Host checks, CSP.
|
|
250
|
-
- Docs: architecture, configuration, protocol, threat model
|
|
353
|
+
- Docs: architecture, configuration, protocol, threat model and integrations.
|
|
251
354
|
- Tests: diff parser, core helpers, providers with recorded responses, service with a fake provider.
|
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,11 +28,20 @@ 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
|
-
- **Many
|
|
40
|
+
- **Many projects, separated contexts.** A project is a repository. The UI switches between projects and
|
|
41
|
+
shows only the current one's reviews; an MCP server is scoped to its repository.
|
|
42
|
+
- **Explicit cross-project features.** A human bundles MRs from several projects into a feature with a
|
|
43
|
+
brief and contract. A project session reads the combined context; a feature session can draft across its
|
|
44
|
+
members. Publishing stays per review and per human approval.
|
|
29
45
|
- **Any harness.** MCP tools for MCP clients, the same capabilities over CLI, and a skill that carries
|
|
30
46
|
the review procedure.
|
|
31
47
|
|
|
@@ -63,7 +79,9 @@ revdeck open 42 # load an MR/PR
|
|
|
63
79
|
revdeck ui # open the local UI
|
|
64
80
|
```
|
|
65
81
|
|
|
66
|
-
`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
|
|
67
85
|
replacing it. `revdeck eject` is the inverse: it removes the config, installed skills and command files,
|
|
68
86
|
the `revdeck` MCP entry and the local `.revdeck/` cache, leaving foreign files and other MCP servers
|
|
69
87
|
untouched. It only shows the plan by default; add `--yes` to apply (`--keep-config` keeps
|
|
@@ -100,11 +118,13 @@ Russian READMEs live in this repository; translation fixes are welcome.
|
|
|
100
118
|
|
|
101
119
|
| Command | What it does |
|
|
102
120
|
|---|---|
|
|
103
|
-
| `revdeck init` | config, harness adapters, MCP |
|
|
121
|
+
| `revdeck init [--provider gitlab/github/auto]` | config, harness adapters, MCP |
|
|
104
122
|
| `revdeck eject [--yes]` | remove revdeck-owned config, adapters and MCP entry |
|
|
105
123
|
| `revdeck devcontainer [--write]` | mount the host daemon socket/state into a devcontainer |
|
|
106
124
|
| `revdeck doctor` | environment, `glab`/`gh` auth, daemon, adapters |
|
|
107
|
-
| `revdeck
|
|
125
|
+
| `revdeck projects [add <path>]` | projects, their roots and review counts; register a repository |
|
|
126
|
+
| `revdeck list [--all] [--remote]` | reviews of the current project, or all projects with `--all` |
|
|
127
|
+
| `revdeck feature …` | list/create/add/remove/context/update/archive/delete features |
|
|
108
128
|
| `revdeck open <N\|URL>` | load a review |
|
|
109
129
|
| `revdeck context <N>` | agent context: rules, files, threads, findings |
|
|
110
130
|
| `revdeck diff <N> [--file]` | files and hunks |
|
|
@@ -122,11 +142,59 @@ Russian READMEs live in this repository; translation fixes are welcome.
|
|
|
122
142
|
| `revdeck daemon <start\|stop\|restart\|status\|logs\|install\|uninstall>` | daemon lifecycle |
|
|
123
143
|
| `revdeck mcp` | MCP server over stdio |
|
|
124
144
|
|
|
125
|
-
Common flags: `--json`, `--root`, `--review`, `--platform`, `--project`, `--host`, `--lang ru|en`.
|
|
145
|
+
Common flags: `--json`, `--root`, `--review`, `--platform`, `--project`, `--host`, `--all`, `--lang ru|en`.
|
|
146
|
+
|
|
147
|
+
## Projects
|
|
148
|
+
|
|
149
|
+
A project is a repository. revdeck keeps a project registry (`projects`, `project_roots`) and a
|
|
150
|
+
`projectKey` on every review, so the UI can switch between projects and show only the current one's
|
|
151
|
+
reviews. The daemon still runs as one process with one SQLite database; project separation is about
|
|
152
|
+
context, not tenants.
|
|
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
|
+
|
|
159
|
+
Each repository's MCP server resolves its project from the working copy and lists only that project.
|
|
160
|
+
An id or URL from another project is rejected with a hint to open a separate session. Devcontainers and
|
|
161
|
+
separate agent sessions work naturally: each container mounts the same host daemon bridge and stays
|
|
162
|
+
scoped to its repository.
|
|
163
|
+
|
|
164
|
+
An agent never sees another project implicitly. Cross-project work goes through a human-created
|
|
165
|
+
feature (below), which is the only explicit door. See [capabilities](docs/capabilities.md#project-scopes) and
|
|
166
|
+
[architecture](docs/architecture.md#projects-and-isolation).
|
|
167
|
+
|
|
168
|
+
## Features
|
|
169
|
+
|
|
170
|
+
A feature is a named bundle of MRs from one or more projects, with a Markdown brief, a separate
|
|
171
|
+
contract (Markdown or OpenAPI), and a free-form role per review. OpenAPI is parsed into operations and
|
|
172
|
+
schemas; the context marks which changed reviews mention each path. Application profiles come from
|
|
173
|
+
`context.sources` in each repository. Feature notes/findings are a non-published cross-project
|
|
174
|
+
scratchpad. Projects are not linked permanently; a project appears in the feature only while one of
|
|
175
|
+
its MRs is a member.
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# open the MRs first (in their projects), then:
|
|
179
|
+
revdeck feature create "Checkout v2" --brief brief.md --contract openapi.yaml \
|
|
180
|
+
gitlab:gitlab.com/acme/api!1 \
|
|
181
|
+
gitlab:gitlab.com/acme/web!2
|
|
182
|
+
revdeck feature context ft-a1b2c3
|
|
183
|
+
revdeck feature note ft-a1b2c3 --title "Contract gap" --body "Web sends no Idempotency-Key" --kind finding --level major
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
In the UI, add a review from its header, or open **All features**, choose a feature and add tracked
|
|
187
|
+
reviews; reorder and delete are on the feature page. A project session sees features that include its
|
|
188
|
+
project and can read the combined context, but writes only in its own project. To let one agent write across a feature's
|
|
189
|
+
members, start the MCP server from a member repository with `REVDECK_FEATURE=<feature id>`; publishing
|
|
190
|
+
still needs approval per review. Feature notes written by the agent stay local and are never published.
|
|
191
|
+
See [capabilities](docs/capabilities.md#features).
|
|
126
192
|
|
|
127
193
|
UI shortcuts: `1`–`5` switch tabs, `o` opens a review, `r` refreshes, `s` hides/shows the
|
|
128
|
-
sidebar, `p` opens
|
|
129
|
-
`
|
|
194
|
+
sidebar, `p` opens the project switcher (or publishing when a plan is ready), `?` opens the command
|
|
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`.
|
|
130
198
|
|
|
131
199
|
The UI shows the MR/PR description, supports deep links to threads, findings and diff lines (with
|
|
132
200
|
working browser Back/Forward), and keeps a per-review "viewed" state and file filter in the diff.
|
|
@@ -205,9 +273,9 @@ revdeck devcontainer --write # merge them into .devcontainer/devcontainer.json
|
|
|
205
273
|
```
|
|
206
274
|
|
|
207
275
|
The command mounts the stable host bridge `~/.local/state/revdeck/devcontainer/run` at `/run/revdeck`
|
|
208
|
-
(socket) and `~/.local/state/revdeck/devcontainer/state` at `/var/lib/revdeck` (read-only
|
|
209
|
-
`daemon.json`), and sets `REVDECK_RUNTIME_DIR`, `REVDECK_STATE_DIR`,
|
|
210
|
-
`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
|
|
211
279
|
home path, so the same `.devcontainer/devcontainer.json` works for every developer. Comments and
|
|
212
280
|
foreign keys in an existing JSONC file are preserved.
|
|
213
281
|
|
|
@@ -243,19 +311,22 @@ otherwise it can start a second daemon inside the container.
|
|
|
243
311
|
|
|
244
312
|
Tools: `revdeck_status`, `revdeck_list`, `revdeck_open`, `revdeck_context`, `revdeck_threads`,
|
|
245
313
|
`revdeck_diff`, `revdeck_rules`, `revdeck_draft_reply`, `revdeck_draft_findings`,
|
|
246
|
-
`revdeck_set_summary`, `revdeck_notes`, `
|
|
314
|
+
`revdeck_set_summary`, `revdeck_notes`, `revdeck_feature`, `revdeck_feature_note`,
|
|
315
|
+
`revdeck_publish_preview`, `revdeck_publish`.
|
|
247
316
|
|
|
248
|
-
Publishing requires an `approval_id`
|
|
249
|
-
does not create one. Prompts `review-mr
|
|
250
|
-
|
|
317
|
+
Publishing requires an `approval_id` created by the human UI or the host CLI. The agent bridge has no
|
|
318
|
+
`publish.approve`, and the MCP tool does not create one. Prompts `review-mr`, `close-feedback` and
|
|
319
|
+
`review-feature` are available in
|
|
320
|
+
clients that support MCP prompts.
|
|
251
321
|
|
|
252
322
|
Harness matrix and slash commands: [docs/integrations.md](docs/integrations.md).
|
|
253
323
|
|
|
254
324
|
## Rules
|
|
255
325
|
|
|
256
326
|
`.revdeck.yml` at the repository root; personal overrides go to `.revdeck.local.yml` (ignored by git and
|
|
257
|
-
added by `init`).
|
|
258
|
-
|
|
327
|
+
added by `init`). If `.revdeck.local.yml` is tracked by git, it came from the repository and is ignored
|
|
328
|
+
as personal overrides. Local objects merge recursively, local arrays replace, and a base
|
|
329
|
+
`review.readOnly` cannot be disabled locally.
|
|
259
330
|
|
|
260
331
|
```yaml
|
|
261
332
|
version: 1
|
|
@@ -291,10 +362,19 @@ found. Full schema: [docs/configuration.md](docs/configuration.md).
|
|
|
291
362
|
|
|
292
363
|
## Security
|
|
293
364
|
|
|
294
|
-
- The daemon listens on loopback and a unix socket (0600). The
|
|
295
|
-
`
|
|
365
|
+
- The daemon listens on loopback and a unix socket (0600). The devcontainer bridge exposes only the
|
|
366
|
+
`read`/`draft` capability set; `publish.*`, `checks.run`, decisions, platform writes and
|
|
367
|
+
feature/project administration return `CAPABILITY`. The UI token stays on the host and is not
|
|
368
|
+
mounted into the container.
|
|
369
|
+
- The UI uses a launch token (rotated with the daemon), an `HttpOnly`/`SameSite=Strict` cookie,
|
|
370
|
+
`Host`/`Origin` checks and CSP.
|
|
296
371
|
- `glab`/`gh` run without a shell, with `cwd` outside the working copy and a scrubbed environment;
|
|
297
372
|
secrets are redacted from logs and errors.
|
|
373
|
+
- Rule/profile documents must be git-tracked, have a safe extension and are denied for local secrets
|
|
374
|
+
(`.env*`, `.git/**`, `.npmrc`, `.revdeck.local.*`, keys); `.revdeck.local.yml` tracked by git is
|
|
375
|
+
ignored as a repository file. Reads use an opened-fd realpath check to close symlink TOCTOU.
|
|
376
|
+
- Checks are planned by the agent and run by a human in the UI or the host CLI. The bridge denies
|
|
377
|
+
`checks.run`; the CLI refuses `--run --yes` inside a devcontainer.
|
|
298
378
|
- Comments are checked for GitLab quick actions, HTML, hidden/bidi characters, mass mentions and
|
|
299
379
|
external images (only uploads from the platform host are allowed).
|
|
300
380
|
- Review text is untrusted data; agent instructions say so explicitly.
|
|
@@ -316,7 +396,7 @@ read the CLI configuration — isolate the agent.
|
|
|
316
396
|
| `skills/revdeck` | review procedures (SKILL, Review, Feedback, Criteria, Rules, Sources, `agents/openai.yaml`) |
|
|
317
397
|
|
|
318
398
|
More: [docs/architecture.md](docs/architecture.md), [docs/protocol.md](docs/protocol.md),
|
|
319
|
-
[
|
|
399
|
+
[capabilities](docs/capabilities.md#daemon-first).
|
|
320
400
|
|
|
321
401
|
## Development
|
|
322
402
|
|
|
@@ -335,7 +415,7 @@ Provider tests use recorded CLI responses and need no network. See [CONTRIBUTING
|
|
|
335
415
|
|
|
336
416
|
- Publishing uses regular comments; native drafts (GitLab draft notes, GitHub pending review) are not
|
|
337
417
|
used yet, though the provider interface is ready.
|
|
338
|
-
- Project checks are planned by the agent;
|
|
418
|
+
- 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`.
|
|
339
419
|
- The UI opens a review from the **Open review** dialog; the working-copy root is required so the daemon
|
|
340
420
|
can read `.revdeck.yml`.
|
|
341
421
|
- 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,12 +28,20 @@
|
|
|
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 переключается между
|
|
41
|
+
проектами и показывает только ревью текущего; MCP-сервер привязан к своему репозиторию.
|
|
42
|
+
- **Явные кросс-проектные фичи.** Человек собирает MR из нескольких проектов в фичу с брифом и
|
|
43
|
+
контрактом. Project-сессия читает общий контекст; feature-сессия может писать черновики по
|
|
44
|
+
участникам. Публикация — по каждому ревью и после подтверждения.
|
|
30
45
|
|
|
31
46
|
## Установка
|
|
32
47
|
|
|
@@ -51,13 +66,15 @@ revdeck open 42 # открыть MR/PR по номеру
|
|
|
51
66
|
revdeck ui # ссылка на локальный интерфейс
|
|
52
67
|
```
|
|
53
68
|
|
|
54
|
-
`revdeck init`
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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` может быть очищен.
|
|
61
78
|
|
|
62
79
|
Если `glab` работает в шелле, а обновление в UI падает с `spawn glab ENOENT`, у демона другой `PATH`
|
|
63
80
|
(так часто бывает у systemd/launchd). Запустите `revdeck doctor`: он покажет путь, который видит
|
|
@@ -85,11 +102,13 @@ revdeck ui # ссылка на локальный интерфейс
|
|
|
85
102
|
|
|
86
103
|
| Команда | Что делает |
|
|
87
104
|
|---|---|
|
|
88
|
-
| `revdeck init` | конфиг, адаптеры, MCP |
|
|
105
|
+
| `revdeck init [--provider gitlab/github/auto]` | конфиг, адаптеры, MCP |
|
|
89
106
|
| `revdeck eject [--yes]` | удалить конфиг, адаптеры и MCP-запись revdeck |
|
|
90
107
|
| `revdeck devcontainer [--write]` | смонтировать сокет/state демона хоста в devcontainer |
|
|
91
108
|
| `revdeck doctor` | окружение, `glab`/`gh`, демон, адаптеры |
|
|
92
|
-
| `revdeck
|
|
109
|
+
| `revdeck projects [add <путь>]` | проекты, их root'ы и число ревью; зарегистрировать репозиторий |
|
|
110
|
+
| `revdeck list [--all] [--remote]` | ревью текущего проекта или все проекты с `--all` |
|
|
111
|
+
| `revdeck feature …` | list/create/add/remove/context/update/archive/delete фич |
|
|
93
112
|
| `revdeck open <N│URL>` | загрузить ревью |
|
|
94
113
|
| `revdeck context <N>` | контекст для агента: правила, файлы, треды, замечания |
|
|
95
114
|
| `revdeck diff <N> [--file]` | файлы и hunks |
|
|
@@ -107,11 +126,59 @@ revdeck ui # ссылка на локальный интерфейс
|
|
|
107
126
|
| `revdeck daemon <start│stop│restart│status│logs│install│uninstall>` | управление демоном |
|
|
108
127
|
| `revdeck mcp` | MCP-сервер (stdio) |
|
|
109
128
|
|
|
110
|
-
Общие флаги: `--json`, `--root`, `--review`, `--platform`, `--project`, `--host`, `--lang ru|en`.
|
|
129
|
+
Общие флаги: `--json`, `--root`, `--review`, `--platform`, `--project`, `--host`, `--all`, `--lang ru|en`.
|
|
130
|
+
|
|
131
|
+
## Проекты
|
|
132
|
+
|
|
133
|
+
Проект — это репозиторий. revdeck ведёт реестр проектов (`projects`, `project_roots`) и хранит
|
|
134
|
+
`projectKey` у каждого ревью, поэтому UI переключается между проектами и показывает только ревью
|
|
135
|
+
текущего. Демон по-прежнему один процесс с одной SQLite; разделение проектов — про контекст, а не
|
|
136
|
+
про тенантов.
|
|
137
|
+
|
|
138
|
+
Проектами управляют на домашнем экране проектов: **Добавить проект** регистрирует рабочую копию
|
|
139
|
+
(альтернатива — `revdeck projects add <path>`), **Изменить** меняет отображаемое название и список
|
|
140
|
+
root'ов рабочих копий, **Удалить** убирает проект и его локальные ревью из revdeck. MR/PR и
|
|
141
|
+
комментарии на платформе при удалении не затрагиваются.
|
|
142
|
+
|
|
143
|
+
MCP-сервер каждого репозитория определяет свой проект по рабочей копии и показывает только его.
|
|
144
|
+
Id или URL чужого проекта отклоняется с подсказкой открыть отдельную сессию. Devcontainer'ы и
|
|
145
|
+
отдельные сессии агента работают естественно: каждый контейнер монтирует общий мост к демону хоста
|
|
146
|
+
и остаётся в скоупе своего репозитория.
|
|
147
|
+
|
|
148
|
+
Агент не видит другой проект неявно. Кросс-проектная работа идёт через созданную человеком фичу
|
|
149
|
+
(ниже) — это единственная явная дверь. См. [возможности](docs/ru/capabilities.md#скоупы-проектов) и
|
|
150
|
+
[архитектуру](docs/ru/architecture.md#проекты-и-изоляция).
|
|
151
|
+
|
|
152
|
+
## Фичи
|
|
153
|
+
|
|
154
|
+
Фича — именованный набор MR из одного или нескольких проектов с Markdown-брифом, отдельным
|
|
155
|
+
контрактом (Markdown или OpenAPI) и свободной ролью у каждого ревью. OpenAPI разбирается на операции
|
|
156
|
+
и схемы; контекст отмечает, какие изменённые ревью упоминают каждый путь. Профили приложений берутся
|
|
157
|
+
из `context.sources` каждого репозитория. Заметки/находки фичи — непубликуемый кросс-проектный
|
|
158
|
+
блокнот. Проекты не связываются навсегда; проект присутствует в фиче, пока в ней есть хотя бы один
|
|
159
|
+
его MR.
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# сначала откройте MR в их проектах, затем:
|
|
163
|
+
revdeck feature create "Checkout v2" --brief brief.md --contract openapi.yaml \
|
|
164
|
+
gitlab:gitlab.com/acme/api!1 \
|
|
165
|
+
gitlab:gitlab.com/acme/web!2
|
|
166
|
+
revdeck feature context ft-a1b2c3
|
|
167
|
+
revdeck feature note ft-a1b2c3 --title "Contract gap" --body "Web sends no Idempotency-Key" --kind finding --level major
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
В UI ревью добавляется из шапки, а также через **Все фичи** и список отслеживаемых ревью; порядок
|
|
171
|
+
и удаление — на странице выбранной фичи. Project-сессия видит фичи, куда входит её проект, и может
|
|
172
|
+
читать общий контекст, но пишет только в свой проект. Чтобы один агент писал по всей фиче, запустите
|
|
173
|
+
MCP-сервер из репозитория-участника с `REVDECK_FEATURE=<id>`; публикация всё равно требует
|
|
174
|
+
подтверждения по каждому ревью. Заметки, написанные агентом, остаются локальными и не публикуются.
|
|
175
|
+
См. [возможности](docs/ru/capabilities.md#фичи).
|
|
111
176
|
|
|
112
177
|
Горячие клавиши UI: `1`–`5` переключают вкладки, `o` открывает ревью, `r` обновляет, `s`
|
|
113
|
-
скрывает/показывает сайдбар, `p` открывает
|
|
114
|
-
|
|
178
|
+
скрывает/показывает сайдбар, `p` открывает переключатель проектов (или публикацию, если готов
|
|
179
|
+
план), `?` — палитру команд, `h` — справку по командам. В сайдбаре есть ссылка **Справка по
|
|
180
|
+
командам** (`#/help`) с поиском по CLI, общими флагами и горячими клавишами; клик по команде
|
|
181
|
+
копирует её. Выбор сайдбара и активный проект запоминаются в `localStorage`.
|
|
115
182
|
|
|
116
183
|
UI показывает описание MR/PR, поддерживает deep links на треды, замечания и строки diff (с рабочей
|
|
117
184
|
кнопкой «назад»), а в diff — фильтр файлов и отметку «просмотрено» для каждого ревью. Ревью можно убрать
|
|
@@ -191,9 +258,9 @@ revdeck devcontainer --write # добавить их в .devcontainer/devcontai
|
|
|
191
258
|
```
|
|
192
259
|
|
|
193
260
|
Команда монтирует стабильный мост хоста `~/.local/state/revdeck/devcontainer/run` в `/run/revdeck`
|
|
194
|
-
(сокет) и `~/.local/state/revdeck/devcontainer/state` в `/var/lib/revdeck` (только чтение,
|
|
195
|
-
|
|
196
|
-
`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}`, а не абсолютный домашний
|
|
197
264
|
путь, поэтому один `.devcontainer/devcontainer.json` работает у всех разработчиков. Комментарии и
|
|
198
265
|
чужие ключи в существующем JSONC сохраняются.
|
|
199
266
|
|
|
@@ -229,12 +296,12 @@ HTTP: достаточно `revdeck daemon restart`, потому что `daemon
|
|
|
229
296
|
|
|
230
297
|
Инструменты: `revdeck_status`, `revdeck_list`, `revdeck_open`, `revdeck_context`,
|
|
231
298
|
`revdeck_threads`, `revdeck_diff`, `revdeck_rules`, `revdeck_draft_reply`,
|
|
232
|
-
`revdeck_draft_findings`, `revdeck_set_summary`, `revdeck_notes`, `
|
|
233
|
-
`revdeck_publish`. Публикация требует
|
|
234
|
-
человек в UI или CLI
|
|
299
|
+
`revdeck_draft_findings`, `revdeck_set_summary`, `revdeck_notes`, `revdeck_feature`,
|
|
300
|
+
`revdeck_feature_note`, `revdeck_publish_preview`, `revdeck_publish`. Публикация требует
|
|
301
|
+
`approval_id`, который создаёт человек в UI или CLI на хосте; у моста агента нет `publish.approve`.
|
|
235
302
|
|
|
236
|
-
Промпты `review-mr` и `
|
|
237
|
-
без MCP используйте CLI — возможности те же. Матрица адаптеров и `/`-команд: [docs/ru/integrations.md](docs/ru/integrations.md).
|
|
303
|
+
Промпты `review-mr`, `close-feedback` и `review-feature` доступны в клиентах, поддерживающих
|
|
304
|
+
MCP prompts. В харнессах без MCP используйте CLI — возможности те же. Матрица адаптеров и `/`-команд: [docs/ru/integrations.md](docs/ru/integrations.md).
|
|
238
305
|
|
|
239
306
|
## Правила проекта
|
|
240
307
|
|
|
@@ -278,12 +345,21 @@ revdeck ищет `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md` и `docs/*` и пр
|
|
|
278
345
|
|
|
279
346
|
## Безопасность
|
|
280
347
|
|
|
281
|
-
- Демон слушает только loopback и unix-сокет (0600)
|
|
282
|
-
`
|
|
348
|
+
- Демон слушает только loopback и unix-сокет (0600). Мост devcontainer даёт только права
|
|
349
|
+
`read`/`draft`; `publish.*`, `checks.run`, решения, записи в платформу и администрирование
|
|
350
|
+
фич/проектов возвращают `CAPABILITY`. Токен UI остаётся на хосте и в контейнер не монтируется.
|
|
351
|
+
- UI использует launch-токен (меняется при перезапуске демона), cookie `HttpOnly`/`SameSite=Strict`,
|
|
352
|
+
проверку `Host`/`Origin` и CSP.
|
|
283
353
|
- `glab`/`gh` вызываются без shell, с `cwd` вне рабочей копии и вычищенным окружением; секреты
|
|
284
354
|
редактируются в логах и ошибках.
|
|
355
|
+
- Документы правил/профилей должны быть отслеживаемы git, иметь безопасное расширение и не быть
|
|
356
|
+
локальным секретом (`.env*`, `.git/**`, `.npmrc`, `.revdeck.local.*`, ключи); `.revdeck.local.yml`,
|
|
357
|
+
отслеживаемый git, игнорируется как файл репозитория. Чтение проверяет realpath уже открытого fd,
|
|
358
|
+
чтобы закрыть symlink-TOCTOU.
|
|
359
|
+
- Проверки планирует агент, запускает человек в UI или CLI на хосте. Мост запрещает `checks.run`;
|
|
360
|
+
CLI в devcontainer отказывает `--run --yes`.
|
|
285
361
|
- Комментарии проверяются на быстрые команды GitLab, HTML, скрытые/bidi-символы, `@all` и внешние
|
|
286
|
-
|
|
362
|
+
картинки (разрешены только загрузки с хоста платформы).
|
|
287
363
|
- Текст MR — недоверенные данные; агентские инструкции это оговаривают.
|
|
288
364
|
|
|
289
365
|
Подробно: [docs/ru/threat-model.md](docs/ru/threat-model.md). Гарантия формулируется так: токен не
|
|
@@ -303,7 +379,7 @@ revdeck ищет `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md` и `docs/*` и пр
|
|
|
303
379
|
| `skills/revdeck` | процедуры ревью (SKILL, Review, Feedback, Criteria, Rules, Sources, `agents/openai.yaml`) |
|
|
304
380
|
|
|
305
381
|
Подробно: [docs/ru/architecture.md](docs/ru/architecture.md), [docs/ru/protocol.md](docs/ru/protocol.md),
|
|
306
|
-
[
|
|
382
|
+
[возможности](docs/ru/capabilities.md#демон-first).
|
|
307
383
|
|
|
308
384
|
## Разработка
|
|
309
385
|
|
|
@@ -321,7 +397,7 @@ npm run build # dist/cli.js, dist/daemon.js, dist/mcp.js, dist/ui
|
|
|
321
397
|
|
|
322
398
|
- Публикация идёт обычными комментариями; native drafts (GitLab draft notes, GitHub pending review)
|
|
323
399
|
ещё не используются, хотя провайдеры к этому готовы.
|
|
324
|
-
- Проверки проекта агент только планирует; запуск — `revdeck checks --run --yes
|
|
400
|
+
- Проверки проекта агент только планирует; запуск — человек в UI или `revdeck checks --run --yes` на хосте (в контейнере CLI откажет).
|
|
325
401
|
- UI открывает ревью через диалог **Открыть ревью**; нужен корень рабочей копии, чтобы демон
|
|
326
402
|
прочитал `.revdeck.yml`.
|
|
327
403
|
- Резолв тредов есть в карточке треда; кнопка **Закрыть тред** записывает намерение закрыть и открывает
|