@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.cjs +18 -5
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +18 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +18 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +18 -5
- package/dist/index.js.map +1 -1
- package/package.json +15 -8
package/dist/index.d.cts
CHANGED
|
@@ -573,7 +573,7 @@ declare function resolveRuntimeByInstalledClientPrompt(options?: ScanInstalledCl
|
|
|
573
573
|
io?: PromptIo;
|
|
574
574
|
}): Promise<RuntimeId>;
|
|
575
575
|
|
|
576
|
-
declare const CONNECTOR_VERSION = "0.1.
|
|
576
|
+
declare const CONNECTOR_VERSION = "0.1.34-alpha.0";
|
|
577
577
|
interface ConnectOptions {
|
|
578
578
|
setupToken: string;
|
|
579
579
|
apiBaseUrl: string;
|
|
@@ -879,11 +879,11 @@ declare function isConnectError(err: unknown): err is ConnectError;
|
|
|
879
879
|
|
|
880
880
|
declare const MCP_RUNTIME_MANIFEST: {
|
|
881
881
|
readonly mcpPackage: "@haven_ai/mcp";
|
|
882
|
-
readonly mcpVersion: "0.1.
|
|
882
|
+
readonly mcpVersion: "0.1.34-alpha.0";
|
|
883
883
|
readonly sdkPackage: "@haven_ai/sdk";
|
|
884
|
-
readonly sdkVersion: "0.1.
|
|
884
|
+
readonly sdkVersion: "0.1.34-alpha.0";
|
|
885
885
|
readonly signerPackage: "@haven_ai/signer";
|
|
886
|
-
readonly signerVersion: "0.1.
|
|
886
|
+
readonly signerVersion: "0.1.34-alpha.0";
|
|
887
887
|
readonly minimumNodeVersion: "22.0.0";
|
|
888
888
|
readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
|
|
889
889
|
readonly requiredTools: readonly string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -573,7 +573,7 @@ declare function resolveRuntimeByInstalledClientPrompt(options?: ScanInstalledCl
|
|
|
573
573
|
io?: PromptIo;
|
|
574
574
|
}): Promise<RuntimeId>;
|
|
575
575
|
|
|
576
|
-
declare const CONNECTOR_VERSION = "0.1.
|
|
576
|
+
declare const CONNECTOR_VERSION = "0.1.34-alpha.0";
|
|
577
577
|
interface ConnectOptions {
|
|
578
578
|
setupToken: string;
|
|
579
579
|
apiBaseUrl: string;
|
|
@@ -879,11 +879,11 @@ declare function isConnectError(err: unknown): err is ConnectError;
|
|
|
879
879
|
|
|
880
880
|
declare const MCP_RUNTIME_MANIFEST: {
|
|
881
881
|
readonly mcpPackage: "@haven_ai/mcp";
|
|
882
|
-
readonly mcpVersion: "0.1.
|
|
882
|
+
readonly mcpVersion: "0.1.34-alpha.0";
|
|
883
883
|
readonly sdkPackage: "@haven_ai/sdk";
|
|
884
|
-
readonly sdkVersion: "0.1.
|
|
884
|
+
readonly sdkVersion: "0.1.34-alpha.0";
|
|
885
885
|
readonly signerPackage: "@haven_ai/signer";
|
|
886
|
-
readonly signerVersion: "0.1.
|
|
886
|
+
readonly signerVersion: "0.1.34-alpha.0";
|
|
887
887
|
readonly minimumNodeVersion: "22.0.0";
|
|
888
888
|
readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
|
|
889
889
|
readonly requiredTools: readonly string[];
|
package/dist/index.js
CHANGED
|
@@ -527,9 +527,9 @@ var init_runtime_manifest = __esm({
|
|
|
527
527
|
mcpPackage: "@haven_ai/mcp",
|
|
528
528
|
mcpVersion: MCP_VERSION,
|
|
529
529
|
sdkPackage: "@haven_ai/sdk",
|
|
530
|
-
sdkVersion: "0.1.
|
|
530
|
+
sdkVersion: "0.1.34-alpha.0",
|
|
531
531
|
signerPackage: "@haven_ai/signer",
|
|
532
|
-
signerVersion: "0.1.
|
|
532
|
+
signerVersion: "0.1.34-alpha.0",
|
|
533
533
|
// Sourced from the SDK, never a literal (#1161). This field read '20.0.0'
|
|
534
534
|
// while every package's `engines` said `>=24` and the docs said `>=24.0.0`,
|
|
535
535
|
// so the guard that was supposed to enforce the floor waved Node v23 through
|
|
@@ -4047,7 +4047,7 @@ function defaultPromptIo() {
|
|
|
4047
4047
|
// src/runtime.ts
|
|
4048
4048
|
init_local_mcp_runtime();
|
|
4049
4049
|
init_runtime_manifest();
|
|
4050
|
-
var CONNECTOR_VERSION = "0.1.
|
|
4050
|
+
var CONNECTOR_VERSION = "0.1.34-alpha.0";
|
|
4051
4051
|
var CONNECT_OUTCOME_SCHEMA_VERSION = 1;
|
|
4052
4052
|
var failureOutcomesByError = /* @__PURE__ */ new WeakMap();
|
|
4053
4053
|
function failureOutcomeFor(runtimeHint, error) {
|
|
@@ -4259,6 +4259,9 @@ async function executeConnect(options, deps, trace) {
|
|
|
4259
4259
|
errorCode: early.errorCode ?? null,
|
|
4260
4260
|
environmentLabel: options.environmentLabel ?? "Local workspace"
|
|
4261
4261
|
});
|
|
4262
|
+
if (!early.errorCode || early.errorCode === "manual_runtime_setup_required") {
|
|
4263
|
+
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.");
|
|
4264
|
+
}
|
|
4262
4265
|
} catch {
|
|
4263
4266
|
}
|
|
4264
4267
|
}
|
|
@@ -4495,6 +4498,13 @@ function describeApprovedBudget(budget) {
|
|
|
4495
4498
|
const amount = token ? `${formatAtomicAmount(BigInt(budget.amount), token.decimals)} ${budget.token_symbol}` : `${budget.amount} ${budget.token_symbol} (atomic units)`;
|
|
4496
4499
|
return `${amount} ${describeResetPeriod(budget.reset_period_min)}`;
|
|
4497
4500
|
}
|
|
4501
|
+
function describeWaitBound(timeoutMs) {
|
|
4502
|
+
if (timeoutMs >= 12e4) {
|
|
4503
|
+
const minutes = Math.round(timeoutMs / 6e4);
|
|
4504
|
+
return `${minutes} minutes`;
|
|
4505
|
+
}
|
|
4506
|
+
return `${Math.round(timeoutMs / 1e3)}s`;
|
|
4507
|
+
}
|
|
4498
4508
|
async function waitForBudgetApproval(api, setupId, apiKey, log, options = {}) {
|
|
4499
4509
|
const intervalMs = options.intervalMs ?? 5e3;
|
|
4500
4510
|
const timeoutMs = options.timeoutMs ?? 18e4;
|
|
@@ -4505,7 +4515,7 @@ async function waitForBudgetApproval(api, setupId, apiKey, log, options = {}) {
|
|
|
4505
4515
|
const announceWaiting = () => {
|
|
4506
4516
|
if (waitingAnnounced) return;
|
|
4507
4517
|
waitingAnnounced = true;
|
|
4508
|
-
log("
|
|
4518
|
+
log("Now waiting for you to approve the budget in the Haven dashboard \u2014 approval is what unlocks the agent's Haven tools\u2026");
|
|
4509
4519
|
};
|
|
4510
4520
|
for (let i = 0; i < maxPolls; i++) {
|
|
4511
4521
|
if (i > 0) await sleep(intervalMs);
|
|
@@ -4532,7 +4542,10 @@ async function waitForBudgetApproval(api, setupId, apiKey, log, options = {}) {
|
|
|
4532
4542
|
}
|
|
4533
4543
|
announceWaiting();
|
|
4534
4544
|
if (i > 0 && i % remindEvery === 0) {
|
|
4535
|
-
|
|
4545
|
+
const elapsedSeconds = Math.round(i * intervalMs / 1e3);
|
|
4546
|
+
log(
|
|
4547
|
+
`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.`
|
|
4548
|
+
);
|
|
4536
4549
|
}
|
|
4537
4550
|
}
|
|
4538
4551
|
log(
|