@haven_ai/connect 0.1.32-alpha.0 → 0.1.34-alpha.0

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.js CHANGED
@@ -528,9 +528,9 @@ var init_runtime_manifest = __esm({
528
528
  mcpPackage: "@haven_ai/mcp",
529
529
  mcpVersion: MCP_VERSION,
530
530
  sdkPackage: "@haven_ai/sdk",
531
- sdkVersion: "0.1.32-alpha.0",
531
+ sdkVersion: "0.1.34-alpha.0",
532
532
  signerPackage: "@haven_ai/signer",
533
- signerVersion: "0.1.32-alpha.0",
533
+ signerVersion: "0.1.34-alpha.0",
534
534
  // Sourced from the SDK, never a literal (#1161). This field read '20.0.0'
535
535
  // while every package's `engines` said `>=24` and the docs said `>=24.0.0`,
536
536
  // so the guard that was supposed to enforce the floor waved Node v23 through
@@ -4048,7 +4048,7 @@ function defaultPromptIo() {
4048
4048
  // src/runtime.ts
4049
4049
  init_local_mcp_runtime();
4050
4050
  init_runtime_manifest();
4051
- var CONNECTOR_VERSION = "0.1.32-alpha.0";
4051
+ var CONNECTOR_VERSION = "0.1.34-alpha.0";
4052
4052
  var CONNECT_OUTCOME_SCHEMA_VERSION = 1;
4053
4053
  var failureOutcomesByError = /* @__PURE__ */ new WeakMap();
4054
4054
  function failureOutcomeFor(runtimeHint, error) {
@@ -4260,6 +4260,9 @@ async function executeConnect(options, deps, trace) {
4260
4260
  errorCode: early.errorCode ?? null,
4261
4261
  environmentLabel: options.environmentLabel ?? "Local workspace"
4262
4262
  });
4263
+ if (!early.errorCode || early.errorCode === "manual_runtime_setup_required") {
4264
+ log("\u2192 Action needed: approve this agent's budget in the Haven dashboard \u2014 the approval button is live now. Setup continues here in the meantime.");
4265
+ }
4263
4266
  } catch {
4264
4267
  }
4265
4268
  }
@@ -4496,6 +4499,13 @@ function describeApprovedBudget(budget) {
4496
4499
  const amount = token ? `${formatAtomicAmount(BigInt(budget.amount), token.decimals)} ${budget.token_symbol}` : `${budget.amount} ${budget.token_symbol} (atomic units)`;
4497
4500
  return `${amount} ${describeResetPeriod(budget.reset_period_min)}`;
4498
4501
  }
4502
+ function describeWaitBound(timeoutMs) {
4503
+ if (timeoutMs >= 12e4) {
4504
+ const minutes = Math.round(timeoutMs / 6e4);
4505
+ return `${minutes} minutes`;
4506
+ }
4507
+ return `${Math.round(timeoutMs / 1e3)}s`;
4508
+ }
4499
4509
  async function waitForBudgetApproval(api, setupId, apiKey, log, options = {}) {
4500
4510
  const intervalMs = options.intervalMs ?? 5e3;
4501
4511
  const timeoutMs = options.timeoutMs ?? 18e4;
@@ -4506,7 +4516,7 @@ async function waitForBudgetApproval(api, setupId, apiKey, log, options = {}) {
4506
4516
  const announceWaiting = () => {
4507
4517
  if (waitingAnnounced) return;
4508
4518
  waitingAnnounced = true;
4509
- log("Registered with Haven \u2014 waiting for you to approve the budget in the dashboard\u2026");
4519
+ log("Now waiting for you to approve the budget in the Haven dashboard \u2014 approval is what unlocks the agent's Haven tools\u2026");
4510
4520
  };
4511
4521
  for (let i = 0; i < maxPolls; i++) {
4512
4522
  if (i > 0) await sleep(intervalMs);
@@ -4533,7 +4543,10 @@ async function waitForBudgetApproval(api, setupId, apiKey, log, options = {}) {
4533
4543
  }
4534
4544
  announceWaiting();
4535
4545
  if (i > 0 && i % remindEvery === 0) {
4536
- log("Still waiting for budget approval in Haven\u2026");
4546
+ const elapsedSeconds = Math.round(i * intervalMs / 1e3);
4547
+ log(
4548
+ `Still waiting for budget approval in Haven \u2014 ${elapsedSeconds}s elapsed, checking every ${Math.round(intervalMs / 1e3)}s. I'll stop waiting after ${describeWaitBound(timeoutMs)}; you can approve later and the tools unlock then.`
4549
+ );
4537
4550
  }
4538
4551
  }
4539
4552
  log(