@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/README.md
CHANGED
|
@@ -125,8 +125,11 @@ haven contacts list
|
|
|
125
125
|
haven feedback submit "<text>" # several unquoted words are joined into one text
|
|
126
126
|
|
|
127
127
|
# manage (backend-only — no on-chain signing)
|
|
128
|
-
haven agents pause <id> | resume <id>
|
|
129
|
-
|
|
128
|
+
haven agents pause <id> | resume <id> # blocks / allows payments through Haven only;
|
|
129
|
+
# the budget stays live on-chain
|
|
130
|
+
haven agents revoke <id> [--keep-budget] --yes # retires the agent in Haven (terminal);
|
|
131
|
+
# ends no budget on-chain — use
|
|
132
|
+
# `haven budget revoke` for that; refuses
|
|
130
133
|
# while a budget is still live on-chain
|
|
131
134
|
# unless --keep-budget
|
|
132
135
|
haven agents rotate-key <id> # new API key, shown once
|
package/dist/cli.cjs
CHANGED
|
@@ -159,10 +159,12 @@ function helpText() {
|
|
|
159
159
|
" every secret shape \u2014 never include one.",
|
|
160
160
|
"",
|
|
161
161
|
"Manage (backend-only \u2014 no on-chain signing):",
|
|
162
|
-
" agents pause <id>
|
|
163
|
-
"
|
|
164
|
-
" agents
|
|
165
|
-
"
|
|
162
|
+
" agents pause <id> Block payments through Haven; the budget",
|
|
163
|
+
" stays live on-chain (end it: budget revoke)",
|
|
164
|
+
" agents resume <id> Allow payments through Haven again",
|
|
165
|
+
" agents revoke <id> --yes Retire the agent in Haven (terminal). Ends no",
|
|
166
|
+
" budget on-chain: run budget revoke first; refuses",
|
|
167
|
+
" while a budget is still live unless --keep-budget",
|
|
166
168
|
" agents rotate-key <id> Issue a new API key (shown once)",
|
|
167
169
|
" agents rename <id> <name>",
|
|
168
170
|
" wallets rename <id> <name>",
|
|
@@ -3150,7 +3152,7 @@ async function checkTextForSecrets(text, deps) {
|
|
|
3150
3152
|
|
|
3151
3153
|
// src/commands.ts
|
|
3152
3154
|
var DEFAULT_API = "https://havenbackend-production-8a00.up.railway.app";
|
|
3153
|
-
var CLI_VERSION = "0.0.0-dev.
|
|
3155
|
+
var CLI_VERSION = "0.0.0-dev.202610071649.8f72409";
|
|
3154
3156
|
var CLI_CLIENT_IDENTITY = `@haven_ai/cli/${CLI_VERSION}`;
|
|
3155
3157
|
function accountAddressOf(s) {
|
|
3156
3158
|
return s.account_address ?? "";
|
|
@@ -3754,7 +3756,12 @@ async function cmdAgentLifecycle(args, d, action) {
|
|
|
3754
3756
|
const { api } = await authed(args, d);
|
|
3755
3757
|
await api.post(`/agents/${id}/${action}`);
|
|
3756
3758
|
const status = action === "pause" ? "paused" : "resumed";
|
|
3757
|
-
emit(
|
|
3759
|
+
emit(
|
|
3760
|
+
d,
|
|
3761
|
+
args.flags.json,
|
|
3762
|
+
{ ok: true, agent_id: id, status },
|
|
3763
|
+
() => 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.`
|
|
3764
|
+
);
|
|
3758
3765
|
return EXIT.ok;
|
|
3759
3766
|
}
|
|
3760
3767
|
async function cmdAgentRevoke(args, d) {
|
|
@@ -3762,8 +3769,8 @@ async function cmdAgentRevoke(args, d) {
|
|
|
3762
3769
|
if (!id) throw new UsageError("Usage: haven agents revoke <id> [--keep-budget] --yes");
|
|
3763
3770
|
if (!args.flags.yes) {
|
|
3764
3771
|
throw new UsageError(
|
|
3765
|
-
`This permanently
|
|
3766
|
-
"Re-run with --yes to confirm. Revoke is terminal \u2014 the agent cannot go back to active."
|
|
3772
|
+
`This permanently retires agent ${id} in Haven.`,
|
|
3773
|
+
"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>`."
|
|
3767
3774
|
);
|
|
3768
3775
|
}
|
|
3769
3776
|
const { api } = await authed(args, d);
|
|
@@ -3805,7 +3812,7 @@ async function cmdAgentRevoke(args, d) {
|
|
|
3805
3812
|
`Agent ${id} revoked.`,
|
|
3806
3813
|
`Its budget is still live on-chain: the delegate key can keep spending until each delegation is revoked.`,
|
|
3807
3814
|
...live.map((r) => `haven budget revoke ${id} ${r.delegation_hash} # ${r.status}`)
|
|
3808
|
-
].join("\n") : `Agent ${id} revoked.
|
|
3815
|
+
].join("\n") : `Agent ${id} revoked in Haven. It had no live budget on-chain.`
|
|
3809
3816
|
);
|
|
3810
3817
|
return EXIT.ok;
|
|
3811
3818
|
}
|