backeer-opencode 0.3.2 → 0.4.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
@@ -2,6 +2,23 @@
2
2
 
3
3
  All notable changes to `backeer-opencode` are documented here.
4
4
 
5
+ ## 0.4.0 - 2026-10-11
6
+
7
+ - Add a V2 default definition with a stable ID, setup, event subscription,
8
+ command transform, prompt hook, and abortable cleanup; retain the V1 server
9
+ entrypoint for OpenCode 1.18.29 and newer.
10
+ - Adapt native V2 permission replies, question forms, and execution lifecycle
11
+ events, with location isolation and reconnect handling.
12
+ - Use the V2 plugin installation command for explicitly requested updates.
13
+ - Keep automatic delivery feedback in server logs on V2 rather than injecting
14
+ it into model context. Native V2 no longer provides ignored conversation
15
+ entries or todo.updated events; todo notifications remain available on V1.
16
+ - Rebuild the dependency-free installer bundle and add V2 regression tests.
17
+ - Verification: `npm run check` passes all 49 tests; `npm audit --omit=dev`
18
+ reports no vulnerabilities. The packed installer loads as active on an isolated
19
+ OpenCode 2.0.26 service, `/backeer token` executes without an agent turn, and
20
+ native question answer/cancel calls pass through authenticated discovery.
21
+
5
22
  ## 0.3.2 - 2026-09-02
6
23
 
7
24
  - Synchronize the plugin's reported runtime version with the published package
package/README.md CHANGED
@@ -13,7 +13,7 @@ inbound firewall rule.
13
13
 
14
14
  ## Requirements
15
15
 
16
- - OpenCode with server plugin support
16
+ - OpenCode V2 (tested against 2.0.26), or V1 1.18.29 and newer
17
17
  - Node.js 18 or newer for the local installer and tests
18
18
  - Outbound HTTPS access to `external-gateway.backeer.com:443`
19
19
  - A Backeer source ingest token
@@ -24,7 +24,7 @@ uses that token and weakens host-level auditing and revocation.
24
24
 
25
25
  ## Local installation
26
26
 
27
- The local installer copies a single dependency-free plugin file into OpenCode's
27
+ The local installer copies a single self-contained plugin file into OpenCode's
28
28
  global plugin directory. OpenCode discovers it automatically.
29
29
 
30
30
  ```sh
@@ -54,7 +54,7 @@ Restart OpenCode after installation or update.
54
54
  Install the package in OpenCode's global configuration:
55
55
 
56
56
  ```sh
57
- opencode plugin backeer-opencode -g
57
+ opencode plugin add backeer-opencode
58
58
  npx backeer-opencode@latest configure
59
59
  ```
60
60
 
@@ -67,7 +67,7 @@ Alternatively, add it to `~/.config/opencode/opencode.json` manually:
67
67
  ```json
68
68
  {
69
69
  "$schema": "https://opencode.ai/config.json",
70
- "plugin": ["backeer-opencode"]
70
+ "plugins": ["backeer-opencode"]
71
71
  }
72
72
  ```
73
73
 
@@ -121,14 +121,14 @@ environment variables are supported:
121
121
  | `BACKEER_LOG_LEVEL` | `info` (default), `error`, `debug`, or `silent` |
122
122
 
123
123
  For npm installations, non-secret options can also be supplied through the
124
- OpenCode plugin tuple syntax:
124
+ OpenCode V2 plugin options syntax:
125
125
 
126
126
  ```json
127
127
  {
128
- "plugin": [
129
- [
130
- "backeer-opencode",
131
- {
128
+ "plugins": [
129
+ {
130
+ "package": "backeer-opencode",
131
+ "options": {
132
132
  "permissions": true,
133
133
  "questions": true,
134
134
  "todos": true,
@@ -142,7 +142,7 @@ OpenCode plugin tuple syntax:
142
142
  "retryAttemptThreshold": 3
143
143
  }
144
144
  }
145
- ]
145
+ }
146
146
  ]
147
147
  }
148
148
  ```
@@ -153,7 +153,7 @@ entire lifecycle group. The token itself is deliberately not a plugin option.
153
153
 
154
154
  ## Conversation feedback
155
155
 
156
- User-facing status messages appear as compact Backeer entries in the OpenCode
156
+ On OpenCode V1, user-facing status messages appear as compact Backeer entries in the OpenCode
157
157
  conversation:
158
158
 
159
159
  ```text
@@ -170,8 +170,13 @@ an agent is active, a permission prompt is open, or a question is awaiting an
170
170
  answer remains queued until the interaction closes and the session becomes idle.
171
171
  It never writes to the user's input field or replaces interactive OpenCode UI.
172
172
 
173
- Technical diagnostics use OpenCode's structured application log API instead of
174
- stdout. Normal `info` logging omits HTTP details; set
173
+ On V2, automatic delivery feedback stays in server logs: the V1 ignored/noReply
174
+ conversation API no longer exists. `/backeer` command results use a synthetic
175
+ entry with `resume: false`, so they do not start an agent turn, but they can be
176
+ included in later model context. No credentials are displayed.
177
+
178
+ Technical diagnostics use V1's structured application log API or V2's captured
179
+ server stderr, never stdout. Normal `info` logging omits HTTP details; set
175
180
  `BACKEER_LOG_LEVEL=debug` when technical details are needed. Set it to `error`
176
181
  for failures only or `silent` to disable structured logs.
177
182
 
@@ -228,7 +233,22 @@ package caches.
228
233
 
229
234
  ## Events and decisions
230
235
 
231
- The plugin publishes:
236
+ On V2, native `form.created` question forms are adapted to Backeer question
237
+ cards, replies use `session.form.reply/cancel`, and
238
+ `session.execution.started/succeeded/failed/interrupted` drive lifecycle
239
+ notifications. Only forms marked `metadata.kind: "question"` are forwarded;
240
+ authentication and other forms are never exported. Events from other locations
241
+ are ignored. V2 has no native `todo.updated` event, so todo notifications are
242
+ disabled there regardless of the `todos` option.
243
+
244
+ V2 remote question replies require the managed shared service. OpenCode 2.0.26
245
+ does not expose forms on the plugin context, so the plugin uses the official
246
+ client's authenticated service discovery and verifies session location before
247
+ answering. It never starts another service. Notifications work in standalone
248
+ mode, but remote question replies fail explicitly there rather than contacting
249
+ a different session.
250
+
251
+ The V1 event mappings are:
232
252
 
233
253
  | OpenCode event | Backeer behavior |
234
254
  |---|---|