opencode-reviewer 1.0.1 → 1.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 +33 -16
- package/dist/tui.js +1152 -332
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# OpenCode Reviewer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> ⚠️ **NOT v2 COMPATIBLE YET**
|
|
4
|
+
>
|
|
5
|
+
> I recommend not upgrading opencode to v2 yet as many things are still unstable
|
|
6
|
+
|
|
7
|
+
Reviews pending permissions in the [OpenCode](https://github.com/anomalyco/opencode) sidebar using a separate LLM. Covers
|
|
4
8
|
shell commands, file edits, skill loading, MCP calls, custom tools, and external-directory access.
|
|
5
9
|
Supports streaming explanations, saved report history, auto-approval, and Linux
|
|
6
10
|
desktop notifications with distinct sounds.
|
|
@@ -13,7 +17,8 @@ This plugin is meant to enable you to run sessions with less frequent input in a
|
|
|
13
17
|
|
|
14
18
|

|
|
15
19
|
|
|
16
|
-
Verified with OpenCode 1.18.35 on Linux.
|
|
20
|
+
Verified with OpenCode 1.18.35 on Linux. Version **1.0.2** is the final release
|
|
21
|
+
compatible with OpenCode V1.
|
|
17
22
|
|
|
18
23
|
## Install and config
|
|
19
24
|
|
|
@@ -25,7 +30,7 @@ OpenCode installs the [npm package](https://www.npmjs.com/package/opencode-revie
|
|
|
25
30
|
"$schema": "https://opencode.ai/tui.json",
|
|
26
31
|
"plugin": [
|
|
27
32
|
[
|
|
28
|
-
"opencode-reviewer@
|
|
33
|
+
"opencode-reviewer@1.0.2",
|
|
29
34
|
{
|
|
30
35
|
"baseURL": "https://openrouter.ai/api/v1",
|
|
31
36
|
"model": "your-model",
|
|
@@ -96,17 +101,17 @@ inclusive, fractions are invalid, and the maximum safe integer is
|
|
|
96
101
|
| `apiKey` | string | Unset | Nonempty Bearer token. Takes precedence over `apiKeyEnv`. |
|
|
97
102
|
| `apiKeyEnv` | string | Unset | Environment-variable name matching `[A-Za-z_][A-Za-z_0-9]*`. Without an inline key, its value must be set and nonblank when a review runs. Omit both key options for no Authorization header. |
|
|
98
103
|
| `instructions` | string | Unset (built-ins) | Absolute, NUL-free directory path containing overrides for the [prompt templates](https://github.com/mightykatun/opencode-reviewer/tree/main/prompts), not inline instructions. Missing named files use built-ins; supplied files must be readable, regular, non-symlink, nonempty UTF-8 text up to 64 KiB. Fixed contracts cannot be overridden. |
|
|
99
|
-
| `stream` | boolean | `false` | Request SSE and show provisional rating/text updates. Normal automatic approval waits for a completed, validated
|
|
104
|
+
| `stream` | boolean | `false` | Request SSE and show provisional rating/text updates. Normal automatic approval waits for a completed, validated report; fast mode can approve on an early Safe rating. Presentation rules are described below. |
|
|
100
105
|
| `reviewBash` | boolean | `true` | Review native shell-command permissions. |
|
|
101
106
|
| `reviewEdits` | boolean | `true` | Review native `edit`, `write` and `apply_patch` permissions. |
|
|
102
107
|
| `reviewSkills` | boolean | `true` | Review native skill-load permissions for dangerous guidance and relevance to the current task. Supplies the host's skill instructions and bounded, directly referenced supporting files within the skill directory. |
|
|
103
108
|
| `reviewMcp` | boolean | `false` | Review identifiable MCP tool and resource permissions. |
|
|
104
109
|
| `reviewCustomTools` | boolean | `false` | Review permissions requested by registered custom tools. |
|
|
105
110
|
| `reviewExternalDirectories` | boolean | `false` | Review directory access independently of operation-review switches. Directory approval can resume the operation without another prompt. |
|
|
106
|
-
| `autoApprove` | boolean | `false` | Allow Safe reviews once automatically. Normally waits for completion, validation
|
|
107
|
-
| `fastMode` | boolean | `false` | Requires `autoApprove: true`. Approve
|
|
111
|
+
| `autoApprove` | boolean | `false` | Allow Safe reviews once automatically. Normally waits for completion, validation and the countdown. Root-view rendering is required, including behind report history; same-conversation subagent browsing permits hidden approval. |
|
|
112
|
+
| `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. |
|
|
108
113
|
| `extraCareful` | boolean | `true` | Include extra-careful guidance when `autoApprove` is enabled. Setting `false` omits that guidance without disabling automatic approval. |
|
|
109
|
-
| `autoApproveDelaySeconds` | integer | `15` | `0`–`3600` seconds. Positive values include an extra 200 ms initial grace; `0` skips the wait but
|
|
114
|
+
| `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. |
|
|
110
115
|
| `notify` | boolean | `true` | Master switch for desktop banners, sounds and reminders. `false` overrides all per-type controls. |
|
|
111
116
|
| `notifySound` | boolean | `true` | Master switch for notification audio. `false` silences every type and reminder without disabling enabled banners. |
|
|
112
117
|
| `staleReminderSeconds` | integer | `60` | `0` through the maximum safe integer, in seconds. `0` disables reminders; otherwise eligible pending human interactions repeat at this interval, limited to the native front-of-queue blocker per conversation. |
|
|
@@ -131,9 +136,15 @@ The sidebar shows Safe, Unsafe, or Analysis unavailable. Explanations support
|
|
|
131
136
|
Markdown and scrolling. If the sidebar is hidden, use OpenCode's Show sidebar
|
|
132
137
|
command.
|
|
133
138
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
139
|
+
The reviewer side panel appears only in the top-level conversation. Browsing its
|
|
140
|
+
subagents, including nested subagents, hides the panel while reviews and both normal
|
|
141
|
+
and fast automatic approvals continue. Countdown deadlines stay the same, and new
|
|
142
|
+
Safe reviews can become eligible while hidden. Return to the top-level conversation
|
|
143
|
+
to see the current report or browse saved history.
|
|
144
|
+
|
|
145
|
+
On the top-level route, automatic approval requires mouse tracking for the host's
|
|
146
|
+
painted-panel ownership checks. With mouse tracking disabled there, reports remain
|
|
147
|
+
available for manual review.
|
|
137
148
|
|
|
138
149
|
Skill-load review is enabled by default; set `skill` permissions to `ask` in
|
|
139
150
|
`opencode.json` to receive reviews. Its prompt requires both bounded risk and clear
|
|
@@ -155,13 +166,16 @@ that can override its review contract.
|
|
|
155
166
|
With streaming enabled, Evaluating and its spinner disappear when a rating arrives.
|
|
156
167
|
The rating remains provisional until the full response is validated. A retry
|
|
157
168
|
clears the preview and restores the loading indicator. Normal auto-approval
|
|
158
|
-
starts only after the full response is validated and rendered
|
|
169
|
+
starts only after the full response is validated and rendered, except that rendering
|
|
170
|
+
is not required while the panel is intentionally hidden by same-conversation
|
|
171
|
+
subagent browsing.
|
|
159
172
|
|
|
160
173
|
With `autoApprove: true` and `fastMode: true`, a parsed Safe rating approves the
|
|
161
|
-
current
|
|
162
|
-
rest of a streamed report.
|
|
163
|
-
|
|
164
|
-
|
|
174
|
+
current eligible permission immediately, without a countdown or waiting for the
|
|
175
|
+
rest of a streamed report. Same-conversation subagent browsing also permits fast
|
|
176
|
+
approval while the panel is hidden. Explicit sidebar hiding, covering dialogs and
|
|
177
|
+
report history prevent fast approval. Without streaming, fast mode waits for the
|
|
178
|
+
full validated response and then skips the countdown.
|
|
165
179
|
|
|
166
180
|
After confirmed fast approval, the live panel shows **Auto-approved; finishing
|
|
167
181
|
report…** and stays ahead of newer requests until its report finishes. Hiding the
|
|
@@ -185,7 +199,10 @@ provider charges, and unreported usage remains unknown.
|
|
|
185
199
|
|
|
186
200
|
During an auto-approval countdown, click the countdown to allow once immediately,
|
|
187
201
|
or Cancel to leave the request manual. Hiding or covering the panel also cancels
|
|
188
|
-
that request's countdown, except when covered by this plugin's report history
|
|
202
|
+
that request's countdown, except when covered by this plugin's report history or
|
|
203
|
+
intentionally hidden while browsing the same conversation's subagents. Switching
|
|
204
|
+
to an unrelated conversation still cancels it. Returning cannot revive a canceled
|
|
205
|
+
request.
|
|
189
206
|
Cancel before using native Allow always or rejection
|
|
190
207
|
forms; those forms alone do not stop the countdown.
|
|
191
208
|
Positive countdowns add a 200 ms initial grace and then update on remaining-time
|