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