backeer-opencode 0.5.1 → 0.5.2
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 +10 -0
- package/README.md +1 -1
- package/dist/backeer-permission.js +1 -1
- package/package.json +1 -1
- package/src/live-control-client.js +12 -1
- package/src/updates.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `backeer-opencode` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.5.2 - 2026-11-03
|
|
6
|
+
|
|
7
|
+
- Cancel unread HTTP error bodies so repeated failed requests release their
|
|
8
|
+
transport resources without exposing remote error contents.
|
|
9
|
+
- Keep intentional shutdown in the closed state, await initial cursor setup,
|
|
10
|
+
and discard late handshake responses instead of reviving a closed client.
|
|
11
|
+
- Add four regression tests for error-body cleanup and shutdown races.
|
|
12
|
+
- Update the development-only brace-expansion dependency to its compatible
|
|
13
|
+
security patch. Production dependencies are unchanged.
|
|
14
|
+
|
|
5
15
|
## 0.5.1 - 2026-11-03
|
|
6
16
|
|
|
7
17
|
- Keep live tracking active during hours of agent silence; retain 15-second
|
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ existing running sessions are not modified by this source checkout.
|
|
|
61
61
|
|
|
62
62
|
The matching `backeer-opencode-mcp` executable is provided in the package.
|
|
63
63
|
Connect through an existing SSH tunnel and register the local stdio executable
|
|
64
|
-
as described in [the complete setup guide](docs/live-control.md). Version 0.5.
|
|
64
|
+
as described in [the complete setup guide](docs/live-control.md). Version 0.5.2
|
|
65
65
|
in this checkout must be installed from its built package or installer bundle
|
|
66
66
|
until it has been separately published; do not assume npm `latest` contains it.
|
|
67
67
|
|
|
@@ -2395,7 +2395,7 @@ import { randomUUID } from "node:crypto";
|
|
|
2395
2395
|
import { statSync } from "node:fs";
|
|
2396
2396
|
|
|
2397
2397
|
// src/updates.js
|
|
2398
|
-
var PLUGIN_VERSION = "0.5.
|
|
2398
|
+
var PLUGIN_VERSION = "0.5.2";
|
|
2399
2399
|
var PACKAGE_NAME = "backeer-opencode";
|
|
2400
2400
|
var NPM_REGISTRY_URL = "https://registry.npmjs.org";
|
|
2401
2401
|
var CHECK_TIMEOUT_MS = 3e3;
|
package/package.json
CHANGED
|
@@ -98,6 +98,7 @@ export class LiveControlClient {
|
|
|
98
98
|
})
|
|
99
99
|
if (!response.ok) {
|
|
100
100
|
// Never return a remote error body: it may contain original prompts or credentials.
|
|
101
|
+
await response.body?.cancel().catch(() => {})
|
|
101
102
|
throw new Error(`Live-control request failed (HTTP ${response.status})`)
|
|
102
103
|
}
|
|
103
104
|
const text = await boundedText(response, 256 * 1024)
|
|
@@ -144,6 +145,7 @@ export class LiveControlClient {
|
|
|
144
145
|
timeoutMs: this.reconnectMs,
|
|
145
146
|
})).cursor)
|
|
146
147
|
if (!initial) throw new Error("Live-control bridge did not provide a cursor")
|
|
148
|
+
if (this.controller.signal.aborted) return
|
|
147
149
|
this.cursor = initial
|
|
148
150
|
this.floor = initial
|
|
149
151
|
this.readCursor = initial
|
|
@@ -178,6 +180,7 @@ export class LiveControlClient {
|
|
|
178
180
|
signal: connection.signal, timeoutMs: this.reconnectMs,
|
|
179
181
|
})).cursor)
|
|
180
182
|
if (!initial) throw new Error("Live-control bridge did not provide a cursor")
|
|
183
|
+
if (this.controller.signal.aborted) return
|
|
181
184
|
this.cursor = initial
|
|
182
185
|
this.floor = initial
|
|
183
186
|
this.readCursor = initial
|
|
@@ -186,6 +189,10 @@ export class LiveControlClient {
|
|
|
186
189
|
redirect: "error", signal: connection.signal,
|
|
187
190
|
headers: { Authorization: `Bearer ${this.token}`, Accept: "text/event-stream" },
|
|
188
191
|
})
|
|
192
|
+
if (this.controller.signal.aborted) {
|
|
193
|
+
await response.body?.cancel().catch(() => {})
|
|
194
|
+
return
|
|
195
|
+
}
|
|
189
196
|
if (!response.ok || !response.headers.get("content-type")?.includes("text/event-stream")) {
|
|
190
197
|
this.status = response.status === 401 || response.status === 403 ? "unauthorized" : "disconnected"
|
|
191
198
|
this.notify()
|
|
@@ -201,7 +208,10 @@ export class LiveControlClient {
|
|
|
201
208
|
let buffer = ""
|
|
202
209
|
while (!this.controller.signal.aborted && !resync) {
|
|
203
210
|
const item = await reader.read()
|
|
204
|
-
if (item.done) {
|
|
211
|
+
if (item.done) {
|
|
212
|
+
if (!this.controller.signal.aborted) this.status = "disconnected"
|
|
213
|
+
break
|
|
214
|
+
}
|
|
205
215
|
armWatchdog()
|
|
206
216
|
buffer += decoder.decode(item.value, { stream: true })
|
|
207
217
|
buffer = buffer.replace(/\r\n|\r(?!$)/g, "\n")
|
|
@@ -333,6 +343,7 @@ export class LiveControlClient {
|
|
|
333
343
|
this.controller.abort()
|
|
334
344
|
this.status = "closed"
|
|
335
345
|
this.notify()
|
|
346
|
+
await this.starting
|
|
336
347
|
await this.task
|
|
337
348
|
this.events = []
|
|
338
349
|
this.bufferBytes = 0
|
package/src/updates.js
CHANGED