@botbuddy/cli 1.64.1 → 1.64.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.64.1",
3
- "source_commit": "fd01ca263ebebf1dda5ec3648d5300a788ee7887",
4
- "source_sha256": "75f8bdc7954b24d97d7da80abe41f3814bf9bc9f9c00558d26cb78c030b58475",
2
+ "release_version": "1.64.2",
3
+ "source_commit": "48e7d1b3e42d27353ef734e0c61402b9051eb51c",
4
+ "source_sha256": "8f806cc487b47875fd051cf2c3f4cfbcf4a3b3e7f25930cd81ff613a2e400d86",
5
5
  "target": "darwin-arm64",
6
- "sha256": "929631f9c2d05a901a16e8ba132c4166ca62b2c7b30ab5b8317cbcd59c49ee79"
6
+ "sha256": "1f1bff159d7c87ec19a13539afee99b58a325bb695d1ab2c22c0c794d59907d6"
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "release_version": "1.64.1",
3
- "source_commit": "fd01ca263ebebf1dda5ec3648d5300a788ee7887",
4
- "source_sha256": "75f8bdc7954b24d97d7da80abe41f3814bf9bc9f9c00558d26cb78c030b58475",
2
+ "release_version": "1.64.2",
3
+ "source_commit": "48e7d1b3e42d27353ef734e0c61402b9051eb51c",
4
+ "source_sha256": "8f806cc487b47875fd051cf2c3f4cfbcf4a3b3e7f25930cd81ff613a2e400d86",
5
5
  "target": "linux-x64",
6
- "sha256": "fc806cb0d6193a2c6c55eb076a28575b1fabc80955f4f9669b9f15269cbcdabb"
6
+ "sha256": "806aa3ac12cba1b8fce8e29848f1c47be489201e7dd1f3347f0b9ce0b7ec2c1a"
7
7
  }
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "release_version": "1.64.1",
4
- "source_commit": "fd01ca263ebebf1dda5ec3648d5300a788ee7887",
5
- "source_sha256": "75f8bdc7954b24d97d7da80abe41f3814bf9bc9f9c00558d26cb78c030b58475",
3
+ "release_version": "1.64.2",
4
+ "source_commit": "48e7d1b3e42d27353ef734e0c61402b9051eb51c",
5
+ "source_sha256": "8f806cc487b47875fd051cf2c3f4cfbcf4a3b3e7f25930cd81ff613a2e400d86",
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": "929631f9c2d05a901a16e8ba132c4166ca62b2c7b30ab5b8317cbcd59c49ee79",
11
+ "sha256": "1f1bff159d7c87ec19a13539afee99b58a325bb695d1ab2c22c0c794d59907d6",
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": "fc806cb0d6193a2c6c55eb076a28575b1fabc80955f4f9669b9f15269cbcdabb",
18
+ "sha256": "806aa3ac12cba1b8fce8e29848f1c47be489201e7dd1f3347f0b9ce0b7ec2c1a",
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.64.1",
3
+ "version": "1.64.2",
4
4
  "description": "BotBuddy \u2014 Swarm coordination CLI for multi-agent workflows",
5
5
  "type": "module",
6
6
  "bin": {
@@ -349,15 +349,16 @@ export async function runStagingAuth({ plan, host, env, deps, socketRun, resolve
349
349
  // The refusal's code is the pool's health reason when it is unhealthy (e.g. a
350
350
  // count-0 persona is persona_not_configured), so code, message and help agree.
351
351
  const reasonCode = typeof error.reason === "string" && error.reason !== "healthy" && isKnownCode(error.reason) ? error.reason : "pool_empty";
352
- // A terminal refill receipt is a real, durable recovery boundary. Keep
353
- // the old bounded timer only when the request could not return a job id.
352
+ // A terminal refill receipt is a real, durable recovery boundary. Without
353
+ // one, never tell the agent to await a signal that does not exist.
354
354
  const refillNext = refill.ok === true && typeof refill.job_id === "string"
355
355
  ? `bb wait 'staging-pool-refill:id=${refill.job_id}' && ${vars.retry ?? authLine} # once; if it fails, report this code`
356
356
  : undefined;
357
357
  // BOT-2836: a healthy empty pool is the agent's own wait-and-retry, so it is
358
358
  // rendered here with this lane; an unhealthy pool keeps the pool's health guidance.
359
359
  const forwarded = reasonCode === "pool_empty" ? ["reason", "detail"] : ["reason", "detail", ...GUIDED_FIELDS];
360
- return refuse(io, reasonCode, 3, {
360
+ const code = reasonCode === "pool_empty" && !refillNext ? "pool_refill_unavailable" : reasonCode;
361
+ return refuse(io, code, 3, {
361
362
  ...Object.fromEntries(forwarded.filter((key) => error[key] !== undefined).map((key) => [key, error[key]])),
362
363
  ...(refillNext ? { next: refillNext } : {}),
363
364
  automatic_refill: refill.ok === true ? { requested: true, ...(refill.job_id ? { job_id: refill.job_id } : {}), ...(refill.status ? { status: refill.status } : {}) } : { requested: false, code: refill.code },
@@ -135,8 +135,12 @@ export const ERROR_CODES = Object.freeze({
135
135
  // already asked the human-installed job to refill now, so the agent waits once and retries.
136
136
  pool_empty: entry("agent", "take",
137
137
  "The staging session pool is healthy but has no ready session for {persona}.",
138
- "Agents took every ready session since the last tick, or the ready ones were dead or AAL1 (factor rotated) and were discarded; the pool job was asked to refill now.",
139
- "bb wait 'timer:duration=60' && {retry} # once; if it repeats, report this code", "retry_once"),
138
+ "Agents took every ready session since the last tick, or the ready ones were dead or AAL1 (factor rotated) and were discarded; automatic refill creates a durable job before the single retry.",
139
+ "Automatic refill is requested by bb pw auth; wait for its refill job, then {retry} once; if it fails, report this code", "retry_once"),
140
+ pool_refill_unavailable: entry("agent", "take",
141
+ "The staging session pool is empty and automatic refill did not return a durable job.",
142
+ "The control plane was unavailable or rejected the refill request, so there is no job signal to await.",
143
+ "{retry} # automatic refill did not return a job; retry once; if it repeats, report this code", "retry_once"),
140
144
  job_not_loaded: entry("human", "install",
141
145
  "The staging session pool is not installed (or not loaded) on this Mac.",
142
146
  "The one-time install has not been run here, or the Mac was migrated.",
@@ -322,7 +326,7 @@ export const AUTH_ONLY_CODES = Object.freeze(new Set([
322
326
  "tenant_binding_required", "persona_not_allowlisted", "lane_browser_not_open", "browser_session_not_staging", "persistent_profile_refused",
323
327
  "session_install_failed", "staging_session_cleanup_pending", "session_not_aal2", "session_expired",
324
328
  "session_persona_mismatch", "slot_state_invalid", "slot_state_unreadable", "daemon_node_unsupported",
325
- "daemon_run_failed", "daemon_result_missing", "daemon_result_invalid", "pool_take_failed", "pool_empty",
329
+ "daemon_run_failed", "daemon_result_missing", "daemon_result_invalid", "pool_take_failed", "pool_empty", "pool_refill_unavailable",
326
330
  ]));
327
331
 
328
332
  // `bb staging-pool` subcommands only a human runs. A refusal from one names