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 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
  ![](./assets/recording.gif)
16
16
 
17
- Targets OpenCode V2 on Linux. Host version numbers do not gate plugin activation;
18
- the companion protocol and actual scoped API contracts govern review and approval.
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.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.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; the last
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; `null` is invalid. Boolean and integer
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 side panel appears only in the top-level conversation. Browsing its
160
- subagents, including nested subagents, hides the panel and prevents both normal
161
- and fast automatic approvals. Reviews may finish while hidden. A Safe report that
162
- has never started a normal countdown may first become eligible after returning to
163
- the root and receiving real presentation proof, with a fresh countdown. Leaving
164
- the root after a countdown starts permanently makes that request manual for the
165
- running controller, even after returning or disabling/re-enabling review.
166
-
167
- Automatic approval requires mouse tracking for the host's painted-panel ownership
168
- checks. With mouse tracking disabled, reports remain available for manual review.
169
- The plugin never enables mouse tracking. It preserves sidebar visibility except
170
- after an explicit approval-notification click, when a root frame confirms the
171
- sidebar is absent before revealing it.
172
-
173
- The category switches are retained, but the current V2 collectors do not support
174
- skill, MCP or custom-tool reviews. Missing mandatory skill instructions and unproven
175
- MCP/custom origin or catalog evidence leave these requests manual, not Safe.
176
-
177
- Native Code Mode and its tool search remain enabled. Exactly linked native calls
178
- can be reviewed; ambiguously linked nested calls remain manual. The plugin assumes
179
- installed plugins preserve native tool meanings, do not replace or alias native
180
- executors, and do not rewrite commands after evidence capture.
181
-
182
- Subagent requests carry the genuine latest root-user prompt. Exact immediate
183
- delegation is currently unavailable through the supported V2 evidence path and is
184
- factually omitted, not guessed from older tasks, sibling requests or queued follow-ups.
185
- Optional context omissions do not alone prevent review when mandatory operation
186
- evidence is verified. Context cannot override the review contract.
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 remains provisional until the full response is validated. A retry
190
- clears the preview and restores the loading indicator. Normal auto-approval
191
- starts only after the full response is validated and rendered on the top-level
192
- conversation, with matching physical presentation proof.
193
-
194
- With `autoApprove: true` and `fastMode: true`, a parsed Safe rating approves the
195
- current eligible permission immediately, without a countdown or waiting for the
196
- rest of a streamed report. It still requires native front-of-queue ownership and
197
- physical presentation on the top-level conversation. Subagent browsing, explicit
198
- sidebar hiding, covering dialogs and report history prevent fast approval. Without
199
- streaming, fast mode waits for the full validated response and then skips the countdown.
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 also cancels
223
- that request's countdown, except for this plugin's physically proven report-history
224
- cover on the root route. Browsing any subagent or switching conversations cancels it.
225
- Returning, remounting or re-enabling cannot revive a canceled request. An uncertain
226
- approval write also remains manual and is never retried.
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
- After a server reconnect or companion replacement, the old controller stops reviews
238
- and automatic replies until the plugin is reloaded or OpenCode is restarted. It does
239
- not mix old permission caches with a new connection.
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
- Normal-mode history cover preserves an ongoing countdown only on
260
- the root route, with physical proof of the history heading/footer and rendered
261
- report. A newly completed Safe review may become eligible under that same proof.
262
- Native dialogs, including the command palette, still cancel an active countdown;
263
- opening history afterward cannot restart it. Fast mode has no history-cover
264
- exception. Browsing saved reports never approves a request or replays notifications.
265
-
266
- Reports are saved only after a qualifying permission resolution. Saved reports
267
- can contain private text and are retained in OpenCode's local state directory
268
- unless deletion ownership is proven. A conversation deletion does not authorize
269
- purging reports without proven server/scope ownership. Uncertain offline deletions
270
- retain history; a missing list entry or bare 404 is not enough. Windows using the
271
- same state directory share this history, partitioned by host directory and root
272
- conversation. Uncommitted reports can be lost on shutdown or prolonged storage failure.
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 OpenCode 2.0.26 fixture profile.
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
@@ -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. Solid and OpenTUI
35
- remain host-provided external dependencies.
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