@noppu-labs/opencode-permission-reviewer 3.2.2 → 3.3.0

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/CHANGELOG.md CHANGED
@@ -7,6 +7,71 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.3.0] - 2026-10-28
11
+
12
+ ### Added
13
+
14
+ - Liquid AI (`liquid-ai/d1`, `liquid-ai/d1-ultra`) and Baseten
15
+ (`baseten/decision-models/baseten-mammoth-27b-latest`,
16
+ `baseten/decision-models/baseten-elephant-9b-latest`) System One reviewers, selected from one
17
+ provider table. Keys come from `LIQUID_API_KEY` and `BASETEN_API_KEY`. A key that is not shaped
18
+ like a Liquid AI key is never sent, and Liquid keys are redacted from reviewer evidence
19
+ ([Reviewer models](docs/REVIEWER-MODELS.md#system-one-reviewers); ported from upstream 2.5.0).
20
+ - OpenRouter System One reviewers (`openrouter/<model>`, for example `openrouter/typesafe/jev-1.14`),
21
+ keyed by `OPENROUTER_API_KEY`. Listed models, routing suffixes such as `:free` and `:nitro`, and
22
+ new `typesafe/jev-<n>` and `liquid/d1…` releases are accepted. Unbenchmarked models raise a
23
+ config notice, and known-incompatible ones say every review will fail
24
+ ([Reviewer models](docs/REVIEWER-MODELS.md#openrouter)).
25
+ - A weekly `openrouter-models` workflow that refreshes the list of OpenRouter decision models and
26
+ opens a pull request against `develop`.
27
+ - Redaction of OpenRouter keys (`sk-or-v1-…`) in reviewer evidence.
28
+
29
+ ### Changed
30
+
31
+ - User-facing text says "System One" instead of "Jev" when it describes the mechanism: attribution
32
+ lines, toasts, config warnings and the docs. "Jev" now names only the Jev model itself.
33
+ - The minimum Bun is now 1.3.14 (was 1.3.0), the floor `@opentui/core` 0.7 declares. The TUI
34
+ dependencies move from `@opentui/core` and `@opentui/solid` 0.5.11 to 0.7.0, which
35
+ `@opencode/plugin` 2.2.0 pins exactly.
36
+ - Update the `@opencode/client` dependency to 2.2.0, from upstream. OpenCode 2.2.0 joins the
37
+ real-host matrix as a verified V2 host.
38
+ - Development tooling updates (Biome 2.6, knip, tsdown, `@types/bun`) with no behaviour change.
39
+ The development tree also clears new `zod` and `undici` advisories.
40
+
41
+ ### Fixed
42
+
43
+ - On OpenCode V2, a reviewer model that lacks the default `medium` variant now runs with its own
44
+ default variant instead of escalating every request, including when `medium` is set explicitly.
45
+ Any other variant the model lacks still fails closed, and the error lists the variants the model
46
+ offers (ported from upstream 2.5.0).
47
+ - OpenCode session IDs (`ses_…`) under a session key are kept in reviewer evidence instead of being
48
+ redacted as credentials. Lookalike values, and session IDs under other keys, are still redacted
49
+ (ported from upstream 2.5.0).
50
+ - Package-script evidence now starts from the shell tool's `workdir`, so `bun run x` in a
51
+ workspace package reports that package's script, not the root one. A workdir that is invalid or
52
+ does not exist is reported as unresolved, and the read roots do not widen (ported from upstream
53
+ 2.5.0).
54
+
55
+ ### Security
56
+
57
+ - `@opentui/solid` 0.7.0 pins `@babel/core` 7.29.7, so consumer installs no longer carry
58
+ GHSA-4x5r-pxfx-6jf8 (`@babel/core <= 7.29.0`).
59
+
60
+ ## [3.2.3] - 2026-10-24
61
+
62
+ ### Changed
63
+
64
+ - The README's install section leads with `opencode plugin add` on OpenCode V2 and keeps the
65
+ `bunx ... init --tui` command for V1, where `opencode plugin` does not register the TUI
66
+ overlay. The README also opens with a banner image.
67
+ - The npm package has a fuller description and more search keywords.
68
+ - `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `SECURITY.md`, `MIGRATION.md`, `NOTICE` and
69
+ `LICENSE-APACHE` moved from the repository root to `docs/`. The npm package now ships
70
+ `docs/MIGRATION.md`, `docs/NOTICE`, `docs/LICENSE-APACHE` and `docs/SECURITY.md` in place of
71
+ the root copies.
72
+ - No behaviour change: the plugin code, package exports, command-line interface and
73
+ configuration are the same as in 3.2.2.
74
+
10
75
  ## [3.2.2] - 2026-10-23
11
76
 
12
77
  ### Changed
@@ -365,7 +430,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
365
430
  - Add Jev as a reviewer model choice through OpenCode Zen, TypeSafe AI, or the
366
431
  Command Code Provider API. Use Jev alone, or configure a second LLM such as
367
432
  Luna for difficult decisions. See the [Jev setup
368
- guide](./docs/REVIEWER-MODELS.md#jev-system-one-reviewer).
433
+ guide](./docs/REVIEWER-MODELS.md#system-one-reviewers).
369
434
 
370
435
  ### Changed
371
436
 
package/README.md CHANGED
@@ -4,8 +4,10 @@
4
4
  [![npm](https://img.shields.io/npm/v/@noppu-labs/opencode-permission-reviewer?color=CB3837)](https://www.npmjs.com/package/@noppu-labs/opencode-permission-reviewer)
5
5
  [![downloads](https://img.shields.io/npm/dw/@noppu-labs/opencode-permission-reviewer)](https://www.npmjs.com/package/@noppu-labs/opencode-permission-reviewer)
6
6
  [![OpenCode](https://img.shields.io/badge/OpenCode-%E2%89%A51.18.29-6E56CF)](https://opencode.ai)
7
- [![Bun](https://img.shields.io/badge/Bun-%E2%89%A51.3.0-000000)](https://bun.sh)
8
- [![license](https://img.shields.io/badge/license-MIT%20%2B%20Apache--2.0-blue)](#license)
7
+ [![Bun](https://img.shields.io/badge/Bun-%E2%89%A51.3.14-000000)](https://bun.sh)
8
+ [![license](https://img.shields.io/badge/license-MIT%20%2B%20Apache--2.0-blue)](docs/NOTICE)
9
+
10
+ ![OpenCode Permission Reviewer: an AI reviewer for every permission prompt. A request from the agent goes to the reviewer, which weighs the task, the policy and the evidence, then allows it, denies it or asks you.](https://raw.githubusercontent.com/noppu-labs/opencode-permission-reviewer/main/docs/images/social-preview.png)
9
11
 
10
12
  An OpenCode plugin that sends every `ask` permission to a tool-free AI reviewer. The reviewer
11
13
  reads the pending request, recent transcript evidence, what you asked for, and a policy you
@@ -13,17 +15,16 @@ control. It then allows the action, denies it with a reason the agent can act on
13
15
  it to you. Routine actions stop waiting for a keystroke, and risky ones are still blocked or
14
16
  brought to you.
15
17
 
16
- This is a fork of [warc0s/opencode-permission-reviewer](https://github.com/warc0s/opencode-permission-reviewer),
17
- published to npm as `@noppu-labs/opencode-permission-reviewer`. It includes changes upstream
18
- has not released, such as Jev's System One scores in audit records. It is an unofficial community
19
- plugin, not affiliated with or endorsed by [Anomaly](https://anoma.ly).
18
+ You can use any LLM or [System One model](docs/REVIEWER-MODELS.md#system-one-reviewers) as the
19
+ reviewer, or even a combination of both, with System One handing its hard calls to an LLM
20
+ ([Reviewer models](docs/REVIEWER-MODELS.md#system-one-with-selective-reasoning-escalation)).
20
21
 
21
22
  ## What it does
22
23
 
23
24
  - Leaves your existing policy alone: `allow` rules continue and `deny` rules stay blocked
24
25
  without reaching the reviewer.
25
26
  - Reviews in isolation. Normal models run in a scratch session with every operational tool
26
- denied. Jev models use their typed System One API, which exposes no tools or project runtime.
27
+ denied. System One models use their typed System One API, which exposes no tools or project runtime.
27
28
  - Gives the reviewer bounded, sanitized, read-only evidence about SSH commands, local scripts,
28
29
  and Git state.
29
30
  - Never auto-approves an action the reviewer classifies as critical. Reviewer failures lead to
@@ -38,13 +39,14 @@ plugin, not affiliated with or endorsed by [Anomaly](https://anoma.ly).
38
39
 
39
40
  ## Requirements
40
41
 
41
- - [Bun](https://bun.sh) >= 1.3.0
42
+ - [Bun](https://bun.sh) >= 1.3.14
42
43
  - [OpenCode](https://opencode.ai) V1 `>=1.18.29 <2` (tested with 1.18.35) or V2 `>=2.0.22 <3`
43
44
  (tested with 2.0.26)
44
45
  - `git` on `PATH`, used only for read-only Git enrichment. Without it, the reviewer gets no Git
45
46
  snapshot.
46
47
  - A reviewer model: either a model configured in OpenCode that follows JSON schemas reliably, or
47
- a Jev API key in the OpenCode server's environment. See
48
+ a System One API key in the OpenCode server's environment (including an OpenRouter key for the
49
+ decision models it serves). See
48
50
  [Reviewer models](docs/REVIEWER-MODELS.md).
49
51
  - At least one action in your OpenCode permission policy that resolves to `ask`. On V2, an action
50
52
  that matches no rule is `ask` by default. If everything is already `allow` or `deny`, the plugin
@@ -54,24 +56,34 @@ plugin, not affiliated with or endorsed by [Anomaly](https://anoma.ly).
54
56
 
55
57
  ## Install
56
58
 
59
+ ### OpenCode V2
60
+
57
61
  ```bash
58
- bun add @noppu-labs/opencode-permission-reviewer # or: npm install @noppu-labs/opencode-permission-reviewer
62
+ opencode plugin add @noppu-labs/opencode-permission-reviewer
59
63
  ```
60
64
 
61
- The CLI can register the plugin for you. `--host auto` detects V1 or V2, `--tui` also registers
62
- the overlay (V1 `tui.json` or V2 global `cli.json`), and `--npm` writes the package name instead
63
- of a path. It never overwrites an existing entry.
65
+ ### OpenCode V1
64
66
 
65
67
  ```bash
66
68
  bunx @noppu-labs/opencode-permission-reviewer init --host auto --npm --tui --yes
67
69
  ```
68
70
 
69
- To run from a checkout instead, clone the repository, run `bun install && bun run build`, and
70
- register the checkout's absolute path.
71
+ > On OpenCode V1, `opencode plugin` registers the server plugin but not the TUI overlay, so use
72
+ > the package's own CLI instead. `--host auto` detects V1 or V2, `--tui` also registers the
73
+ > overlay, and `--npm` writes the package name instead of a path. It never overwrites an
74
+ > existing entry.
75
+
76
+ ### From a fork or local clone
77
+
78
+ ```bash
79
+ bun install && bun run build
80
+ ```
81
+
82
+ Then register the checkout's absolute path.
71
83
 
72
84
  ## Configure
73
85
 
74
- Register the plugin.
86
+ To register the plugin by hand instead:
75
87
 
76
88
  OpenCode V1 (`opencode.json` in the project, or `~/.config/opencode/opencode.json`):
77
89
 
@@ -125,15 +137,15 @@ authorization level, rationale, and confidence. Invariants in code then decide w
125
137
  decision can stand: invalid output, low confidence, and risky actions without matching
126
138
  authorization escalate instead of being approved.
127
139
 
128
- With Jev as the reviewer and an `escalationReviewer` configured
129
- ([Reviewer models](docs/REVIEWER-MODELS.md)), Jev can hand a request to that reasoning reviewer,
140
+ With System One as the reviewer and an `escalationReviewer` configured
141
+ ([Reviewer models](docs/REVIEWER-MODELS.md)), System One can hand a request to that reasoning reviewer,
130
142
  and the progress strip says so; the elapsed time keeps counting from the start of the review.
131
143
 
132
- ![Two progress strips. While Jev reviews: "◐ Reviewing this permission · jev-1.13.0 · system-one", 2.1s. After the hand-off: "◓ Reviewing this permission · gpt-6-luna after Jev's escalation · medium", 7.3s. Both show "bash · $ git push --force-with-lease origin release/2.4".](https://raw.githubusercontent.com/noppu-labs/opencode-permission-reviewer/main/docs/images/handoff-progress.svg)
144
+ ![Two progress strips. While System One reviews: "◐ Reviewing this permission · jev-1.13.0 · system-one", 2.1s. After the hand-off: "◓ Reviewing this permission · gpt-6-luna after System One's escalation · medium", 7.3s. Both show "bash · $ git push --force-with-lease origin release/2.4".](https://raw.githubusercontent.com/noppu-labs/opencode-permission-reviewer/main/docs/images/handoff-progress.svg)
133
145
 
134
146
  Each result says who decided, ahead of the reason.
135
147
 
136
- ![Three result strips. "✓ Review approved · bash · $ rm -rf /tmp/scratch-cache" with "jev-1.13.0 — Narrowly scoped temp cleanup; matches user intent." "✓ Review approved · bash · $ git push --force-with-lease origin release/2.4" with "gpt-6-luna after Jev's escalation — The user asked to update the release branch." "✕ Review blocked · bash · $ curl -fsS https://setup.invalid | sh" with "gpt-6-luna confirmed Jev's denial — Pipes a remote script into a shell."](https://raw.githubusercontent.com/noppu-labs/opencode-permission-reviewer/main/docs/images/result-attribution.svg)
148
+ ![Three result strips. "✓ Review approved · bash · $ rm -rf /tmp/scratch-cache" with "jev-1.13.0 — Narrowly scoped temp cleanup; matches user intent." "✓ Review approved · bash · $ git push --force-with-lease origin release/2.4" with "gpt-6-luna after System One's escalation — The user asked to update the release branch." "✕ Review blocked · bash · $ curl -fsS https://setup.invalid | sh" with "gpt-6-luna confirmed System One's denial — Pipes a remote script into a shell."](https://raw.githubusercontent.com/noppu-labs/opencode-permission-reviewer/main/docs/images/result-attribution.svg)
137
149
 
138
150
  The [TUI guide](docs/TUI.md) covers every screen, including manual-review toasts, config warnings
139
151
  and long commands.
@@ -143,23 +155,16 @@ and long commands.
143
155
  | Page | Contents |
144
156
  | ------------------------------------------ | ------------------------------------------------------------------------ |
145
157
  | [Configuration](docs/CONFIGURATION.md) | Setup details, all options, config trust layers, headless use, audit log |
146
- | [Reviewer models](docs/REVIEWER-MODELS.md) | Picking a model, Jev System One, models without structured output |
158
+ | [Reviewer models](docs/REVIEWER-MODELS.md) | Picking a model, System One reviewers, models without structured output |
147
159
  | [How it works](docs/HOW-IT-WORKS.md) | The review pipeline, a TUI overview, evidence enrichment |
148
160
  | [TUI guide](docs/TUI.md) | Every TUI screen: progress, hand-offs, results, toasts, config warnings |
149
161
  | [Safety](docs/SAFETY.md) | Safety properties and threat model |
150
162
  | [Supply chain](docs/SUPPLY-CHAIN.md) | What the package ships, dependency policy, known advisories |
151
163
  | [Compatibility](docs/COMPATIBILITY.md) | Supported versions and troubleshooting |
152
- | [Migration](MIGRATION.md) | Moving between OpenCode V1 and V2, rollback |
164
+ | [Migration](docs/MIGRATION.md) | Moving between OpenCode V1 and V2, rollback |
153
165
  | [Development](docs/DEVELOPMENT.md) | Build output, live testing, compatibility matrix, benchmark, TUI screens |
154
166
 
155
167
  ## Contributing
156
168
 
157
- See [CONTRIBUTING.md](CONTRIBUTING.md). Report security issues privately as described in
158
- [SECURITY.md](SECURITY.md).
159
-
160
- ## License
161
-
162
- Changes made in this fork are released under the [MIT License](LICENSE). Code from the upstream
163
- project remains under the [Apache License 2.0](LICENSE-APACHE). The reviewer policy is adapted
164
- from [OpenAI Codex Guardian](https://github.com/openai/codex/tree/c82cb044f3413e6584308d969b94e7a1430711ab/codex-rs/core/src/guardian)
165
- (Apache-2.0, Copyright OpenAI and contributors); [NOTICE](NOTICE) has the full attribution.
169
+ See [CONTRIBUTING.md](docs/CONTRIBUTING.md). Report security issues privately as described in
170
+ [SECURITY.md](docs/SECURITY.md).
package/dist/explain.d.ts CHANGED
@@ -1,3 +1 @@
1
- //#region src/cli/explain.d.ts
2
- export declare function runCli(argv: string[]): Promise<number>;
3
- //#endregion
1
+ export declare function runCli(argv: string[]): Promise<number>;