@botbuddy/cli 1.120.1 → 1.120.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.
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.120.1",
3
- "source_commit": "78dbebfd7f66398ce2634866f072fcd0fd161966",
4
- "source_sha256": "811b47307808f5241690820947dca0ab05a66aae759b1f79a817f06a44d562c2",
2
+ "release_version": "1.120.2",
3
+ "source_commit": "82d0f717a329d32d9ac5f89855b023b08875ab74",
4
+ "source_sha256": "f5e9ca63bf98d3affebc1f0f22f926aedf2d09de911440618a517ac559fab1f0",
5
5
  "target": "darwin-arm64",
6
- "sha256": "854da93c46032385536144538e658ad57493cb14417559d6f8d826d8e0de71aa"
6
+ "sha256": "eaf4b4036330d31152e92f1aed31ad501887c09ec8e737f7646d66d64f38dd89"
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.120.1",
3
- "source_commit": "78dbebfd7f66398ce2634866f072fcd0fd161966",
4
- "source_sha256": "811b47307808f5241690820947dca0ab05a66aae759b1f79a817f06a44d562c2",
2
+ "release_version": "1.120.2",
3
+ "source_commit": "82d0f717a329d32d9ac5f89855b023b08875ab74",
4
+ "source_sha256": "f5e9ca63bf98d3affebc1f0f22f926aedf2d09de911440618a517ac559fab1f0",
5
5
  "target": "linux-x64",
6
- "sha256": "f7ee959017b284cfa6571df43564d3262e8ac12d556fed9af7fe62622d4ac803"
6
+ "sha256": "b8cf9a0afc3c72ec7facdd14e9f3944f497cd4474b5fc295e545ada2fb25a08f"
7
7
  }
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "release_version": "1.120.1",
4
- "source_commit": "78dbebfd7f66398ce2634866f072fcd0fd161966",
5
- "source_sha256": "811b47307808f5241690820947dca0ab05a66aae759b1f79a817f06a44d562c2",
3
+ "release_version": "1.120.2",
4
+ "source_commit": "82d0f717a329d32d9ac5f89855b023b08875ab74",
5
+ "source_sha256": "f5e9ca63bf98d3affebc1f0f22f926aedf2d09de911440618a517ac559fab1f0",
6
6
  "targets": {
7
7
  "darwin-arm64": {
8
8
  "goos": "darwin",
9
9
  "goarch": "arm64",
10
10
  "binary": "daemon/bin/darwin-arm64/botbuddy-daemon",
11
- "sha256": "854da93c46032385536144538e658ad57493cb14417559d6f8d826d8e0de71aa",
11
+ "sha256": "eaf4b4036330d31152e92f1aed31ad501887c09ec8e737f7646d66d64f38dd89",
12
12
  "mode": "0755"
13
13
  },
14
14
  "linux-x64": {
15
15
  "goos": "linux",
16
16
  "goarch": "amd64",
17
17
  "binary": "daemon/bin/linux-x64/botbuddy-daemon",
18
- "sha256": "f7ee959017b284cfa6571df43564d3262e8ac12d556fed9af7fe62622d4ac803",
18
+ "sha256": "b8cf9a0afc3c72ec7facdd14e9f3944f497cd4474b5fc295e545ada2fb25a08f",
19
19
  "mode": "0755"
20
20
  }
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botbuddy/cli",
3
- "version": "1.120.1",
3
+ "version": "1.120.2",
4
4
  "description": "BotBuddy — Swarm coordination CLI for multi-agent workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,6 +21,11 @@ export const HOST_CHILD_BUNDLE_MAX_BYTES = 200 * 1024 * 1024;
21
21
  /** A host run that never reports terminal is given up this long after its own runtime limit. */
22
22
  export const HOST_CHILD_WAIT_GRACE_MS = 10 * 60_000;
23
23
  export const HOST_CHILD_DEFAULT_MAX_RUNTIME_S = 3600;
24
+ /**
25
+ * BOT-3566: the control plane fails a claim its host has prepared for this long (a cold
26
+ * dependency layer keeps a claim alive with "preparing" reports up to here).
27
+ */
28
+ export const HOST_CHILD_PREPARE_CAP_MS = 45 * 60_000;
24
29
  const ENV_NAME = /^[A-Z][A-Z0-9_]{0,63}$/;
25
30
 
26
31
  /** The four requester tool calls, over the run's retrying caller. */
@@ -168,7 +173,8 @@ export async function startHostChild({
168
173
  };
169
174
  // The caller gave the run up before using it (its slot was lost): stop waiting for it.
170
175
  child.detach = () => { abort.abort("detached"); artifactsAbort.abort("detached"); };
171
- const giveUpAt = now() + (maxRuntimeSeconds * 1000) + HOST_CHILD_WAIT_GRACE_MS;
176
+ const firstGiveUpAt = now() + (maxRuntimeSeconds * 1000) + HOST_CHILD_WAIT_GRACE_MS;
177
+ let giveUpAt = firstGiveUpAt;
172
178
  const finish = (run, code) => {
173
179
  if (child.final) return;
174
180
  child.final = run;
@@ -206,6 +212,11 @@ export async function startHostChild({
206
212
  // The cursor is read with the state, so a change after this read replays into the wait.
207
213
  if (run && Number.isSafeInteger(Number(run.signal_cursor))) since = Number(run.signal_cursor);
208
214
  if (stopWanted) requestCancel();
215
+ // BOT-3566: a run that started late (a cold dependency layer) gets its runtime from its
216
+ // start, replacing any preparation allowance (Codex #2019); one still being prepared
217
+ // gets the control plane's preparation cap once the first deadline passes.
218
+ if (run?.state === "running") giveUpAt = Math.max(firstGiveUpAt, hostRunGiveUpAt(run, maxRuntimeSeconds));
219
+ else if (now() >= giveUpAt) giveUpAt = Math.max(giveUpAt, hostRunGiveUpAt(run, maxRuntimeSeconds));
209
220
  if (now() >= giveUpAt) {
210
221
  child.stop();
211
222
  return finish({ ...(run ?? {}), state: "failed", failure_code: "HOST_CHILD_UNREPORTED", failure_message: "the host never reported the run's end" }, 1);
@@ -233,6 +244,16 @@ export async function startHostChild({
233
244
  return { ok: true, child, runId };
234
245
  }
235
246
 
247
+ /** When a non-terminal host run may be given up, from what the control plane says of it. */
248
+ export function hostRunGiveUpAt(run, maxRuntimeSeconds) {
249
+ const budget = maxRuntimeSeconds * 1000 + HOST_CHILD_WAIT_GRACE_MS;
250
+ const started = Date.parse(run?.started_at ?? "");
251
+ if (run?.state === "running" && Number.isFinite(started)) return started + budget;
252
+ const claimed = Date.parse(run?.claimed_at ?? "");
253
+ if (run?.state === "claimed" && Number.isFinite(claimed)) return claimed + HOST_CHILD_PREPARE_CAP_MS + budget;
254
+ return -Infinity;
255
+ }
256
+
236
257
  /** Receipt fields for a host run. */
237
258
  export function hostChildReceiptFields(child) {
238
259
  if (!child?.hostRun) return {};