opencode-reviewer 2.0.1 → 2.0.2
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 +44 -56
- package/dist/tui.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Reviews pending permissions in the [OpenCode](https://github.com/anomalyco/opencode) sidebar using a separate LLM. Reviews
|
|
4
4
|
native shell commands, file edits, and external-directory access. Skill, MCP and
|
|
5
5
|
custom-tool requests currently remain manual.
|
|
6
|
-
Supports streaming explanations, saved report history, auto-approval, and Linux
|
|
7
|
-
desktop notifications with distinct sounds.
|
|
6
|
+
Supports streaming explanations, saved report history and stats, auto-approval, and Linux
|
|
7
|
+
desktop notifications (Gnome) with distinct sounds.
|
|
8
8
|
|
|
9
9
|
This plugin is meant to enable you to run sessions with less frequent input in a safer way. Also giving the reviewer context of specific files the agent might want to run/see/... The review prompts are freely configurable, so you can determine the reviewers behavior very accurately.
|
|
10
10
|
|
|
@@ -29,7 +29,7 @@ There is no project-local CLI configuration. OpenCode loads the
|
|
|
29
29
|
"$schema": "https://opencode.ai/v2/cli.json",
|
|
30
30
|
"plugins": [
|
|
31
31
|
{
|
|
32
|
-
"package": "opencode-reviewer@
|
|
32
|
+
"package": "opencode-reviewer@latest",
|
|
33
33
|
"options": {
|
|
34
34
|
"baseURL": "https://openrouter.ai/api/v1",
|
|
35
35
|
"model": "your-model",
|
|
@@ -79,28 +79,18 @@ launching OpenCode. The inline key takes precedence. Omit both for an unauthenti
|
|
|
79
79
|
endpoint. Remove `instructions` to use the built-in prompts and
|
|
80
80
|
`notificationSoundDirectory` to use the bundled sounds.
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
Restart OpenCode after changing reviewer configuration. Also load the server
|
|
85
|
-
companion in `opencode.json`, globally or in the project. Keep permission rules
|
|
86
|
-
only in this server configuration, not in `cli.json`:
|
|
82
|
+
You also need to edit `opencode.json`, as the plugin needs to be informed of states
|
|
83
|
+
that are not exposed by TUI APIs:
|
|
87
84
|
|
|
88
85
|
```json
|
|
89
86
|
{
|
|
90
87
|
"$schema": "https://opencode.ai/config.json",
|
|
91
|
-
"plugins": ["opencode-reviewer@
|
|
92
|
-
"permissions": [
|
|
93
|
-
{ "action": "shell", "resource": "*", "effect": "ask" },
|
|
94
|
-
{ "action": "edit", "resource": "*", "effect": "ask" },
|
|
95
|
-
{ "action": "skill", "resource": "*", "effect": "ask" },
|
|
96
|
-
{ "action": "external_directory", "resource": "*", "effect": "ask" }
|
|
97
|
-
]
|
|
88
|
+
"plugins": ["opencode-reviewer@latest"],
|
|
98
89
|
}
|
|
99
90
|
```
|
|
100
91
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
`allow` rules and native autoaccept skip review. See OpenCode's
|
|
92
|
+
### Opencode docs
|
|
93
|
+
|
|
104
94
|
[server config](https://opencode.ai/v2/docs/config),
|
|
105
95
|
[CLI config](https://opencode.ai/v2/docs/cli/config) and
|
|
106
96
|
[CLI plugins](https://opencode.ai/v2/docs/build/plugins/cli) guides.
|
|
@@ -127,7 +117,7 @@ inclusive, fractions are invalid, and the maximum safe integer is
|
|
|
127
117
|
| `reviewMcp` | boolean | `false` | MCP-review category switch. V2 MCP collection is currently unsupported; enabling this does not supply missing origin/catalog evidence or permit automatic approval. |
|
|
128
118
|
| `reviewCustomTools` | boolean | `false` | Custom-tool review category switch. V2 custom-tool collection is currently unsupported; these requests remain manual. |
|
|
129
119
|
| `reviewExternalDirectories` | boolean | `false` | Review directory access independently of operation-review switches. Directory approval can resume the operation without another prompt. |
|
|
130
|
-
| `autoApprove` | boolean | `false` | Allow Safe reviews once automatically. Normally waits for completion, validation and the countdown.
|
|
120
|
+
| `autoApprove` | boolean | `false` | Allow Safe reviews once automatically. Normally waits for completion, validation and the countdown. Works throughout the current conversation, including subagent browsing and hidden/covered reports. Home, dashboards, unrelated conversations and native permission decision editing wait without cancellation. |
|
|
131
121
|
| `fastMode` | boolean | `false` | Requires `autoApprove: true`. Approve an eligible, front-of-queue request as soon as a Safe rating is parsed, bypassing the countdown. Respects `stream`; with `stream: false`, waits for the complete validated response. Finish the report and save it in the background after approval. |
|
|
132
122
|
| `extraCareful` | boolean | `true` | Include extra-careful guidance when `autoApprove` is enabled. Setting `false` omits that guidance without disabling automatic approval. |
|
|
133
123
|
| `autoApproveDelaySeconds` | integer | `15` | `0`–`3600` seconds. Positive values include an extra 200 ms initial grace; `0` skips the wait but keeps the other approval checks. Ignored in fast mode. |
|
|
@@ -142,10 +132,10 @@ inclusive, fractions are invalid, and the maximum safe integer is
|
|
|
142
132
|
| `maxFiles` | integer | `6` | `1`–`1000` distinct file candidates per shell/edit review, including unavailable candidates. |
|
|
143
133
|
| `maxEvidenceBytes` | integer | `131072` | `1`–`16777216` bytes for command/source content, edit diffs or category-specific JSON evidence. Optional items are omitted whole; oversized mandatory evidence fails analysis. This is not a cap on the full prompt or HTTP request. |
|
|
144
134
|
|
|
145
|
-
Notification channels are independent: `banner: false, sound: true` is sound-only
|
|
146
|
-
`banner: true, sound: false` is banner-only
|
|
135
|
+
Notification channels are independent: `banner: false, sound: true` is sound-only,
|
|
136
|
+
`banner: true, sound: false` is banner-only, both `false` disable that type.
|
|
147
137
|
`notify` and `notifySound` take precedence. Invalid notification settings disable
|
|
148
|
-
notification
|
|
138
|
+
notification.
|
|
149
139
|
|
|
150
140
|
My LLMs insist on writing a bunch of useless text to my README, so I collapsed them here in case anyone wants to inflict themselves (or more likely their agent) the pain of reading it.
|
|
151
141
|
|
|
@@ -156,18 +146,20 @@ Markdown and scrolling. If the sidebar is hidden, use OpenCode's Show sidebar
|
|
|
156
146
|
command.
|
|
157
147
|
|
|
158
148
|
The reviewer panel appears only in the main conversation. Opening any subagent,
|
|
159
|
-
including a nested one, hides the panel
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
149
|
+
including a nested one, hides the panel but does not stop normal or fast auto-approval
|
|
150
|
+
within that conversation. A Safe report need not be displayed before approval.
|
|
151
|
+
Command selectors, dialogs, report history, other session panels, sidebar hiding,
|
|
152
|
+
terminal resizing and disabled mouse tracking do not cancel automation.
|
|
153
|
+
|
|
154
|
+
Home, dashboard routes and unrelated conversations hold approval until you return
|
|
155
|
+
to the request's conversation. A countdown already started keeps its original
|
|
156
|
+
deadline; if it expires while waiting, approval can proceed immediately on return
|
|
157
|
+
after fresh checks. A review that has never started a countdown starts its full
|
|
158
|
+
delay when its conversation becomes eligible.
|
|
159
|
+
|
|
160
|
+
The plugin doesn't enable mouse tracking or reveal a hidden sidebar unless you
|
|
161
|
+
click an approval notification; it checks that the sidebar is absent from the main
|
|
162
|
+
conversation before showing it. Hidden automatic reports are saved normally.
|
|
171
163
|
|
|
172
164
|
The skill, MCP and custom-tool options are still present, but these reviews aren't
|
|
173
165
|
supported in V2. The reviewer can't get the required skill instructions or verify
|
|
@@ -189,15 +181,13 @@ operation evidence is verified. Context can't override the review rules.
|
|
|
189
181
|
With streaming enabled, Evaluating and its spinner disappear when a rating arrives.
|
|
190
182
|
The rating is provisional until the full response passes validation. A retry
|
|
191
183
|
clears the preview and brings back the loading indicator. Normal auto-approval
|
|
192
|
-
waits for the full validated report
|
|
193
|
-
in the main conversation.
|
|
184
|
+
waits for the full validated report, then the configured countdown.
|
|
194
185
|
|
|
195
186
|
With `autoApprove: true` and `fastMode: true`, a parsed Safe rating can approve the
|
|
196
187
|
request before the streamed report finishes, without a countdown. The request must
|
|
197
|
-
be first in OpenCode's permission queue
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
streaming, fast mode waits for the full validated response, then skips the countdown.
|
|
188
|
+
be first in OpenCode's permission queue and belong to the currently viewed conversation
|
|
189
|
+
or its descendants. The report may be hidden or covered. Without streaming, fast
|
|
190
|
+
mode waits for the full validated response, then skips the countdown.
|
|
201
191
|
|
|
202
192
|
After confirmed fast approval, the live panel shows **Auto-approved; finishing
|
|
203
193
|
report…** and stays ahead of newer requests until its report finishes. Hiding the
|
|
@@ -220,14 +210,15 @@ limits and overall timeout still apply. Retried requests can incur additional
|
|
|
220
210
|
provider charges, and unreported usage remains unknown.
|
|
221
211
|
|
|
222
212
|
During an auto-approval countdown, click the countdown to allow once immediately,
|
|
223
|
-
or Cancel to leave the request manual.
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
213
|
+
or Cancel to leave the request manual. Only explicit stop actions, such as Cancel,
|
|
214
|
+
disabling review, or native interruption/rejection, stop automation for that request.
|
|
215
|
+
Returning, reopening the panel or re-enabling review won't restart a canceled countdown.
|
|
216
|
+
Selecting native Allow always or Reject, or editing a rejection reason, holds
|
|
217
|
+
approval without cancellation. Returning to Allow once resumes eligibility with
|
|
218
|
+
the original countdown deadline. Ambiguous native choice state also waits.
|
|
219
|
+
Temporary queue/cache/read failures wait and recover after fresh verification.
|
|
220
|
+
Changed or unverifiable requests remain manual. If the plugin can't confirm the
|
|
221
|
+
result of a sent approval attempt, it never retries that write.
|
|
231
222
|
Cancel remains available during native preparation, until the approval is sent.
|
|
232
223
|
Positive countdowns add a 200 ms initial grace and then update on remaining-time
|
|
233
224
|
boundaries. A zero-second setting still approves without that grace.
|
|
@@ -250,8 +241,7 @@ PageUp/PageDown scroll. Close or Escape closes history. Repeating the command
|
|
|
250
241
|
returns to the newest report. History remains available with review disabled or
|
|
251
242
|
invalid reviewer configuration. The history command preserves a hidden sidebar;
|
|
252
243
|
clicking an approval notification reveals it and selects that permission's live or saved report.
|
|
253
|
-
Keyboard browsing also works with mouse tracking off
|
|
254
|
-
automatic-approval history cover.
|
|
244
|
+
Keyboard browsing also works with mouse tracking off.
|
|
255
245
|
|
|
256
246
|
Each entry shows the original report, available usage, model, provider and outcome:
|
|
257
247
|
**Auto approved**, **Manually approved**, **Cancelled**, or **Rejected**. Cancelled
|
|
@@ -261,12 +251,8 @@ native Allow once replies whose submitting client cannot be identified. History
|
|
|
261
251
|
keeps the latest completed report, which can differ from the report that caused
|
|
262
252
|
approval in another window.
|
|
263
253
|
|
|
264
|
-
|
|
265
|
-
|
|
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.
|
|
254
|
+
Opening report history does not hold normal or fast auto-approval for eligible live
|
|
255
|
+
requests. Browsing saved reports doesn't itself approve requests or replay notifications.
|
|
270
256
|
|
|
271
257
|
Reports are saved only after a permission resolution that qualifies for history.
|
|
272
258
|
They can contain private text and are kept under OpenCode's local state base:
|
|
@@ -276,6 +262,8 @@ storage, the plugin uses its private, plugin-owned sibling
|
|
|
276
262
|
`opencode-reviewer-state/opencode-reviewer/` without changing host-directory permissions.
|
|
277
263
|
An existing safe sibling database remains in use across restarts. Conversation
|
|
278
264
|
enable/disable settings stay in the original OpenCode state directory.
|
|
265
|
+
Saved modes require private ownership and a nonreplaceable path; an untrusted or
|
|
266
|
+
unreadable mode suspends review rather than silently enabling it.
|
|
279
267
|
The plugin deletes them only when it can verify that a deleted conversation belongs
|
|
280
268
|
to the matching server and scope. If that can't be verified after an offline
|
|
281
269
|
deletion, it keeps the history; a missing list entry or bare 404 isn't enough.
|