@haven_ai/cli 0.0.0-dev.202610151444.5ef2d94 → 0.0.0-dev.202610190810.dd27f95
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 +11 -11
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +11 -11
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -172,9 +172,9 @@ function helpText() {
|
|
|
172
172
|
"Budgets (construct-and-hand-off \u2014 the CLI never signs, #2539):",
|
|
173
173
|
" budget grant <agentId> --amount <n> --token USDC --period <minutes>",
|
|
174
174
|
" [--recipient <address>] [--expires <unix-s>] [--wait]",
|
|
175
|
-
" Prints
|
|
175
|
+
" Prints an approval link; the human approves in the dashboard.",
|
|
176
176
|
" budget revoke <agentId> <delegationHash> [--wait]",
|
|
177
|
-
" Prints a revocation link; the human
|
|
177
|
+
" Prints a revocation link; the human approves in the dashboard.",
|
|
178
178
|
"",
|
|
179
179
|
"Options:",
|
|
180
180
|
" --json One JSON value on stdout, prose on stderr, on every",
|
|
@@ -3150,7 +3150,7 @@ async function checkTextForSecrets(text, deps) {
|
|
|
3150
3150
|
|
|
3151
3151
|
// src/commands.ts
|
|
3152
3152
|
var DEFAULT_API = "https://havenbackend-production-8a00.up.railway.app";
|
|
3153
|
-
var CLI_VERSION = "0.0.0-dev.
|
|
3153
|
+
var CLI_VERSION = "0.0.0-dev.202610190810.dd27f95";
|
|
3154
3154
|
var CLI_CLIENT_IDENTITY = `@haven_ai/cli/${CLI_VERSION}`;
|
|
3155
3155
|
function accountAddressOf(s) {
|
|
3156
3156
|
return s.account_address ?? "";
|
|
@@ -3679,10 +3679,10 @@ async function cmdBudgetGrant(args, d) {
|
|
|
3679
3679
|
() => [
|
|
3680
3680
|
`Budget of ${args.flags.amount} ${token.symbol} per ${args.flags.period} minutes built for agent ${id}.`,
|
|
3681
3681
|
args.flags.recipient ? `Recipient pin: ${args.flags.recipient}` : null,
|
|
3682
|
-
"Open this link and
|
|
3682
|
+
"Open this link and approve \u2014 the budget goes live the moment you do:",
|
|
3683
3683
|
built.signing_url,
|
|
3684
3684
|
`Delegation: ${built.delegation_hash} (version ${built.version})`,
|
|
3685
|
-
status === "active" ? "
|
|
3685
|
+
status === "active" ? "Approved and active." : "Waiting for your approval. Run the same command with --wait to poll until it is active."
|
|
3686
3686
|
].filter((line) => line !== null).join("\n")
|
|
3687
3687
|
);
|
|
3688
3688
|
emitGrant();
|
|
@@ -3698,13 +3698,13 @@ async function cmdBudgetGrant(args, d) {
|
|
|
3698
3698
|
}
|
|
3699
3699
|
if (mine?.status === "revoked" || mine?.status === "replaced") {
|
|
3700
3700
|
throw new HavenCliError(
|
|
3701
|
-
`Delegation ${built.delegation_hash} is now ${mine.status} without being
|
|
3701
|
+
`Delegation ${built.delegation_hash} is now ${mine.status} without being approved.`,
|
|
3702
3702
|
EXIT.refused
|
|
3703
3703
|
);
|
|
3704
3704
|
}
|
|
3705
3705
|
}
|
|
3706
3706
|
throw new HavenCliError(
|
|
3707
|
-
`Timed out waiting for delegation ${built.delegation_hash} to go active (${BUDGET_WAIT_TIMEOUT_S / 60} minutes). The
|
|
3707
|
+
`Timed out waiting for delegation ${built.delegation_hash} to go active (${BUDGET_WAIT_TIMEOUT_S / 60} minutes). The approval link stays valid until it expires \u2014 approve it, or rerun with --wait.`,
|
|
3708
3708
|
EXIT.failed
|
|
3709
3709
|
);
|
|
3710
3710
|
}
|
|
@@ -3736,11 +3736,11 @@ async function cmdBudgetRevoke(args, d) {
|
|
|
3736
3736
|
args.flags.json,
|
|
3737
3737
|
{ agent_id: id, delegation_hash: hash, status, ...prepared },
|
|
3738
3738
|
() => [
|
|
3739
|
-
"Revocation prepared \u2014 one
|
|
3740
|
-
"Open this link and
|
|
3739
|
+
"Revocation prepared \u2014 one approval, sponsored (no gas).",
|
|
3740
|
+
"Open this link and approve to stop this budget:",
|
|
3741
3741
|
revokeUrl,
|
|
3742
3742
|
`Delegation: ${hash}`,
|
|
3743
|
-
status === "revoked" ? "Revoked." : "The budget keeps working until you
|
|
3743
|
+
status === "revoked" ? "Revoked." : "The budget keeps working until you approve. Run the same command with --wait to poll until it is revoked."
|
|
3744
3744
|
].filter((line) => line !== null).join("\n")
|
|
3745
3745
|
);
|
|
3746
3746
|
emitRevoke("pending_revoke");
|
|
@@ -3756,7 +3756,7 @@ async function cmdBudgetRevoke(args, d) {
|
|
|
3756
3756
|
}
|
|
3757
3757
|
}
|
|
3758
3758
|
throw new HavenCliError(
|
|
3759
|
-
`Timed out waiting for delegation ${hash} to be revoked (${BUDGET_WAIT_TIMEOUT_S / 60} minutes). The link stays valid \u2014
|
|
3759
|
+
`Timed out waiting for delegation ${hash} to be revoked (${BUDGET_WAIT_TIMEOUT_S / 60} minutes). The link stays valid \u2014 approve it, or rerun with --wait.`,
|
|
3760
3760
|
EXIT.failed
|
|
3761
3761
|
);
|
|
3762
3762
|
}
|