@haven_ai/cli 0.0.0-dev.202610141333.0d33318 → 0.0.0-dev.202610141738.3a308de

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/cli.cjs CHANGED
@@ -3152,7 +3152,7 @@ async function checkTextForSecrets(text, deps) {
3152
3152
 
3153
3153
  // src/commands.ts
3154
3154
  var DEFAULT_API = "https://havenbackend-production-8a00.up.railway.app";
3155
- var CLI_VERSION = "0.0.0-dev.202610141333.0d33318";
3155
+ var CLI_VERSION = "0.0.0-dev.202610141738.3a308de";
3156
3156
  var CLI_CLIENT_IDENTITY = `@haven_ai/cli/${CLI_VERSION}`;
3157
3157
  function accountAddressOf(s) {
3158
3158
  return s.account_address ?? "";
@@ -3611,6 +3611,11 @@ function budgetSummary(allowances) {
3611
3611
  if (!allowances || allowances.length === 0) return "\u2014";
3612
3612
  return allowances.map((a) => `${a.allowance_amount} ${a.token_symbol}`).join(", ");
3613
3613
  }
3614
+ var STILL_ENABLED_STATUSES = /* @__PURE__ */ new Set([
3615
+ "pending",
3616
+ "active",
3617
+ "replaced"
3618
+ ]);
3614
3619
  var BUDGET_WAIT_TIMEOUT_S = 15 * 60;
3615
3620
  var BUDGET_WAIT_INTERVAL_MS = 5e3;
3616
3621
  async function cmdBudgetGrant(args, d) {
@@ -3675,7 +3680,7 @@ async function cmdBudgetGrant(args, d) {
3675
3680
  await d.sleep(BUDGET_WAIT_INTERVAL_MS);
3676
3681
  const { delegations } = await api.get(`/agents/${id}/delegations`);
3677
3682
  const mine = delegations.find((row) => row.delegation_hash === built.delegation_hash);
3678
- if (mine?.status === "active") {
3683
+ if (mine && (mine.is_live ?? mine.status === "active")) {
3679
3684
  emitGrant("active");
3680
3685
  return EXIT.ok;
3681
3686
  }
@@ -3779,7 +3784,7 @@ async function cmdAgentRevoke(args, d) {
3779
3784
  const agent = await api.get(`/agents/${id}`);
3780
3785
  if ((agent.live_delegation_count ?? 0) > 0) {
3781
3786
  const { delegations } = await api.get(`/agents/${id}/delegations`);
3782
- live = delegations.filter((r) => r.status === "pending" || r.status === "active" || r.status === "replaced");
3787
+ live = delegations.filter((r) => STILL_ENABLED_STATUSES.has(r.status));
3783
3788
  }
3784
3789
  } catch (err) {
3785
3790
  d.o.note(`Couldn't check budgets for agent ${id}, so the revocation was not attempted.`);