@noppu-labs/opencode-permission-reviewer 3.1.0 → 3.2.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/CHANGELOG.md +33 -0
- package/MIGRATION.md +4 -7
- package/NOTICE +2 -2
- package/README.md +1 -1
- package/dist/explain.js +2725 -2725
- package/dist/index.d.ts +638 -538
- package/dist/index.js +11560 -11504
- package/dist/rpc.d.ts +1 -1
- package/dist/rpc.js +1 -1
- package/dist/tui/{opencode → adapters/opencode}/event-normalizer.ts +2 -2
- package/dist/tui/{config-fields.ts → modules/config/models/config-fields.ts} +2 -2
- package/dist/tui/{config-knobs.ts → modules/config/models/config-knobs.ts} +1 -1
- package/dist/tui/{config-policy-rules.ts → modules/config/models/config-policy-rules.ts} +2 -2
- package/dist/tui/{config-risk-policy.ts → modules/config/models/config-risk-policy.ts} +2 -1
- package/dist/tui/{config.ts → modules/config/services/config.ts} +5 -5
- package/dist/tui/{config → modules/config/services}/layer-read.ts +4 -3
- package/dist/tui/{config → modules/config/services}/loader.ts +3 -3
- package/dist/tui/{reviewer-model.ts → modules/config/services/reviewer-model.ts} +6 -3
- package/dist/tui/{config → modules/config/services}/risk-policy-clamp.ts +2 -2
- package/dist/tui/{system-one-routing.ts → modules/config/services/system-one-routing.ts} +1 -1
- package/dist/tui/{config → modules/config/services}/trust-boundary.ts +4 -4
- package/dist/tui/{config → modules/config/services}/trusted-degradation.ts +2 -2
- package/dist/tui/{config-rule-condition.ts → modules/policy/config-rule-condition.ts} +1 -1
- package/dist/tui/{ui-protocol.ts → modules/status/models/ui-protocol.ts} +9 -9
- package/dist/tui/{ui-state.ts → modules/status/services/ui-state.ts} +2 -2
- package/dist/tui/{ui-status-extras.ts → modules/status/services/ui-status-extras.ts} +4 -2
- package/dist/tui/{ui-status-parse.ts → modules/status/services/ui-status-parse.ts} +5 -5
- package/dist/tui/tui.tsx +5 -5
- package/dist/tui/ui/action-fit.ts +10 -2
- package/dist/tui/ui/attribution.ts +4 -3
- package/dist/tui/ui/components.tsx +1 -1
- package/dist/tui/ui/config-notices.ts +1 -1
- package/dist/tui/ui/fit-parts.ts +1 -1
- package/dist/tui/ui/manual-toast.ts +3 -3
- package/dist/tui/ui/review-feed.ts +3 -3
- package/dist/tui/ui/review-overlay.tsx +1 -1
- package/dist/tui/ui/review-result.tsx +1 -1
- package/dist/tui/ui/review-store.ts +3 -3
- package/dist/tui/ui/review-theme.ts +1 -1
- package/dist/tui/ui/v1-host.ts +5 -2
- package/dist/tui/ui/v2.tsx +1 -1
- package/package.json +10 -8
- package/dist/tui/types.ts +0 -357
- /package/dist/tui/{config → modules/config/services}/jsonc.ts +0 -0
- /package/dist/tui/{config → modules/config/services}/trust-boundary-keys.ts +0 -0
- /package/dist/tui/{failure-kind.ts → modules/status/models/failure-kind.ts} +0 -0
- /package/dist/tui/{ui → modules/status/models}/rpc.ts +0 -0
- /package/dist/tui/{ui-text-elide.ts → modules/status/services/ui-text-elide.ts} +0 -0
- /package/dist/tui/{descriptor-io.ts → utils/descriptor-io.ts} +0 -0
- /package/dist/tui/{is-record.ts → utils/is-record.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.2.1] - 2026-10-23
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Internal restructure of `src/` into layered modules, adapters and helpers, with a test that
|
|
15
|
+
enforces the dependency direction. No behaviour change: the package exports, command-line
|
|
16
|
+
interface, configuration and shipped files are the same as in 3.2.0.
|
|
17
|
+
|
|
18
|
+
## [3.2.0] - 2026-10-23
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- OpenCode V2 hosts before 2.0.22 are no longer supported; V2 now requires
|
|
23
|
+
`>=2.0.22 <3`. The reviewer relies on plugin-context APIs introduced in
|
|
24
|
+
2.0.22.
|
|
25
|
+
- On OpenCode V2 the reviewer now runs through the plugin's own context by
|
|
26
|
+
default, so it works in every server mode (background service, standalone, or
|
|
27
|
+
`serve`) with no setup. `OPENCODE_PERMISSION_REVIEWER_HOST_URL` and
|
|
28
|
+
`OPENCODE_PASSWORD` remain an explicit override for an independent server.
|
|
29
|
+
|
|
30
|
+
### Removed
|
|
31
|
+
|
|
32
|
+
- OpenCode V2 registered-service discovery (`service.json`) is gone; the host
|
|
33
|
+
connection no longer uses it, and it is no longer needed in any server mode.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- When the reviewer reaches a different OpenCode server than the one it runs in, the error now
|
|
38
|
+
says which server it reached and which settings point it at the right one.
|
|
39
|
+
- Jev answers where a supporting judgement (risk, authorization, scope, evidence, or basis) is
|
|
40
|
+
within 0.02 of the most probable option are no longer treated as invalid. The allow, deny,
|
|
41
|
+
or escalate outcome itself must still be the most probable option.
|
|
42
|
+
|
|
10
43
|
## [3.1.0] - 2026-10-21
|
|
11
44
|
|
|
12
45
|
### Added
|
package/MIGRATION.md
CHANGED
|
@@ -6,7 +6,7 @@ in `tests/compatibility/host-contracts.json`.
|
|
|
6
6
|
|
|
7
7
|
| Setting | V1 | V2 |
|
|
8
8
|
| ---------------------- | ----------------------------- | ------------------------------------- |
|
|
9
|
-
| Host | 1.18.29 or newer V1 | >=2.0.
|
|
9
|
+
| Host | 1.18.29 or newer V1 | >=2.0.22 <3 |
|
|
10
10
|
| Server config key | `plugin` | `plugins` |
|
|
11
11
|
| Entry with options | `[package, options]` | `{package, options}` |
|
|
12
12
|
| Terminal config | `tui.json` or `tui.jsonc` | Global `cli.json` |
|
|
@@ -35,12 +35,9 @@ trusted restrictions.
|
|
|
35
35
|
The reviewer model must be configured globally in OpenCode so its isolated
|
|
36
36
|
location can resolve it without loading project providers or instructions.
|
|
37
37
|
|
|
38
|
-
V2
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
the reviewer then proves the plugin instance through its own RPC identity. It
|
|
42
|
-
never starts a service. An independent server requires these trusted environment
|
|
43
|
-
settings:
|
|
38
|
+
On V2 the reviewer drives the review through the plugin context, so it works
|
|
39
|
+
in every server mode with no setup. An independent server overrides the
|
|
40
|
+
in-process host with these trusted environment settings:
|
|
44
41
|
|
|
45
42
|
```bash
|
|
46
43
|
export OPENCODE_PERMISSION_REVIEWER_HOST_URL=http://127.0.0.1:4096
|
package/NOTICE
CHANGED
|
@@ -7,8 +7,8 @@ licensed under the Apache License, Version 2.0 (see ./LICENSE-APACHE). Code from
|
|
|
7
7
|
that project remains under the Apache License, Version 2.0. Changes made in this
|
|
8
8
|
fork are licensed under the MIT License (see ./LICENSE).
|
|
9
9
|
|
|
10
|
-
The reviewer policy in src/policy.ts is adapted
|
|
11
|
-
auto-review policy and policy template:
|
|
10
|
+
The reviewer policy in src/modules/context/services/prompt/policy.ts is adapted
|
|
11
|
+
from the OpenAI Codex Guardian auto-review policy and policy template:
|
|
12
12
|
|
|
13
13
|
https://github.com/openai/codex/tree/c82cb044f3413e6584308d969b94e7a1430711ab/codex-rs/core/src/guardian
|
|
14
14
|
|
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ plugin, not affiliated with or endorsed by [Anomaly](https://anoma.ly).
|
|
|
39
39
|
## Requirements
|
|
40
40
|
|
|
41
41
|
- [Bun](https://bun.sh) >= 1.3.0
|
|
42
|
-
- [OpenCode](https://opencode.ai) V1 `>=1.18.29 <2` (tested with 1.18.35) or V2 `>=2.0.
|
|
42
|
+
- [OpenCode](https://opencode.ai) V1 `>=1.18.29 <2` (tested with 1.18.35) or V2 `>=2.0.22 <3`
|
|
43
43
|
(tested with 2.0.26)
|
|
44
44
|
- `git` on `PATH`, used only for read-only Git enrichment. Without it, the reviewer gets no Git
|
|
45
45
|
snapshot.
|