backeer-codex 0.11.0 → 0.11.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/.codex-plugin/plugin.json +1 -1
- package/README.md +12 -0
- package/dist/opencode.mjs +16 -10
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/skills/backeer/SKILL.md +17 -0
package/README.md
CHANGED
|
@@ -297,3 +297,15 @@ project, including worktrees, instead of proxying one owner's stream. Reload
|
|
|
297
297
|
old owner processes after updating the shared gateway protocol. Update both
|
|
298
298
|
plugins; updating only the local adapter cannot fix remote child event delivery.
|
|
299
299
|
Opaque agents inside a separate Codex process still need its own event source.
|
|
300
|
+
|
|
301
|
+
## Slow API recovery (0.11.1)
|
|
302
|
+
|
|
303
|
+
The bundled adapter coordinates with remote Backeer OpenCode 0.14.2: native reads
|
|
304
|
+
allow 10 seconds, aggregated snapshots allow 30 seconds, and local HTTP/handshakes
|
|
305
|
+
allow 45 seconds. Reconnects still wait 3 seconds between attempts. Discovery
|
|
306
|
+
uses the read budget rather than failing healthy inventories after 3 seconds.
|
|
307
|
+
`verify_connection` defaults to 30 seconds per check; explicit caller deadlines
|
|
308
|
+
remain authoritative. Actual native deadlines are reported distinctly as
|
|
309
|
+
`native_session_api_timeout` (504), with no automatic command replay.
|
|
310
|
+
Update both ends and load the new remote owner code; a local upgrade alone
|
|
311
|
+
cannot override the remote gateway's old 1.5-second limit.
|
package/dist/opencode.mjs
CHANGED
|
@@ -12959,6 +12959,9 @@ import { readFile, mkdir, writeFile, rename, rm } from "node:fs/promises";
|
|
|
12959
12959
|
import { dirname, isAbsolute as isAbsolute2 } from "node:path";
|
|
12960
12960
|
import { randomUUID } from "node:crypto";
|
|
12961
12961
|
|
|
12962
|
+
// ../opencode-plugin/src/live-timeouts.js
|
|
12963
|
+
var LIVE_REQUEST_TIMEOUT_MS = 45e3;
|
|
12964
|
+
|
|
12962
12965
|
// ../opencode-plugin/src/live-control-client.js
|
|
12963
12966
|
import { constants } from "node:fs";
|
|
12964
12967
|
import { open, lstat } from "node:fs/promises";
|
|
@@ -13013,6 +13016,7 @@ var details = Object.freeze({
|
|
|
13013
13016
|
session_unavailable: ["The current verified OpenCode owner cannot find this exact session.", "Check its project, worktree and owning process. This response does not prove deletion; never create or substitute a session automatically.", false],
|
|
13014
13017
|
session_project_mismatch: ["The exact session is outside this connection's verified project/worktree scope.", "Discover its actual project connection or verify the already authorized worktree. Keep the exact session ID; do not substitute another session.", false],
|
|
13015
13018
|
session_archived: ["The native API reports that the selected session is archived.", "Confirm the intended session state with the user. Do not create or choose a replacement automatically.", false],
|
|
13019
|
+
native_session_api_timeout: ["The native OpenCode session read timed out.", "Keep the same binding and retry the read after load settles. Do not resend instructions or infer deletion.", true],
|
|
13016
13020
|
native_session_api_unavailable: ["The owning native OpenCode API is temporarily unavailable.", "Keep the same binding, project and session. Check the native API connection and retry after recovery; this is not evidence of deletion.", true],
|
|
13017
13021
|
bridge_unavailable: ["The remote bridge endpoint is unavailable.", "Check the existing bridge and its version without restarting the active session.", true],
|
|
13018
13022
|
bridge_busy: ["The remote bridge is temporarily busy.", "Keep the current binding and retry the read later. Never automatically repeat an instruction.", true],
|
|
@@ -13051,6 +13055,7 @@ function safeConnectionMessage(error62) {
|
|
|
13051
13055
|
|
|
13052
13056
|
// ../opencode-plugin/src/live-errors.js
|
|
13053
13057
|
var liveErrorMessages = Object.freeze({
|
|
13058
|
+
native_session_api_timeout: "The native OpenCode session read timed out. Keep the same session; do not resend work or treat it as deleted.",
|
|
13054
13059
|
native_session_api_unavailable: "The owning native OpenCode API could not be reached or verified. This does not mean the session was deleted. Keep the exact project/session and retry after its native API recovers.",
|
|
13055
13060
|
session_not_found: "This verified OpenCode owner cannot currently find the exact session. Check its project, worktree and owning process; absence here is not proof that the session was deleted elsewhere.",
|
|
13056
13061
|
session_project_mismatch: "The exact session exists but is outside this connection's verified project/worktree scope. Choose its actual project connection; do not recreate or replace the session.",
|
|
@@ -13491,7 +13496,7 @@ var LiveControlClient = class {
|
|
|
13491
13496
|
this.lastDiagnostic = null;
|
|
13492
13497
|
if (sessionId && !internalReader) this.activity = new LiveActivity(this, sessionId, eventScope);
|
|
13493
13498
|
}
|
|
13494
|
-
async request(path3, { method = "GET", body, signal, timeoutMs =
|
|
13499
|
+
async request(path3, { method = "GET", body, signal, timeoutMs = LIVE_REQUEST_TIMEOUT_MS } = {}) {
|
|
13495
13500
|
const controller = new AbortController();
|
|
13496
13501
|
const abort = () => controller.abort();
|
|
13497
13502
|
this.controller.signal.addEventListener("abort", abort, { once: true });
|
|
@@ -13526,6 +13531,7 @@ var LiveControlClient = class {
|
|
|
13526
13531
|
if (["project_mismatch", "project_required", "project_unavailable", "session_required"].includes(value2?.error)) connectionCode = value2.error;
|
|
13527
13532
|
const sessionErrors = {
|
|
13528
13533
|
native_session_api_unavailable: "native_session_api_unavailable",
|
|
13534
|
+
native_session_api_timeout: "native_session_api_timeout",
|
|
13529
13535
|
session_not_found: "session_unavailable",
|
|
13530
13536
|
session_project_mismatch: "session_project_mismatch",
|
|
13531
13537
|
session_archived: "session_archived",
|
|
@@ -13620,7 +13626,7 @@ var LiveControlClient = class {
|
|
|
13620
13626
|
this.starting = (async () => {
|
|
13621
13627
|
try {
|
|
13622
13628
|
const initial = afterCursor ?? checkedCursor((await this.request("/v1/sessions", {
|
|
13623
|
-
timeoutMs:
|
|
13629
|
+
timeoutMs: LIVE_REQUEST_TIMEOUT_MS
|
|
13624
13630
|
})).cursor);
|
|
13625
13631
|
if (!initial) throw new Error("Live-control bridge did not provide a cursor");
|
|
13626
13632
|
if (this.controller.signal.aborted) return;
|
|
@@ -13671,16 +13677,16 @@ var LiveControlClient = class {
|
|
|
13671
13677
|
abort();
|
|
13672
13678
|
}, ms);
|
|
13673
13679
|
};
|
|
13674
|
-
armWatchdog(
|
|
13680
|
+
armWatchdog(LIVE_REQUEST_TIMEOUT_MS);
|
|
13675
13681
|
try {
|
|
13676
13682
|
const bridge = this.eventScope === "tree" ? await this.request("/v1/sessions", {
|
|
13677
13683
|
signal: connection2.signal,
|
|
13678
|
-
timeoutMs:
|
|
13684
|
+
timeoutMs: LIVE_REQUEST_TIMEOUT_MS
|
|
13679
13685
|
}) : void 0;
|
|
13680
13686
|
if (!this.cursor) {
|
|
13681
13687
|
const initial = checkedCursor((bridge ?? await this.request("/v1/sessions", {
|
|
13682
13688
|
signal: connection2.signal,
|
|
13683
|
-
timeoutMs:
|
|
13689
|
+
timeoutMs: LIVE_REQUEST_TIMEOUT_MS
|
|
13684
13690
|
})).cursor);
|
|
13685
13691
|
if (!initial) throw new Error("Live-control bridge did not provide a cursor");
|
|
13686
13692
|
if (this.controller.signal.aborted) return;
|
|
@@ -14097,7 +14103,7 @@ async function discoverLiveConnections({ profiles = [], defaults = discoveryDefa
|
|
|
14097
14103
|
try {
|
|
14098
14104
|
let directories = [known?.directory];
|
|
14099
14105
|
try {
|
|
14100
|
-
const catalog = await client.request("/v1/projects", { timeoutMs:
|
|
14106
|
+
const catalog = await client.request("/v1/projects", { timeoutMs: LIVE_REQUEST_TIMEOUT_MS, signal });
|
|
14101
14107
|
if (catalog.capabilities?.multiProject === true) {
|
|
14102
14108
|
if (!["backeer-project-gateway/v1", "backeer-project-gateway/v2"].includes(catalog.protocol) || !Array.isArray(catalog.projects) || catalog.projects.some((item) => typeof item?.directory !== "string" || !isAbsolute3(item.directory))) {
|
|
14103
14109
|
throw new Error("Invalid project catalog");
|
|
@@ -14110,7 +14116,7 @@ async function discoverLiveConnections({ profiles = [], defaults = discoveryDefa
|
|
|
14110
14116
|
for (const directory of directories) {
|
|
14111
14117
|
const selected = new LiveControlClient({ url: origin, token, expectedDirectory: directory });
|
|
14112
14118
|
try {
|
|
14113
|
-
const result = await selected.request("/v1/sessions", { timeoutMs:
|
|
14119
|
+
const result = await selected.request("/v1/sessions", { timeoutMs: LIVE_REQUEST_TIMEOUT_MS, signal });
|
|
14114
14120
|
if (directory !== void 0 && result.directory !== directory) throw new ConnectionError("Project verification failed");
|
|
14115
14121
|
const saved = profiles.find((item) => item.url === origin && item.tokenFile === file2 && item.directory === result.directory);
|
|
14116
14122
|
const profile = connectionProfile({ name: saved?.name || "discovered", url: origin, tokenFile: file2, directory: result.directory });
|
|
@@ -14134,7 +14140,7 @@ async function discoverLiveConnections({ profiles = [], defaults = discoveryDefa
|
|
|
14134
14140
|
}
|
|
14135
14141
|
|
|
14136
14142
|
// ../opencode-plugin/src/updates.js
|
|
14137
|
-
var PLUGIN_VERSION = "0.14.
|
|
14143
|
+
var PLUGIN_VERSION = "0.14.2";
|
|
14138
14144
|
var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
14139
14145
|
|
|
14140
14146
|
// ../opencode-plugin/src/live-health.js
|
|
@@ -14328,7 +14334,7 @@ var LiveSessionManager = class {
|
|
|
14328
14334
|
this.readCache.set(bindingId, { stamp, time: Date.now(), session });
|
|
14329
14335
|
return { ...value, session };
|
|
14330
14336
|
}
|
|
14331
|
-
async verifyConnection({ connection: connection2, sessionId, sessionTitle, timeoutMs =
|
|
14337
|
+
async verifyConnection({ connection: connection2, sessionId, sessionTitle, timeoutMs = 3e4 }, signal) {
|
|
14332
14338
|
if (sessionId === void 0 === (sessionTitle === void 0)) throw new ConnectionError("Choose exactly one session ID or exact session title.");
|
|
14333
14339
|
if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1 || timeoutMs > 3e4) throw new ConnectionError("Verification timeout must be between 1 and 30000 ms.");
|
|
14334
14340
|
const profile = await this.profile(connection2);
|
|
@@ -44251,7 +44257,7 @@ function createManagedLiveMcp(manager) {
|
|
|
44251
44257
|
tool(
|
|
44252
44258
|
"verify_connection",
|
|
44253
44259
|
"Read-only end-to-end check of authenticated bridge, exact existing project/session, automatic descendant-tracking capability, tree status and tree SSE handshake. Sends no prompt, creates no remote session, closes only its temporary stream. Unknown installation state is not absence.",
|
|
44254
|
-
{ connection, sessionId: external_exports.string().regex(/^[A-Za-z0-9_-]+$/).optional(), sessionTitle: external_exports.string().trim().min(1).optional(), timeoutMs: external_exports.number().int().min(1).max(3e4).default(
|
|
44260
|
+
{ connection, sessionId: external_exports.string().regex(/^[A-Za-z0-9_-]+$/).optional(), sessionTitle: external_exports.string().trim().min(1).optional(), timeoutMs: external_exports.number().int().min(1).max(3e4).default(3e4) },
|
|
44255
44261
|
readOnly,
|
|
44256
44262
|
(args, extra) => manager.verifyConnection(args, extra.signal)
|
|
44257
44263
|
);
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "backeer-codex",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.1",
|
|
5
5
|
"description": "Backeer approvals, lifecycle notifications and chat-scoped OpenCode connections.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Backeer"
|
package/skills/backeer/SKILL.md
CHANGED
|
@@ -143,3 +143,20 @@ messages may show a live short summary when supported by the host; do not promis
|
|
|
143
143
|
a continuously updating UI if the host does not render progress notifications.
|
|
144
144
|
Native OpenCode child sessions are covered. Opaque internal Codex agents need
|
|
145
145
|
provider-side agent events and are not recovered from parent summaries.
|
|
146
|
+
|
|
147
|
+
## Slow native APIs (Codex 0.11.1 / OpenCode 0.14.2)
|
|
148
|
+
|
|
149
|
+
`native_session_api_timeout` (HTTP 504) means a native session read exceeded its
|
|
150
|
+
budget, while `native_session_api_unavailable` (503) means an unreachable or
|
|
151
|
+
unverified source. Both are retryable reads, not proof of deletion. Keep the
|
|
152
|
+
same session/binding and disclose the interruption. Never replay instructions
|
|
153
|
+
or change request IDs merely because a read timed out.
|
|
154
|
+
|
|
155
|
+
Native-owner reads allow 10 seconds, aggregated snapshots 30 seconds, local
|
|
156
|
+
HTTP/SSE handshakes 45 seconds, and liveness checks 3 seconds. Reconnect cadence
|
|
157
|
+
remains 3 seconds. `verify_connection` defaults to 30 seconds per check, and
|
|
158
|
+
explicit shorter caller deadlines still apply. Inventory and tree members
|
|
159
|
+
are verified with bounded parallel reads, without dropping ownership checks.
|
|
160
|
+
Update and load both bridge 0.14.2+ and adapter 0.11.1+ when older timeouts are
|
|
161
|
+
still active; don't repeatedly diagnose unchanged outages or silently reduce
|
|
162
|
+
tree scope to get past a timeout.
|