@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/index.cjs CHANGED
@@ -534,9 +534,9 @@ var init_runtime_manifest = __esm({
534
534
  mcpPackage: "@haven_ai/mcp",
535
535
  mcpVersion: mcp.MCP_VERSION,
536
536
  sdkPackage: "@haven_ai/sdk",
537
- sdkVersion: "0.1.32-alpha.0",
537
+ sdkVersion: "0.1.34-alpha.0",
538
538
  signerPackage: "@haven_ai/signer",
539
- signerVersion: "0.1.32-alpha.0",
539
+ signerVersion: "0.1.34-alpha.0",
540
540
  // Sourced from the SDK, never a literal (#1161). This field read '20.0.0'
541
541
  // while every package's `engines` said `>=24` and the docs said `>=24.0.0`,
542
542
  // so the guard that was supposed to enforce the floor waved Node v23 through
@@ -4054,7 +4054,7 @@ function defaultPromptIo() {
4054
4054
  // src/runtime.ts
4055
4055
  init_local_mcp_runtime();
4056
4056
  init_runtime_manifest();
4057
- var CONNECTOR_VERSION = "0.1.32-alpha.0";
4057
+ var CONNECTOR_VERSION = "0.1.34-alpha.0";
4058
4058
  var CONNECT_OUTCOME_SCHEMA_VERSION = 1;
4059
4059
  var failureOutcomesByError = /* @__PURE__ */ new WeakMap();
4060
4060
  function failureOutcomeFor(runtimeHint, error) {
@@ -4266,6 +4266,9 @@ async function executeConnect(options, deps, trace) {
4266
4266
  errorCode: early.errorCode ?? null,
4267
4267
  environmentLabel: options.environmentLabel ?? "Local workspace"
4268
4268
  });
4269
+ if (!early.errorCode || early.errorCode === "manual_runtime_setup_required") {
4270
+ 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.");
4271
+ }
4269
4272
  } catch {
4270
4273
  }
4271
4274
  }
@@ -4502,6 +4505,13 @@ function describeApprovedBudget(budget) {
4502
4505
  const amount = token ? `${formatAtomicAmount(BigInt(budget.amount), token.decimals)} ${budget.token_symbol}` : `${budget.amount} ${budget.token_symbol} (atomic units)`;
4503
4506
  return `${amount} ${describeResetPeriod(budget.reset_period_min)}`;
4504
4507
  }
4508
+ function describeWaitBound(timeoutMs) {
4509
+ if (timeoutMs >= 12e4) {
4510
+ const minutes = Math.round(timeoutMs / 6e4);
4511
+ return `${minutes} minutes`;
4512
+ }
4513
+ return `${Math.round(timeoutMs / 1e3)}s`;
4514
+ }
4505
4515
  async function waitForBudgetApproval(api, setupId, apiKey, log, options = {}) {
4506
4516
  const intervalMs = options.intervalMs ?? 5e3;
4507
4517
  const timeoutMs = options.timeoutMs ?? 18e4;
@@ -4512,7 +4522,7 @@ async function waitForBudgetApproval(api, setupId, apiKey, log, options = {}) {
4512
4522
  const announceWaiting = () => {
4513
4523
  if (waitingAnnounced) return;
4514
4524
  waitingAnnounced = true;
4515
- log("Registered with Haven \u2014 waiting for you to approve the budget in the dashboard\u2026");
4525
+ log("Now waiting for you to approve the budget in the Haven dashboard \u2014 approval is what unlocks the agent's Haven tools\u2026");
4516
4526
  };
4517
4527
  for (let i = 0; i < maxPolls; i++) {
4518
4528
  if (i > 0) await sleep(intervalMs);
@@ -4539,7 +4549,10 @@ async function waitForBudgetApproval(api, setupId, apiKey, log, options = {}) {
4539
4549
  }
4540
4550
  announceWaiting();
4541
4551
  if (i > 0 && i % remindEvery === 0) {
4542
- log("Still waiting for budget approval in Haven\u2026");
4552
+ const elapsedSeconds = Math.round(i * intervalMs / 1e3);
4553
+ log(
4554
+ `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.`
4555
+ );
4543
4556
  }
4544
4557
  }
4545
4558
  log(