@bivy/bivy 0.18.11-staging.11 → 0.18.11-staging.12

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.
@@ -121,8 +121,13 @@ export async function fetchPendingWork(cfg) {
121
121
  /** Consume the authoritative claim snapshot, not the earlier queue listing. */
122
122
  export async function claimWork(cfg, id) {
123
123
  const res = await cp(cfg, "POST", `/node/work/${encodeURIComponent(id)}/claim`, randomUUID());
124
- if (!res.ok)
124
+ if (!res.ok) {
125
+ // 409 is the normal "another node won" race; anything else would otherwise
126
+ // leave an item silently pending forever.
127
+ if (res.status !== 409)
128
+ console.warn(`[control-plane-tasks] claim ${id} failed: HTTP ${res.status}`);
125
129
  return undefined;
130
+ }
126
131
  const data = await res.json();
127
132
  return data.item ?? { id }; // compatibility with older control planes
128
133
  }
package/dist/server.js CHANGED
@@ -568,7 +568,8 @@ const runDelegation = new RunDelegationService({
568
568
  if (!sessionId)
569
569
  return undefined;
570
570
  const routing = raw.routing && typeof raw.routing === "object" ? raw.routing : {};
571
- const machine = typeof routing.nodeLabel === "string" && routing.nodeLabel ? routing.nodeLabel : identity.name;
571
+ // The queue routes by label `bivy/<machine>`.
572
+ const machine = typeof routing.nodeLabel === "string" && routing.nodeLabel ? routing.nodeLabel.replace(/^bivy\//, "") : identity.name;
572
573
  if (machine === identity.name)
573
574
  return delegationAnswer(sessionId);
574
575
  const target = (await accountMachines()).find((m) => m.name === machine);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bivy/bivy",
3
- "version": "0.18.11-staging.11",
3
+ "version": "0.18.11-staging.12",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "Run coding agents on machines you own. Open-source, self-hostable agent workspace.",