opencode-reviewer 2.1.3 → 2.1.5
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 +34 -28
- package/THIRD_PARTY_NOTICES.md +7 -5
- package/dist/tui.js +264 -114
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
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, skill loading, and external-directory access.
|
|
5
|
-
MCP and custom-
|
|
5
|
+
MCP and custom tools share a tool-review category, with registered descriptions and JSON Schemas included when available.
|
|
6
6
|
Supports streaming explanations, saved report history and stats, auto-approval, and Linux
|
|
7
7
|
desktop notifications (Gnome) with distinct sounds.
|
|
8
8
|
|
|
@@ -19,14 +19,22 @@ each request's data and scope rather than allowing only specific host versions.
|
|
|
19
19
|
|
|
20
20
|
## Install and config
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
Reviews send request data, the latest user prompt, and selected file snapshots,
|
|
23
|
+
diffs, skill instructions or tool arguments to your configured endpoint **before
|
|
24
|
+
permission approval**. Shell snapshots can follow symlinks outside the project;
|
|
25
|
+
denying the command afterward cannot undo that disclosure. Use an endpoint you
|
|
26
|
+
trust, and a local reviewer or a sandbox without accessible secrets when working
|
|
27
|
+
with untrusted repositories.
|
|
28
|
+
|
|
29
|
+
Add this entry to the global `~/.config/opencode/opencode.json`, or
|
|
30
|
+
`$XDG_CONFIG_HOME/opencode/opencode.json` when `XDG_CONFIG_HOME` is set.
|
|
31
|
+
OpenCode loads the [npm package](https://www.npmjs.com/package/opencode-reviewer)
|
|
32
|
+
and its terminal component from this single entry. No reviewer entry is needed
|
|
33
|
+
in `cli.json`.
|
|
26
34
|
|
|
27
35
|
```json
|
|
28
36
|
{
|
|
29
|
-
"$schema": "https://opencode.ai/
|
|
37
|
+
"$schema": "https://opencode.ai/config.json",
|
|
30
38
|
"plugins": [
|
|
31
39
|
{
|
|
32
40
|
"package": "opencode-reviewer@latest",
|
|
@@ -40,9 +48,8 @@ There is no project-local CLI configuration. OpenCode loads the
|
|
|
40
48
|
"reviewBash": true,
|
|
41
49
|
"reviewEdits": true,
|
|
42
50
|
"reviewSkills": true,
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"reviewExternalDirectories": false,
|
|
51
|
+
"reviewTools": true,
|
|
52
|
+
"reviewExternalDirectories": true,
|
|
46
53
|
"autoApprove": false,
|
|
47
54
|
"fastMode": false,
|
|
48
55
|
"extraCareful": true,
|
|
@@ -79,25 +86,14 @@ launching OpenCode. The inline key takes precedence. Omit both for an unauthenti
|
|
|
79
86
|
endpoint. Remove `instructions` to use the built-in prompts and
|
|
80
87
|
`notificationSoundDirectory` to use the bundled sounds.
|
|
81
88
|
|
|
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:
|
|
84
|
-
|
|
85
|
-
```json
|
|
86
|
-
{
|
|
87
|
-
"$schema": "https://opencode.ai/config.json",
|
|
88
|
-
"plugins": ["opencode-reviewer@latest"]
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
89
|
### Opencode docs
|
|
93
90
|
|
|
94
|
-
[
|
|
95
|
-
[CLI config](https://opencode.ai/v2/docs/cli/config) and
|
|
91
|
+
[OpenCode config](https://opencode.ai/v2/docs/config) and
|
|
96
92
|
[CLI plugins](https://opencode.ai/v2/docs/build/plugins/cli) guides.
|
|
97
93
|
|
|
98
94
|
## Options reference
|
|
99
95
|
|
|
100
|
-
These are options inside the plugin's `options` object in global `
|
|
96
|
+
These are options inside the plugin's `options` object in global `opencode.json`.
|
|
101
97
|
Defaults apply only to omitted options. `null` is invalid. Boolean and integer
|
|
102
98
|
options require JSON booleans and numbers, not quoted strings. Integer ranges are
|
|
103
99
|
inclusive, fractions are invalid, and the maximum safe integer is
|
|
@@ -114,9 +110,8 @@ inclusive, fractions are invalid, and the maximum safe integer is
|
|
|
114
110
|
| `reviewBash` | boolean | `true` | Review native `shell` permissions. The option keeps its existing name. |
|
|
115
111
|
| `reviewEdits` | boolean | `true` | Review native `edit`, `write` and `patch` tools, which use the `edit` permission action. |
|
|
116
112
|
| `reviewSkills` | boolean | `true` | Review native skill loading using the exact requested ID and full currently registered main instructions. Assumes the selected definition stays unchanged while permission is pending. Missing or ambiguous instructions remain manual. |
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `reviewExternalDirectories` | boolean | `false` | Review directory access independently of operation-review switches. Directory approval can resume the operation without another prompt. |
|
|
113
|
+
| `reviewTools` | boolean | `true` | Review other tools, including MCP and custom tools, using `TOOL-REVIEW-PROMPT.md`. Exact call linkage, arguments and permission scope are required. Descriptions and JSON Schemas are optional; missing evidence is explained to the LLM, which decides Safe/Unsafe. Safe reviews can use normal or fast automatic approval. |
|
|
114
|
+
| `reviewExternalDirectories` | boolean | `true` | Review directory access independently of operation-review switches. Directory approval can resume the operation without another prompt. |
|
|
120
115
|
| `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. |
|
|
121
116
|
| `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. |
|
|
122
117
|
| `extraCareful` | boolean | `true` | Include extra-careful guidance when `autoApprove` is enabled. Setting `false` omits that guidance without disabling automatic approval. |
|
|
@@ -169,9 +164,20 @@ or oversized main instructions remain manual. Supporting files and scripts are n
|
|
|
169
164
|
inspected; their omission alone does not prevent review. Allowing a skill loads its
|
|
170
165
|
instructions, not a blanket grant for later tool actions.
|
|
171
166
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
167
|
+
Tool reviews use the exact effective tool ID, captured arguments and pending
|
|
168
|
+
permission scope. Current server-side registered names, descriptions and input
|
|
169
|
+
JSON Schemas are included when available. Missing, duplicate, oversized,
|
|
170
|
+
unreadable or unsupported definitions are omitted with factual reasons sent to
|
|
171
|
+
the LLM. The LLM decides whether the remaining evidence justifies Safe or Unsafe;
|
|
172
|
+
missing optional evidence does not itself force manual approval.
|
|
173
|
+
|
|
174
|
+
This assumes any supplied definition stays unchanged while approval is pending
|
|
175
|
+
and accurately describes behavior. The reviewer does not inspect executors or
|
|
176
|
+
remote implementations, infer origin from names, or claim an invocation-time
|
|
177
|
+
definition snapshot. Ambiguous call linkage still remains manual because the
|
|
178
|
+
reviewer cannot identify the operation being approved. Saved reports use the tool
|
|
179
|
+
category. All review categories default to enabled; `autoApprove` still defaults
|
|
180
|
+
to false. `reviewTools` replaces `reviewMcp` and `reviewCustomTools`.
|
|
175
181
|
|
|
176
182
|
Code Mode and its tool search stay enabled. Native tool calls can be reviewed when
|
|
177
183
|
the reviewer can match them exactly to their permission requests. Nested calls
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -27,16 +27,18 @@ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
27
27
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
28
28
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
29
29
|
|
|
30
|
-
# Bundled dependency: @opencode/theme 2.0.
|
|
30
|
+
# Bundled dependency: @opencode/theme 2.0.29
|
|
31
31
|
|
|
32
|
-
https://github.com/anomalyco/opencode/tree/v2.0.
|
|
32
|
+
https://github.com/anomalyco/opencode/tree/v2.0.29/packages/theme
|
|
33
33
|
|
|
34
|
-
The
|
|
35
|
-
A build-time adapter replaces its public barrel with a syntax-only re-export
|
|
34
|
+
The source-fingerprinted theme syntax helper is bundled in the terminal payload.
|
|
35
|
+
A build-time adapter replaces its public barrel with a syntax-only re-export and
|
|
36
|
+
adapts `generateSyntax` to forward the renderer owner to `SyntaxStyle.fromTheme`
|
|
37
|
+
for OpenTUI 0.6 compatibility. The upstream syntax rules remain unchanged;
|
|
36
38
|
unused theme parsers, schemas and their Effect dependency are not bundled.
|
|
37
39
|
Solid and OpenTUI remain host-provided external dependencies.
|
|
38
40
|
|
|
39
|
-
License source: https://github.com/anomalyco/opencode/blob/v2.0.
|
|
41
|
+
License source: https://github.com/anomalyco/opencode/blob/v2.0.29/LICENSE
|
|
40
42
|
|
|
41
43
|
```text
|
|
42
44
|
MIT License
|