opencode-raven 2.2.2 → 2.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
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.3.0
4
+
5
+ ### Added
6
+ - OpenCode 2 support through a native `setup()` adapter, sharing Raven configuration and MCP runtime with OpenCode 1.
7
+ - V2 agent/tool registration, shell routing, model discovery, guidance injection, child-session completion waiting, cancellation, continuation validation, and provider-error handling.
8
+ - A v2 terminal companion and typed RPC contract for immediate `/raven` command output and notifications without a model turn.
9
+ - Native-host smoke checks, including offline v2 routing and delegation, alongside v1/v2 regression tests.
10
+
11
+ ### Changed
12
+ - Raised the OpenCode 1 minimum to 1.18.29 for the shared `server()`/`setup()` object entrypoint. The v2 adapter targets OpenCode 2.0.26 and newer 2.x releases.
13
+ - OpenCode 2 installation uses `plugins`; OpenCode 1 continues to use `plugin`.
14
+ - V2 update instructions delegate cache management to OpenCode instead of deleting v1 cache paths.
15
+
3
16
  ## 2.2.2
4
17
 
5
18
  ### Added
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  <div align="center">
2
2
  <h1>opencode-raven</h1>
3
3
  <p><strong>Keep noisy tool work out of your main OpenCode context.</strong></p>
4
+ <p><strong>Supports OpenCode V2 (2.0.26+) and OpenCode V1 (1.18.29+), in one package.</strong></p>
4
5
  <p>
5
6
  <a href="https://www.npmjs.com/package/opencode-raven"><img src="https://img.shields.io/npm/v/opencode-raven.svg" alt="npm version" /></a>
6
7
  <a href="https://www.npmjs.com/package/opencode-raven"><img src="https://img.shields.io/npm/dm/opencode-raven.svg" alt="npm downloads" /></a>
@@ -29,7 +30,21 @@
29
30
 
30
31
  ## Install
31
32
 
32
- Raven requires OpenCode 1.15.12 or newer. Add it to `opencode.jsonc`:
33
+ **Raven 2.3 supports OpenCode V2 (2.0.26+).** OpenCode V1 (1.18.29+) remains supported in the same package—no separate plugin is needed.
34
+
35
+ ### OpenCode V2
36
+
37
+ Use the v2 `plugins` key in `opencode.jsonc`:
38
+
39
+ ```jsonc
40
+ {
41
+ "plugins": ["opencode-raven"]
42
+ }
43
+ ```
44
+
45
+ ### OpenCode V1
46
+
47
+ Use the v1 `plugin` key in `opencode.jsonc`:
33
48
 
34
49
  ```jsonc
35
50
  {
@@ -41,6 +56,16 @@ Restart OpenCode, then run `/raven` to verify the loaded version, model, routing
41
56
 
42
57
  OpenCode resolves the package from npm and caches it automatically.
43
58
 
59
+ ### Upgrading From OpenCode 1 To 2
60
+
61
+ Keep using `opencode-raven`; change its OpenCode config entry from `plugin` to `plugins`. Raven's existing `~/.config/opencode/opencode-raven/raven-config.json` is shared by both versions, including models, on-demand MCPs, routing settings, and stats. Quit and restart OpenCode after upgrading.
62
+
63
+ OpenCode 1 uses Raven's `server()` entrypoint; OpenCode 2 uses `setup()` and automatically loads the terminal companion. The terminal companion displays `/raven` command results in a dialog and delivers startup/update warnings as toasts, without sending a prompt to the model. The v2 server also exposes the typed `opencode-raven/rpc` command contract for other clients.
64
+
65
+ The v1 minimum is 1.18.29 because earlier versions cannot load the shared object entrypoint. See OpenCode's [plugin migration guide](https://opencode.ai/v2/docs/build/plugins/migrate-v1) for the upstream lifecycle and config changes.
66
+
67
+ For local development, v1 can load `file:///path/to/opencode-raven/index.ts`; v2 requires the package directory, `file:///path/to/opencode-raven`.
68
+
44
69
  ### First-Time Setup
45
70
 
46
71
  On first start, Raven checks OpenCode's connected provider catalog and automatically selects an available zero-cost, tool-capable model from the `opencode` provider for both Raven agents. Free-model availability is controlled by the provider and can change.
@@ -183,7 +208,7 @@ Generated MCP metadata and main-model guidance live beside `raven-config.json`.
183
208
 
184
209
  ## Routing
185
210
 
186
- Default routed tools are `grep`, `glob`, `webfetch`, `fetch`, `websearch`, and search-like `bash` commands.
211
+ Default routed tools are `grep`, `glob`, `webfetch`, `fetch`, `websearch`, and search-like `bash` commands. On OpenCode 2, Raven also recognizes the native `shell` tool; `bash` and `shell` are routing aliases, so existing routing settings continue to work. Exact `excludeTools` entries use the host's actual tool name.
187
212
 
188
213
  Global MCPs are automatically routed when their OpenCode tool names use the normal `<server>_<tool>` prefix. Use a keyword for suffix-style names:
189
214
 
@@ -247,6 +272,20 @@ Review `Raven.md` and your MCP commands before using Raven in sensitive environm
247
272
  - Stale plugin version: run `/raven update`, restart OpenCode, and follow the cache-clearing instructions it prints if needed.
248
273
  - Remove Raven: delete `"opencode-raven"` from `plugin`, restart, then optionally remove `~/.config/opencode/opencode-raven/`.
249
274
 
275
+ On OpenCode 2, remove it from `plugins` instead. `/raven update` uses v1 cache-clearing behavior only on OpenCode 1; on v2 it checks the version and provides restart/pinned-version instructions while leaving cache management to OpenCode.
276
+
277
+ ## Development Checks
278
+
279
+ ```sh
280
+ bun install
281
+ bun test
282
+ bun run typecheck
283
+ bun scripts/smoke-compat.ts v1 /path/to/opencode-v1
284
+ bun scripts/smoke-compat.ts v2 /path/to/opencode-v2
285
+ ```
286
+
287
+ The native smoke checks use isolated configuration and data directories. The v2 check uses a deterministic local model endpoint to exercise routed main-agent search, direct Raven child search, delegation completion, and command/RPC output without calling a paid model provider.
288
+
250
289
  See [CHANGELOG.md](CHANGELOG.md) for release history.
251
290
 
252
291
  ## Disclaimer