@haven_ai/cli 0.0.0-dev.202610301329.99ef8d0 → 0.0.0-dev.202611041126.f6fdb26
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 +3 -2
- package/dist/cli.cjs +7 -23
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +7 -23
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +7 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -23
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -169,8 +169,6 @@ function helpText() {
|
|
|
169
169
|
" agents rotate-key <id> Issue a new API key (shown once)",
|
|
170
170
|
" agents rename <id> <name>",
|
|
171
171
|
" wallets rename <id> <name>",
|
|
172
|
-
" contacts add <name> <address> Save an address under a name",
|
|
173
|
-
" contacts remove <id> Forget one",
|
|
174
172
|
"",
|
|
175
173
|
"Budgets (construct-and-hand-off \u2014 the CLI never signs, #2539):",
|
|
176
174
|
" budget grant <agentId> --amount <n> --token USDC --period <minutes>",
|
|
@@ -3153,7 +3151,7 @@ async function checkTextForSecrets(text, deps) {
|
|
|
3153
3151
|
|
|
3154
3152
|
// src/commands.ts
|
|
3155
3153
|
var DEFAULT_API = "https://havenbackend-production-8a00.up.railway.app";
|
|
3156
|
-
var CLI_VERSION = "0.0.0-dev.
|
|
3154
|
+
var CLI_VERSION = "0.0.0-dev.202611041126.f6fdb26";
|
|
3157
3155
|
var CLI_CLIENT_IDENTITY = `@haven_ai/cli/${CLI_VERSION}`;
|
|
3158
3156
|
function accountAddressOf(s) {
|
|
3159
3157
|
return s.account_address ?? "";
|
|
@@ -3251,13 +3249,10 @@ async function dispatch(args, d) {
|
|
|
3251
3249
|
return cmdCatalogList(args, d);
|
|
3252
3250
|
case "contacts list":
|
|
3253
3251
|
return cmdContactsList(args, d);
|
|
3254
|
-
case "contacts add":
|
|
3255
|
-
return cmdContactsAdd(args, d);
|
|
3256
|
-
case "contacts remove":
|
|
3257
|
-
return cmdContactsRemove(args, d);
|
|
3258
3252
|
case "feedback submit":
|
|
3259
3253
|
return cmdFeedbackSubmit(args, d);
|
|
3260
3254
|
default:
|
|
3255
|
+
if (key === "contacts add" || key === "contacts remove") refuseContactWrite();
|
|
3261
3256
|
throw new UsageError(`Unknown command: ${key}.`, "Run `haven --help` for the command list.");
|
|
3262
3257
|
}
|
|
3263
3258
|
}
|
|
@@ -4107,22 +4102,11 @@ async function cmdContactsList(args, d) {
|
|
|
4107
4102
|
);
|
|
4108
4103
|
return EXIT.ok;
|
|
4109
4104
|
}
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
const contact = await api.post("/contacts", { name, address });
|
|
4116
|
-
emit(d, args.flags.json, contact, () => `Added contact "${contact.name}" (${truncateAddress(contact.address)}).`);
|
|
4117
|
-
return EXIT.ok;
|
|
4118
|
-
}
|
|
4119
|
-
async function cmdContactsRemove(args, d) {
|
|
4120
|
-
const id = args.positionals[0];
|
|
4121
|
-
if (!id) throw new UsageError("Usage: haven contacts remove <id>");
|
|
4122
|
-
const { api } = await authed(args, d);
|
|
4123
|
-
await api.del(`/contacts/${id}`);
|
|
4124
|
-
emit(d, args.flags.json, { ok: true, contact_id: id, removed: true }, () => `Contact ${id} removed.`);
|
|
4125
|
-
return EXIT.ok;
|
|
4105
|
+
function refuseContactWrite() {
|
|
4106
|
+
throw new HavenCliError(
|
|
4107
|
+
"Contacts can only be added or removed in the Haven dashboard. `haven contacts list` still works.",
|
|
4108
|
+
EXIT.refused
|
|
4109
|
+
);
|
|
4126
4110
|
}
|
|
4127
4111
|
async function cmdFeedbackSubmit(args, d) {
|
|
4128
4112
|
const text = args.positionals.join(" ").trim();
|