opencode-reviewer 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -69
- package/THIRD_PARTY_NOTICES.md +4 -2
- package/dist/tui.js +380 -294
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -14,9 +14,8 @@ This plugin is meant to enable you to run sessions with less frequent input in a
|
|
|
14
14
|
|
|
15
15
|

|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Verified host checks are recorded in the maintainer migration plan.
|
|
17
|
+
For OpenCode V2 on Linux. The plugin checks the server companion's protocol and
|
|
18
|
+
each request's data and scope rather than allowing only specific host versions.
|
|
20
19
|
|
|
21
20
|
## Install and config
|
|
22
21
|
|
|
@@ -30,7 +29,7 @@ There is no project-local CLI configuration. OpenCode loads the
|
|
|
30
29
|
"$schema": "https://opencode.ai/v2/cli.json",
|
|
31
30
|
"plugins": [
|
|
32
31
|
{
|
|
33
|
-
"package": "opencode-reviewer@2.0.
|
|
32
|
+
"package": "opencode-reviewer@2.0.1",
|
|
34
33
|
"options": {
|
|
35
34
|
"baseURL": "https://openrouter.ai/api/v1",
|
|
36
35
|
"model": "your-model",
|
|
@@ -89,7 +88,7 @@ only in this server configuration, not in `cli.json`:
|
|
|
89
88
|
```json
|
|
90
89
|
{
|
|
91
90
|
"$schema": "https://opencode.ai/config.json",
|
|
92
|
-
"plugins": ["opencode-reviewer@2.0.
|
|
91
|
+
"plugins": ["opencode-reviewer@2.0.1"],
|
|
93
92
|
"permissions": [
|
|
94
93
|
{ "action": "shell", "resource": "*", "effect": "ask" },
|
|
95
94
|
{ "action": "edit", "resource": "*", "effect": "ask" },
|
|
@@ -99,7 +98,7 @@ only in this server configuration, not in `cli.json`:
|
|
|
99
98
|
}
|
|
100
99
|
```
|
|
101
100
|
|
|
102
|
-
Merge these entries with your existing configuration. Rules are ordered
|
|
101
|
+
Merge these entries with your existing configuration. Rules are ordered and the last
|
|
103
102
|
matching rule wins. Reviews run only when OpenCode asks for permission. Existing
|
|
104
103
|
`allow` rules and native autoaccept skip review. See OpenCode's
|
|
105
104
|
[server config](https://opencode.ai/v2/docs/config),
|
|
@@ -109,7 +108,7 @@ matching rule wins. Reviews run only when OpenCode asks for permission. Existing
|
|
|
109
108
|
## Options reference
|
|
110
109
|
|
|
111
110
|
These are options inside the plugin's `options` object in global `cli.json`.
|
|
112
|
-
Defaults apply only to omitted options
|
|
111
|
+
Defaults apply only to omitted options. `null` is invalid. Boolean and integer
|
|
113
112
|
options require JSON booleans and numbers, not quoted strings. Integer ranges are
|
|
114
113
|
inclusive, fractions are invalid, and the maximum safe integer is
|
|
115
114
|
9,007,199,254,740,991. Unknown option names are rejected.
|
|
@@ -156,47 +155,49 @@ The sidebar shows Safe, Unsafe, or Analysis unavailable. Explanations support
|
|
|
156
155
|
Markdown and scrolling. If the sidebar is hidden, use OpenCode's Show sidebar
|
|
157
156
|
command.
|
|
158
157
|
|
|
159
|
-
The reviewer
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
the
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
The plugin
|
|
170
|
-
|
|
171
|
-
sidebar is absent before
|
|
172
|
-
|
|
173
|
-
The
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
158
|
+
The reviewer panel appears only in the main conversation. Opening any subagent,
|
|
159
|
+
including a nested one, hides the panel and prevents normal and fast auto-approval.
|
|
160
|
+
Reviews may still finish while hidden. If a Safe report has never started a normal
|
|
161
|
+
countdown, returning to the main conversation can start a fresh one once the host
|
|
162
|
+
confirms the panel is visible. Leaving after a countdown starts cancels auto-approval
|
|
163
|
+
for that request for the rest of that plugin run. Returning or disabling and
|
|
164
|
+
re-enabling review won't restart it.
|
|
165
|
+
|
|
166
|
+
Auto-approval requires mouse tracking so the host can check that the panel is
|
|
167
|
+
visible and receives clicks. With mouse tracking off, you can still read reports
|
|
168
|
+
and approve requests manually. The plugin doesn't enable mouse tracking or reveal
|
|
169
|
+
a hidden sidebar unless you click an approval notification; it checks that the
|
|
170
|
+
sidebar is absent from the main conversation before showing it.
|
|
171
|
+
|
|
172
|
+
The skill, MCP and custom-tool options are still present, but these reviews aren't
|
|
173
|
+
supported in V2. The reviewer can't get the required skill instructions or verify
|
|
174
|
+
the source and catalog information for MCP and custom tools. Those requests need
|
|
175
|
+
manual approval; they aren't rated Safe.
|
|
176
|
+
|
|
177
|
+
Code Mode and its tool search stay enabled. Native tool calls can be reviewed when
|
|
178
|
+
the reviewer can match them exactly to their permission requests. Nested calls
|
|
179
|
+
without an exact match need manual approval. This assumes other installed plugins don't change
|
|
180
|
+
what native tools do, replace or alias their executors, or rewrite commands after
|
|
181
|
+
the reviewer has captured them.
|
|
182
|
+
|
|
183
|
+
Subagent reviews include the latest user prompt from the main conversation. The
|
|
184
|
+
V2 evidence collector can't get the exact task passed to the requesting subagent,
|
|
185
|
+
so it leaves that out rather than guessing from older tasks, sibling requests or
|
|
186
|
+
queued follow-ups. Missing optional context doesn't prevent review if the required
|
|
187
|
+
operation evidence is verified. Context can't override the review rules.
|
|
187
188
|
|
|
188
189
|
With streaming enabled, Evaluating and its spinner disappear when a rating arrives.
|
|
189
|
-
The rating
|
|
190
|
-
clears the preview and
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
With `autoApprove: true` and `fastMode: true`, a parsed Safe rating
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
streaming, fast mode waits for the full validated response
|
|
190
|
+
The rating is provisional until the full response passes validation. A retry
|
|
191
|
+
clears the preview and brings back the loading indicator. Normal auto-approval
|
|
192
|
+
waits for the full validated report and for the host to confirm that it's displayed
|
|
193
|
+
in the main conversation.
|
|
194
|
+
|
|
195
|
+
With `autoApprove: true` and `fastMode: true`, a parsed Safe rating can approve the
|
|
196
|
+
request before the streamed report finishes, without a countdown. The request must
|
|
197
|
+
be first in OpenCode's permission queue, and the host must confirm the panel is
|
|
198
|
+
visible in the main conversation. Browsing a subagent, hiding the sidebar or
|
|
199
|
+
covering it with a dialog or report history prevents fast approval. Without
|
|
200
|
+
streaming, fast mode waits for the full validated response, then skips the countdown.
|
|
200
201
|
|
|
201
202
|
After confirmed fast approval, the live panel shows **Auto-approved; finishing
|
|
202
203
|
report…** and stays ahead of newer requests until its report finishes. Hiding the
|
|
@@ -219,13 +220,15 @@ limits and overall timeout still apply. Retried requests can incur additional
|
|
|
219
220
|
provider charges, and unreported usage remains unknown.
|
|
220
221
|
|
|
221
222
|
During an auto-approval countdown, click the countdown to allow once immediately,
|
|
222
|
-
or Cancel to leave the request manual. Hiding or covering the panel
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
Returning,
|
|
226
|
-
|
|
223
|
+
or Cancel to leave the request manual. Hiding or covering the panel cancels the
|
|
224
|
+
countdown too, except when this plugin's report history is displayed in the main
|
|
225
|
+
conversation and passes the host's visibility checks. Browsing any subagent or
|
|
226
|
+
switching conversations cancels it. Returning, reopening the panel or re-enabling
|
|
227
|
+
review won't restart a canceled countdown. If the plugin can't confirm the result
|
|
228
|
+
of an approval attempt, it leaves the request manual and never retries that attempt.
|
|
227
229
|
Cancel before using native Allow always or rejection
|
|
228
230
|
forms; those forms alone do not stop the countdown.
|
|
231
|
+
Cancel remains available during native preparation, until the approval is sent.
|
|
229
232
|
Positive countdowns add a 200 ms initial grace and then update on remaining-time
|
|
230
233
|
boundaries. A zero-second setting still approves without that grace.
|
|
231
234
|
|
|
@@ -234,9 +237,9 @@ descendants. The setting is saved for resume. Both commands are also in the comm
|
|
|
234
237
|
palette. Disabling stops unapproved reviews and countdowns while native permission
|
|
235
238
|
controls remain available. Already-approved fast-mode reports finish in the background.
|
|
236
239
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
+
If the server reconnects or the companion is replaced, reviews and auto-approval
|
|
241
|
+
stop. Reload the plugin or restart OpenCode to resume. This keeps cached permissions
|
|
242
|
+
from the old connection separate from the new one.
|
|
240
243
|
|
|
241
244
|
### Report history
|
|
242
245
|
|
|
@@ -247,6 +250,8 @@ PageUp/PageDown scroll. Close or Escape closes history. Repeating the command
|
|
|
247
250
|
returns to the newest report. History remains available with review disabled or
|
|
248
251
|
invalid reviewer configuration. The history command preserves a hidden sidebar;
|
|
249
252
|
clicking an approval notification reveals it and selects that permission's live or saved report.
|
|
253
|
+
Keyboard browsing also works with mouse tracking off; that does not grant
|
|
254
|
+
automatic-approval history cover.
|
|
250
255
|
|
|
251
256
|
Each entry shows the original report, available usage, model, provider and outcome:
|
|
252
257
|
**Auto approved**, **Manually approved**, **Cancelled**, or **Rejected**. Cancelled
|
|
@@ -256,20 +261,27 @@ native Allow once replies whose submitting client cannot be identified. History
|
|
|
256
261
|
keeps the latest completed report, which can differ from the report that caused
|
|
257
262
|
approval in another window.
|
|
258
263
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
report. A newly completed Safe review
|
|
262
|
-
|
|
263
|
-
opening history afterward
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
Reports are saved only after a
|
|
267
|
-
can contain private text and are
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
264
|
+
In normal mode, opening report history can leave a countdown running in the main
|
|
265
|
+
conversation. The host must confirm that the history heading and footer are visible
|
|
266
|
+
and the review report is rendered. A newly completed Safe review can become eligible
|
|
267
|
+
for a countdown under the same checks. OpenCode dialogs, including the command palette, still cancel an
|
|
268
|
+
active countdown; opening history afterward won't restart it. History blocks fast
|
|
269
|
+
approval. Browsing saved reports doesn't itself approve requests or replay notifications.
|
|
270
|
+
|
|
271
|
+
Reports are saved only after a permission resolution that qualifies for history.
|
|
272
|
+
They can contain private text and are kept under OpenCode's local state base:
|
|
273
|
+
`$XDG_STATE_HOME`, or `~/.local/state` when unset. Safely accessible history stays
|
|
274
|
+
under `opencode/opencode-reviewer/`. If the host directory is unsuitable for private
|
|
275
|
+
storage, the plugin uses its private, plugin-owned sibling
|
|
276
|
+
`opencode-reviewer-state/opencode-reviewer/` without changing host-directory permissions.
|
|
277
|
+
An existing safe sibling database remains in use across restarts. Conversation
|
|
278
|
+
enable/disable settings stay in the original OpenCode state directory.
|
|
279
|
+
The plugin deletes them only when it can verify that a deleted conversation belongs
|
|
280
|
+
to the matching server and scope. If that can't be verified after an offline
|
|
281
|
+
deletion, it keeps the history; a missing list entry or bare 404 isn't enough.
|
|
282
|
+
Windows using the same state directory share history, grouped by host directory
|
|
283
|
+
and main conversation. Reports not yet saved can be lost on shutdown or during a
|
|
284
|
+
prolonged storage failure.
|
|
273
285
|
|
|
274
286
|
### Usage totals
|
|
275
287
|
|
|
@@ -432,7 +444,8 @@ Use Node.js 24.15.0+ within 24.x, or 22.22.2+ within 22.x, and npm.
|
|
|
432
444
|
Run `npm ci --ignore-scripts`, then `npm run check` for typechecking, source tests,
|
|
433
445
|
pure-helper tests and the build. `npm run test:helpers` runs the helper checks
|
|
434
446
|
without building or starting OpenCode. Pull-request CI checks both Node versions
|
|
435
|
-
and runs a separate representative Linux
|
|
447
|
+
and runs a separate representative Linux fixture profile on stock OpenCode
|
|
448
|
+
2.0.26 and 2.0.27.
|
|
436
449
|
After building, run `node scripts/test-runtime.mjs --profile ci` for that same
|
|
437
450
|
profile. Use `node scripts/test-runtime.mjs --list` for the complete runtime
|
|
438
451
|
inventory or `node scripts/test-runtime.mjs --plan --profile ci` for a
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -31,8 +31,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
31
31
|
|
|
32
32
|
https://github.com/anomalyco/opencode/tree/v2.0.26/packages/theme
|
|
33
33
|
|
|
34
|
-
The pinned theme helper is bundled in the terminal payload.
|
|
35
|
-
|
|
34
|
+
The pinned theme syntax helper is bundled unchanged in the terminal payload.
|
|
35
|
+
A build-time adapter replaces its public barrel with a syntax-only re-export;
|
|
36
|
+
unused theme parsers, schemas and their Effect dependency are not bundled.
|
|
37
|
+
Solid and OpenTUI remain host-provided external dependencies.
|
|
36
38
|
|
|
37
39
|
License source: https://github.com/anomalyco/opencode/blob/v2.0.26/LICENSE
|
|
38
40
|
|