backeer-opencode 0.1.5 → 0.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 CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  All notable changes to `backeer-opencode` are documented here.
4
4
 
5
+ ## 0.2.1 - 2026-09-01
6
+
7
+ - Add `/backeer doctor` for read-only local configuration, protected token,
8
+ source authentication, gateway capability, and APNs diagnostics.
9
+ - Add `/backeer test` to send a uniquely correlated end-to-end mobile test
10
+ notification.
11
+ - Keep doctor reports and command output free of bearer token values.
12
+
13
+ ## 0.2.0 - 2026-09-01
14
+
15
+ - Notify when an OpenCode assistant run completes successfully.
16
+ - Notify terminal session errors with redacted diagnostic summaries.
17
+ - Warn once when a session reaches its third retry attempt.
18
+ - Notify once per version when an OpenCode update is available.
19
+ - Add granular lifecycle configuration and lifecycle state to `/backeer status`.
20
+ - Use stable lifecycle event IDs and the completion sound for successful runs.
21
+
5
22
  ## 0.1.5 - 2026-09-01
6
23
 
7
24
  - Check the NPM registry for a newer Backeer plugin version once per day.
package/README.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # Backeer for OpenCode
2
2
 
3
3
  `backeer-opencode` connects OpenCode to Backeer. It sends mobile notifications
4
- for permission requests, questions, and completed todo lists. While a permission
5
- is pending, it also consumes an authenticated Backeer command stream so an
6
- authorized user can answer **Allow once**, **Always allow**, or **Reject** from
7
- the Backeer iOS application.
4
+ for permission requests, questions, completed todo lists, completed assistant
5
+ runs, session failures, prolonged retries, and OpenCode updates. While a
6
+ permission is pending, it also consumes an authenticated Backeer command stream
7
+ so an authorized user can answer **Allow once**, **Always allow**, or **Reject**
8
+ from the Backeer iOS application.
8
9
 
9
10
  The plugin uses outbound HTTPS only. It does not start a server or require an
10
11
  inbound firewall rule.
@@ -109,6 +110,13 @@ environment variables are supported:
109
110
  | `BACKEER_NOTIFY_PERMISSIONS` | Set to `false` to disable permission notifications and remote replies |
110
111
  | `BACKEER_NOTIFY_QUESTIONS` | Set to `false` to disable question notifications |
111
112
  | `BACKEER_NOTIFY_TODOS` | Set to `false` to disable todo-completion notifications |
113
+ | `BACKEER_NOTIFY_LIFECYCLE` | Set to `false` to disable every lifecycle notification |
114
+ | `BACKEER_NOTIFY_SESSION_COMPLETED` | Set to `false` to disable successful-run notifications |
115
+ | `BACKEER_NOTIFY_SESSION_ERRORS` | Set to `false` to disable session-error notifications |
116
+ | `BACKEER_NOTIFY_SESSION_RETRIES` | Set to `false` to disable retry warnings |
117
+ | `BACKEER_NOTIFY_OPENCODE_UPDATES` | Set to `false` to disable OpenCode update notifications |
118
+ | `BACKEER_SESSION_COMPLETION_MIN_SECONDS` | Minimum run duration; defaults to `0` (every completion) |
119
+ | `BACKEER_RETRY_ATTEMPT_THRESHOLD` | First retry attempt that triggers a warning; defaults to `3` |
112
120
  | `BACKEER_LOG_LEVEL` | `info` (default), `error`, `debug`, or `silent` |
113
121
 
114
122
  For npm installations, non-secret options can also be supplied through the
@@ -122,7 +130,16 @@ OpenCode plugin tuple syntax:
122
130
  {
123
131
  "permissions": true,
124
132
  "questions": true,
125
- "todos": true
133
+ "todos": true,
134
+ "lifecycle": {
135
+ "enabled": true,
136
+ "completed": true,
137
+ "errors": true,
138
+ "retries": true,
139
+ "updates": true,
140
+ "completionMinSeconds": 0,
141
+ "retryAttemptThreshold": 3
142
+ }
126
143
  }
127
144
  ]
128
145
  ]
@@ -130,7 +147,8 @@ OpenCode plugin tuple syntax:
130
147
  ```
131
148
 
132
149
  Supported options are `origin`, `tokenFile`, `permissions`, `questions`,
133
- `todos`, and `logLevel`. The token itself is deliberately not a plugin option.
150
+ `todos`, `lifecycle`, and `logLevel`. Use `"lifecycle": false` to disable the
151
+ entire lifecycle group. The token itself is deliberately not a plugin option.
134
152
 
135
153
  ## Console feedback
136
154
 
@@ -140,6 +158,9 @@ The plugin writes compact, single-line status messages instead of raw HTTP logs:
140
158
  ◆ Backeer Permission request sent
141
159
  ◆ Backeer Question sent
142
160
  ◆ Backeer Todo completion sent
161
+ ◆ Backeer Task completion sent
162
+ ◆ Backeer Retry warning sent
163
+ ◆ Backeer Task failure sent
143
164
  ✓ Backeer Decision applied: Always allow
144
165
  ! Backeer Connection interrupted — retrying
145
166
  ```
@@ -156,6 +177,8 @@ The plugin registers a `/backeer` command inside OpenCode:
156
177
  ```text
157
178
  /backeer
158
179
  /backeer status
180
+ /backeer doctor
181
+ /backeer test
159
182
  /backeer update-check
160
183
  /backeer update
161
184
  /backeer token
@@ -163,9 +186,19 @@ The plugin registers a `/backeer` command inside OpenCode:
163
186
  ```
164
187
 
165
188
  The status report shows the plugin version, gateway reachability, token source,
166
- notification switches, command-stream state, pending permissions, and log level.
167
- It never displays the token. Gateway reachability does not validate the source
168
- credential.
189
+ notification switches and lifecycle thresholds, command-stream state, pending
190
+ permissions, and log level. It never displays the token. Gateway reachability
191
+ does not validate the source credential.
192
+
193
+ `/backeer doctor` performs a read-only diagnostic pass. It verifies the local
194
+ configuration, protected token-file permissions, source authentication, event
195
+ and command capabilities, and gateway APNs readiness. It does not create an
196
+ event, open a command stream, or display the bearer token.
197
+
198
+ `/backeer test` publishes one uniquely correlated, non-actionable application
199
+ event and asks the gateway to deliver a real push notification. Use it after
200
+ installation, token rotation, or network changes to verify the complete path
201
+ from OpenCode to the phone.
169
202
 
170
203
  `/backeer token` displays safe rotation instructions. Never paste a raw token
171
204
  into slash-command arguments because OpenCode may retain command text in session
@@ -198,6 +231,21 @@ The plugin publishes:
198
231
  | `question.asked` | Notification-only question card |
199
232
  | `question.v2.asked` | Notification-only question card, including plan-mode questions |
200
233
  | `todo.updated` | One notification when a non-empty list transitions to fully completed |
234
+ | `message.updated` + `session.status`/`session.idle` | One notification for each successfully completed assistant run |
235
+ | `session.error` | Critical failure notification with a redacted error summary |
236
+ | `session.status` (`retry`) | One warning when the configured retry threshold is reached |
237
+ | `installation.update-available` | One notification per available OpenCode version |
238
+
239
+ Completion requires a completed, error-free assistant message in the current
240
+ busy cycle. An idle event caused by a pending permission or question is not
241
+ reported as successful. Repeated idle callbacks, retry callbacks, error events,
242
+ and update events use stable correlation IDs so they do not create duplicate
243
+ push notifications.
244
+
245
+ Lifecycle payloads intentionally omit command arguments, model output, file
246
+ paths and diffs, stack traces, HTTP response bodies, and response headers. Error
247
+ messages are length-limited and redact common credentials, URL queries, and
248
+ filesystem paths before leaving the OpenCode host.
201
249
 
202
250
  Permission commands are delivered at least once. The plugin caches terminal
203
251
  acknowledgements and resends the same acknowledgement on redelivery without