@haven_ai/cli 0.0.0-dev.202610071627.2882898 → 0.0.0-dev.202610071649.8f72409
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 +5 -2
- package/dist/cli.cjs +16 -9
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +16 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +16 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -157,10 +157,12 @@ function helpText() {
|
|
|
157
157
|
" every secret shape \u2014 never include one.",
|
|
158
158
|
"",
|
|
159
159
|
"Manage (backend-only \u2014 no on-chain signing):",
|
|
160
|
-
" agents pause <id>
|
|
161
|
-
"
|
|
162
|
-
" agents
|
|
163
|
-
"
|
|
160
|
+
" agents pause <id> Block payments through Haven; the budget",
|
|
161
|
+
" stays live on-chain (end it: budget revoke)",
|
|
162
|
+
" agents resume <id> Allow payments through Haven again",
|
|
163
|
+
" agents revoke <id> --yes Retire the agent in Haven (terminal). Ends no",
|
|
164
|
+
" budget on-chain: run budget revoke first; refuses",
|
|
165
|
+
" while a budget is still live unless --keep-budget",
|
|
164
166
|
" agents rotate-key <id> Issue a new API key (shown once)",
|
|
165
167
|
" agents rename <id> <name>",
|
|
166
168
|
" wallets rename <id> <name>",
|
|
@@ -3148,7 +3150,7 @@ async function checkTextForSecrets(text, deps) {
|
|
|
3148
3150
|
|
|
3149
3151
|
// src/commands.ts
|
|
3150
3152
|
var DEFAULT_API = "https://havenbackend-production-8a00.up.railway.app";
|
|
3151
|
-
var CLI_VERSION = "0.0.0-dev.
|
|
3153
|
+
var CLI_VERSION = "0.0.0-dev.202610071649.8f72409";
|
|
3152
3154
|
var CLI_CLIENT_IDENTITY = `@haven_ai/cli/${CLI_VERSION}`;
|
|
3153
3155
|
function accountAddressOf(s) {
|
|
3154
3156
|
return s.account_address ?? "";
|
|
@@ -3752,7 +3754,12 @@ async function cmdAgentLifecycle(args, d, action) {
|
|
|
3752
3754
|
const { api } = await authed(args, d);
|
|
3753
3755
|
await api.post(`/agents/${id}/${action}`);
|
|
3754
3756
|
const status = action === "pause" ? "paused" : "resumed";
|
|
3755
|
-
emit(
|
|
3757
|
+
emit(
|
|
3758
|
+
d,
|
|
3759
|
+
args.flags.json,
|
|
3760
|
+
{ ok: true, agent_id: id, status },
|
|
3761
|
+
() => action === "pause" ? `Agent ${id} paused: payments through Haven are blocked, but its budget stays live on-chain (end it with \`haven budget revoke\`).` : `Agent ${id} resumed: payments through Haven are allowed again.`
|
|
3762
|
+
);
|
|
3756
3763
|
return EXIT.ok;
|
|
3757
3764
|
}
|
|
3758
3765
|
async function cmdAgentRevoke(args, d) {
|
|
@@ -3760,8 +3767,8 @@ async function cmdAgentRevoke(args, d) {
|
|
|
3760
3767
|
if (!id) throw new UsageError("Usage: haven agents revoke <id> [--keep-budget] --yes");
|
|
3761
3768
|
if (!args.flags.yes) {
|
|
3762
3769
|
throw new UsageError(
|
|
3763
|
-
`This permanently
|
|
3764
|
-
"Re-run with --yes to confirm. Revoke is terminal \u2014 the agent cannot go back to active."
|
|
3770
|
+
`This permanently retires agent ${id} in Haven.`,
|
|
3771
|
+
"Re-run with --yes to confirm. Revoke is terminal \u2014 the agent cannot go back to active. It ends no budget on-chain: end each live budget with `haven budget revoke <agentId> <delegationHash>`."
|
|
3765
3772
|
);
|
|
3766
3773
|
}
|
|
3767
3774
|
const { api } = await authed(args, d);
|
|
@@ -3803,7 +3810,7 @@ async function cmdAgentRevoke(args, d) {
|
|
|
3803
3810
|
`Agent ${id} revoked.`,
|
|
3804
3811
|
`Its budget is still live on-chain: the delegate key can keep spending until each delegation is revoked.`,
|
|
3805
3812
|
...live.map((r) => `haven budget revoke ${id} ${r.delegation_hash} # ${r.status}`)
|
|
3806
|
-
].join("\n") : `Agent ${id} revoked.
|
|
3813
|
+
].join("\n") : `Agent ${id} revoked in Haven. It had no live budget on-chain.`
|
|
3807
3814
|
);
|
|
3808
3815
|
return EXIT.ok;
|
|
3809
3816
|
}
|