bamboo-agents 0.1.5-dev.27 → 0.1.5-dev.28

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/dist/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5-dev.27
1
+ 0.1.5-dev.28
package/dist/index.js CHANGED
@@ -3037,7 +3037,7 @@ var VERSION;
3037
3037
  var init_version = __esm({
3038
3038
  "src/version.ts"() {
3039
3039
  "use strict";
3040
- VERSION = "0.1.5-dev.27";
3040
+ VERSION = "0.1.5-dev.28";
3041
3041
  }
3042
3042
  });
3043
3043
 
@@ -11536,7 +11536,14 @@ var init_agent_health = __esm({
11536
11536
  max: external_exports.number(),
11537
11537
  /** Slot key of the highest-impact unfilled dimension. Null when
11538
11538
  * every weighted slot is filled (agent is fully scored). */
11539
- top_gap_slot: external_exports.string().nullable()
11539
+ top_gap_slot: external_exports.string().nullable(),
11540
+ /**
11541
+ * ISO-8601 timestamp of when the underlying skill run produced this
11542
+ * score (BAM-2289 P3). Optional for backwards compat with CLI bundles
11543
+ * shipped before the cache layer existed — newer bundles use it to
11544
+ * render "evaluated 12m ago" in the picker. Older bundles ignore it.
11545
+ */
11546
+ evaluated_at: external_exports.string().optional()
11540
11547
  }).nullable();
11541
11548
  }
11542
11549
  });
@@ -11582,15 +11589,7 @@ var init_agents = __esm({
11582
11589
  name: external_exports.string(),
11583
11590
  /** `false` = user-created (eligible for picker choices).
11584
11591
  * `true` = pre-installed (MAM etc.) — shown informational-only. */
11585
- is_auto_installed: external_exports.boolean(),
11586
- /**
11587
- * 0..100 weighted health score (round at render time). Null when
11588
- * the server omits the value (BAM-2246 omits today because per-agent
11589
- * health is an N round-trip fan-out; CLI fetches lazily via
11590
- * `/api/v1/agents/<id>/health`). Also null for legacy agents
11591
- * without an effective_rubric (pre-BAM-2084 installs).
11592
- */
11593
- health_score: external_exports.number().nullable()
11592
+ is_auto_installed: external_exports.boolean()
11594
11593
  });
11595
11594
  CliTierCapSchema = external_exports.object({
11596
11595
  limit: external_exports.number().int(),
@@ -12797,7 +12796,7 @@ async function runCaseA(ctx) {
12797
12796
  if (choice === null) return null;
12798
12797
  return choice === "1" ? runCreateFlow(ctx) : runUploadFlow(ctx);
12799
12798
  }
12800
- async function runCaseB(ctx, agents) {
12799
+ async function runCaseB(ctx, agents, healthByAgentId) {
12801
12800
  console.log(
12802
12801
  ` You have ${agents.length} user-created ${pluralize(
12803
12802
  agents.length,
@@ -12805,7 +12804,9 @@ async function runCaseB(ctx, agents) {
12805
12804
  )} so far:`
12806
12805
  );
12807
12806
  for (const a of agents) {
12808
- console.log(` \u2022 ${a.name} \u2014 ${formatHealth(a.health_score)}`);
12807
+ console.log(
12808
+ ` \u2022 ${a.name} \u2014 ${formatHealth(healthByAgentId.get(a.id) ?? null)}`
12809
+ );
12809
12810
  }
12810
12811
  console.log("");
12811
12812
  console.log(" What's next?");
@@ -12822,13 +12823,15 @@ async function runCaseB(ctx, agents) {
12822
12823
  if (choice === "2") return runUploadFlow(ctx);
12823
12824
  return runImproveExistingFlow(agents);
12824
12825
  }
12825
- async function runCaseC(agents) {
12826
+ async function runCaseC(agents, healthByAgentId) {
12826
12827
  console.log(
12827
12828
  ` You're at your tier's agent cap (${agents.length}/${agents.length}). Pick one to improve:`
12828
12829
  );
12829
12830
  console.log("");
12830
12831
  agents.forEach((a, idx) => {
12831
- console.log(` ${idx + 1}) ${a.name} \u2014 ${formatHealth(a.health_score)}`);
12832
+ console.log(
12833
+ ` ${idx + 1}) ${a.name} \u2014 ${formatHealth(healthByAgentId.get(a.id) ?? null)}`
12834
+ );
12832
12835
  });
12833
12836
  console.log("");
12834
12837
  console.log(` (To add more agents, upgrade your plan at ${BILLING_URL})`);
@@ -13087,6 +13090,7 @@ var init_pick_first_user_agent_phase = __esm({
13087
13090
  const preInstalled = listing.agents.filter((a) => a.is_auto_installed);
13088
13091
  const cap = listing.tier_cap;
13089
13092
  const atCap = cap.limit > -1 && cap.current >= cap.limit;
13093
+ const healthByAgentId = /* @__PURE__ */ new Map();
13090
13094
  await Promise.all(
13091
13095
  userCreated.map(async (a) => {
13092
13096
  try {
@@ -13094,9 +13098,9 @@ var init_pick_first_user_agent_phase = __esm({
13094
13098
  ctx.credentials.bamboo_session,
13095
13099
  a.id
13096
13100
  );
13097
- a.health_score = h?.score ?? null;
13101
+ healthByAgentId.set(a.id, h?.score ?? null);
13098
13102
  } catch {
13099
- a.health_score = null;
13103
+ healthByAgentId.set(a.id, null);
13100
13104
  }
13101
13105
  })
13102
13106
  );
@@ -13114,9 +13118,9 @@ var init_pick_first_user_agent_phase = __esm({
13114
13118
  if (userCreated.length === 0) {
13115
13119
  pickedAgentId = await runCaseA(ctx);
13116
13120
  } else if (atCap) {
13117
- pickedAgentId = await runCaseC(userCreated);
13121
+ pickedAgentId = await runCaseC(userCreated, healthByAgentId);
13118
13122
  } else {
13119
- pickedAgentId = await runCaseB(ctx, userCreated);
13123
+ pickedAgentId = await runCaseB(ctx, userCreated, healthByAgentId);
13120
13124
  }
13121
13125
  if (!pickedAgentId) {
13122
13126
  return {