@haven_ai/cli 0.0.0-dev.202609061037.7cf43bb → 0.0.0-dev.202609061923.f3d53db
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 +62 -5
- package/dist/cli.cjs +2 -2
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
# @haven_ai/cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
The terminal surface for setting up and running a Haven agent — **an agent can
|
|
4
|
+
drive it end to end**, up to the steps that need a human signature. It is also a
|
|
5
|
+
scriptable companion for a human power user; both readers are served below, agent
|
|
6
|
+
first, because the agent is the one that cannot fall back to the dashboard.
|
|
7
|
+
|
|
8
|
+
What it never does is sign. On-chain, owner-signed actions — approving a budget,
|
|
9
|
+
rotating a key, moving funds — happen in the dashboard with the owner's passkey.
|
|
10
|
+
This CLI reads, arranges and hands off.
|
|
6
11
|
|
|
7
12
|
## Are you an AI agent whose user has no Haven account yet?
|
|
8
13
|
|
|
@@ -22,6 +27,13 @@ npm i -g @haven_ai/cli@alpha # or run ad hoc: npx @haven_ai/cli@alpha <command
|
|
|
22
27
|
haven --help
|
|
23
28
|
```
|
|
24
29
|
|
|
30
|
+
A bare `npx @haven_ai/cli` resolves to the **same version** as `@alpha`: the
|
|
31
|
+
`latest` dist-tag now tracks the newest published release (owner decision
|
|
32
|
+
2026-09-04, mechanism in `publish.yml` since #2536). Verified on 2026-09-06 from
|
|
33
|
+
a clean directory — `@alpha` and the bare form both `0.1.34-alpha.0`, `@dev` the
|
|
34
|
+
snapshot `0.0.0-dev.202609061037.7cf43bb`. The pinned `@alpha` stays in the
|
|
35
|
+
one-liner above because every generated artifact quotes that string verbatim.
|
|
36
|
+
|
|
25
37
|
The CLI talks to the hosted Haven backend by default. Point it elsewhere with
|
|
26
38
|
`--api <url>` or `HAVEN_API_URL` (e.g. a local backend at
|
|
27
39
|
`http://localhost:3001`).
|
|
@@ -32,11 +44,56 @@ The CLI talks to the hosted Haven backend by default. Point it elsewhere with
|
|
|
32
44
|
> [`docs/research/haven-cli.md`](../../docs/research/haven-cli.md) for the full
|
|
33
45
|
> design and roadmap.
|
|
34
46
|
|
|
35
|
-
##
|
|
47
|
+
## Setting Haven up as an agent
|
|
48
|
+
|
|
49
|
+
The path an agent walks, and where it stops. Four of the six steps in
|
|
50
|
+
[`/for-agents.md`](https://github.com/d-hinders/Haven-AI/blob/dev/packages/frontend/public/for-agents.md)
|
|
51
|
+
are your user's; these are the two that are yours.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# 1. Get a scoped session. Prints a code and a link for your user to approve in
|
|
55
|
+
# a browser — you never see or ask for their password.
|
|
56
|
+
npx -y @haven_ai/cli@alpha login --api <api-url>
|
|
57
|
+
|
|
58
|
+
# 2. Create the agent and its budget. Prints the connector command the backend
|
|
59
|
+
# built, and the approval link to hand your user.
|
|
60
|
+
haven agents connect --name <name> --budget 25 --token USDC --period 1440
|
|
61
|
+
|
|
62
|
+
# --run executes that command here instead of printing it for a human.
|
|
63
|
+
haven agents connect --name <name> --budget 25 --token USDC --period 1440 --run
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`haven guide` prints the whole runbook — the same text served at
|
|
67
|
+
`/for-agents.md`, so you can read it without a network round trip.
|
|
68
|
+
|
|
69
|
+
**What the session can and cannot do.** It is an allow-list, not your user's
|
|
70
|
+
authority: it creates and manages agents and reads the account, and it **cannot**
|
|
71
|
+
approve a budget, rotate a key, change a signer or move money. Those need your
|
|
72
|
+
user, every time.
|
|
73
|
+
|
|
74
|
+
**Funding is theirs too, and has a command anyway.** `haven wallets funding`
|
|
75
|
+
prints the address, the amount **and which chain** — read the chain from there
|
|
76
|
+
rather than assuming one. You can compose the message; you cannot send the money.
|
|
77
|
+
|
|
78
|
+
**Every command takes `--json`**, and every refusal is a JSON object with a
|
|
79
|
+
machine-readable `code`. The contract and the six exit codes are in
|
|
80
|
+
[*For agents and scripts*](#for-agents-and-scripts) below — read that before
|
|
81
|
+
branching on anything.
|
|
82
|
+
|
|
83
|
+
**Pass `--api <url>` or set `HAVEN_API_URL` on the first command.** The session
|
|
84
|
+
remembers the backend afterwards. There is a default and it is Haven's hosted
|
|
85
|
+
**production** backend, so on any other deployment an omitted flag does not fail
|
|
86
|
+
— it connects somewhere real and wrong.
|
|
87
|
+
|
|
88
|
+
## Usage — the full command surface
|
|
89
|
+
|
|
90
|
+
Everything the CLI does, for a human power user and as the reference an agent
|
|
91
|
+
checks a command against. `haven --help` prints the same list.
|
|
36
92
|
|
|
37
93
|
```bash
|
|
38
94
|
# auth
|
|
39
|
-
haven login
|
|
95
|
+
haven login # browser device-code approval (the default)
|
|
96
|
+
haven login --email you@example.com # password path instead (prompt or HAVEN_PASSWORD)
|
|
40
97
|
haven whoami # user, session expiry, API URL
|
|
41
98
|
haven guide # the agent onboarding runbook
|
|
42
99
|
haven logout
|
package/dist/cli.cjs
CHANGED
|
@@ -91,7 +91,7 @@ function parseArgs(argv) {
|
|
|
91
91
|
}
|
|
92
92
|
function helpText() {
|
|
93
93
|
return [
|
|
94
|
-
"haven \u2014
|
|
94
|
+
"haven \u2014 set up and run a Haven agent from the terminal. It never signs.",
|
|
95
95
|
"",
|
|
96
96
|
"Usage: haven <command> [subcommand] [options]",
|
|
97
97
|
"",
|
|
@@ -569,7 +569,7 @@ async function runConnector(connectorCommand, spawner, onStderr) {
|
|
|
569
569
|
|
|
570
570
|
// src/commands.ts
|
|
571
571
|
var DEFAULT_API = "https://havenbackend-production-8a00.up.railway.app";
|
|
572
|
-
var CLI_VERSION = "0.0.0-dev.
|
|
572
|
+
var CLI_VERSION = "0.0.0-dev.202609061923.f3d53db";
|
|
573
573
|
async function run(argv, deps = {}) {
|
|
574
574
|
const out = deps.out ?? ((l) => process.stdout.write(`${l}
|
|
575
575
|
`));
|