@haven_ai/connect 0.0.0-dev.202609031608.fceb089 → 0.0.0-dev.202609031827.893d74f
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/README.md +8 -0
- package/dist/cli.cjs +27 -6
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +27 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +27 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -6
- package/dist/index.d.ts +18 -6
- package/dist/index.js +27 -6
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -478,3 +478,11 @@ To return to the pinned manifest: unset the variables and run
|
|
|
478
478
|
`--doctor --repair --runtime <runtime>` (or re-run setup). The override
|
|
479
479
|
directories live under `~/.haven` like every other runtime directory, so the
|
|
480
480
|
same reset that removes `~/.haven` removes them.
|
|
481
|
+
|
|
482
|
+
That is the loop for a build that has **not** merged. For one that has — a
|
|
483
|
+
`@dev` snapshot of all five packages, published from every package-touching
|
|
484
|
+
push to `dev` — and for the owner steps that make the dev dashboard hand out
|
|
485
|
+
`npx -y @haven_ai/connect@dev …` in the first place, see the repository runbook
|
|
486
|
+
[`docs/operations/package-dev-channel.md`](https://github.com/d-hinders/Haven-AI/blob/dev/docs/operations/package-dev-channel.md).
|
|
487
|
+
The two compose: `@dev` picks the connector, these variables pick what it
|
|
488
|
+
installs.
|
package/dist/cli.cjs
CHANGED
|
@@ -535,9 +535,9 @@ var init_runtime_manifest = __esm({
|
|
|
535
535
|
mcpPackage: "@haven_ai/mcp",
|
|
536
536
|
mcpVersion: mcp.MCP_VERSION,
|
|
537
537
|
sdkPackage: "@haven_ai/sdk",
|
|
538
|
-
sdkVersion: "0.0.0-dev.
|
|
538
|
+
sdkVersion: "0.0.0-dev.202609031827.893d74f",
|
|
539
539
|
signerPackage: "@haven_ai/signer",
|
|
540
|
-
signerVersion: "0.0.0-dev.
|
|
540
|
+
signerVersion: "0.0.0-dev.202609031827.893d74f",
|
|
541
541
|
// Sourced from the SDK, never a literal (#1161). This field read '20.0.0'
|
|
542
542
|
// while every package's `engines` said `>=24` and the docs said `>=24.0.0`,
|
|
543
543
|
// so the guard that was supposed to enforce the floor waved Node v23 through
|
|
@@ -4270,7 +4270,7 @@ function defaultPromptIo() {
|
|
|
4270
4270
|
// src/runtime.ts
|
|
4271
4271
|
init_local_mcp_runtime();
|
|
4272
4272
|
init_runtime_manifest();
|
|
4273
|
-
var CONNECTOR_VERSION = "0.0.0-dev.
|
|
4273
|
+
var CONNECTOR_VERSION = "0.0.0-dev.202609031827.893d74f";
|
|
4274
4274
|
var CONNECT_OUTCOME_SCHEMA_VERSION = 1;
|
|
4275
4275
|
var failureOutcomesByError = /* @__PURE__ */ new WeakMap();
|
|
4276
4276
|
function failureOutcomeFor(runtimeHint, error) {
|
|
@@ -4483,7 +4483,7 @@ async function executeConnect(options, deps, trace) {
|
|
|
4483
4483
|
environmentLabel: options.environmentLabel ?? "Local workspace"
|
|
4484
4484
|
});
|
|
4485
4485
|
if (!early.errorCode || early.errorCode === "manual_runtime_setup_required") {
|
|
4486
|
-
log(
|
|
4486
|
+
log(approveBudgetCta(setup));
|
|
4487
4487
|
}
|
|
4488
4488
|
} catch {
|
|
4489
4489
|
}
|
|
@@ -4532,7 +4532,8 @@ async function executeConnect(options, deps, trace) {
|
|
|
4532
4532
|
log(`Could not report install status to Haven: ${err instanceof Error ? err.message : String(err)}`);
|
|
4533
4533
|
}
|
|
4534
4534
|
let approval;
|
|
4535
|
-
|
|
4535
|
+
const narrateApprovalWait = options.waitForApproval === true || options.waitForApproval === void 0 && (deps.isStdoutTty ?? Boolean(process.stdout.isTTY));
|
|
4536
|
+
if (narrateApprovalWait && !runtimeInstall.errorCode) {
|
|
4536
4537
|
approval = await waitForBudgetApproval(api, registration.setup_id, localApiKey, log, options.approvalWait);
|
|
4537
4538
|
}
|
|
4538
4539
|
printNextSteps(runtimeInstall, log, approval);
|
|
@@ -4664,6 +4665,21 @@ function printSetupSummary(setup, log) {
|
|
|
4664
4665
|
}
|
|
4665
4666
|
log(`Setup challenge expires at ${setup.challenge.expires_at}. If it expires, return to Haven for a fresh setup and rerun Connect \u2014 do not reuse or paste credentials.`);
|
|
4666
4667
|
}
|
|
4668
|
+
function approveBudgetCta(setup) {
|
|
4669
|
+
const budgetPhrase = setup.agent_budget.length > 0 ? setup.agent_budget.map((budget) => `up to ${describeSetupBudget(budget)}`).join(", ") : void 0;
|
|
4670
|
+
if (budgetPhrase) {
|
|
4671
|
+
return `\u2192 Action needed: approve this agent's budget \u2014 ${budgetPhrase} from ${setup.haven_wallet.name} on ${setup.haven_wallet.network} \u2014 in the Haven dashboard. The approval button is live now; setup continues here in the meantime.`;
|
|
4672
|
+
}
|
|
4673
|
+
return "\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.";
|
|
4674
|
+
}
|
|
4675
|
+
function describeSetupBudget(budget) {
|
|
4676
|
+
return describeApprovedBudget({
|
|
4677
|
+
token_symbol: budget.token_symbol,
|
|
4678
|
+
token_address: budget.token_address,
|
|
4679
|
+
amount: budget.allowance_amount,
|
|
4680
|
+
reset_period_min: budget.reset_period_min
|
|
4681
|
+
});
|
|
4682
|
+
}
|
|
4667
4683
|
function assertSetupChallengeIsUsable(expiresAt) {
|
|
4668
4684
|
const expiresAtMs = Date.parse(expiresAt);
|
|
4669
4685
|
if (!Number.isNaN(expiresAtMs) && expiresAtMs > Date.now()) return;
|
|
@@ -5330,7 +5346,12 @@ async function runCli(argv, io = {
|
|
|
5330
5346
|
const result = await runConnect(
|
|
5331
5347
|
{
|
|
5332
5348
|
...parsed.options,
|
|
5333
|
-
|
|
5349
|
+
// #1377 D / #2484: leave prose runs UNSPECIFIED (undefined) so
|
|
5350
|
+
// runConnect's stdout-TTY narration gate decides whether there is a
|
|
5351
|
+
// watching human to narrate to — an agent invoking prose as a tool
|
|
5352
|
+
// call has none and must not sit opaque in the wait. --json stays an
|
|
5353
|
+
// explicit false (skip, emit promptly).
|
|
5354
|
+
waitForApproval: parsed.json ? false : void 0,
|
|
5334
5355
|
// #1719: only a human-facing run may be asked which installed client to
|
|
5335
5356
|
// configure. --json is the automation contract — it must fail with a
|
|
5336
5357
|
// machine-readable code, never block on stdin. runConnect additionally
|