@haven_ai/sdk 0.0.0-dev.202609081535.4527a16 → 0.0.0-dev.202609101633.51a5ff1
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/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3348,8 +3348,10 @@ var HavenClient = class {
|
|
|
3348
3348
|
* allowance/budget summary a settle response carries.
|
|
3349
3349
|
*
|
|
3350
3350
|
* #1310/#1311 parity: this is the ONE home for logic that was duplicated
|
|
3351
|
-
* verbatim in
|
|
3352
|
-
*
|
|
3351
|
+
* verbatim in the hosted and local `haven_get_payment_status` handlers —
|
|
3352
|
+
* `packages/mcp-server/src/tools/state-direct-recovery.ts` since #2809 (it
|
|
3353
|
+
* was `packages/mcp-server/src/tools.ts` when this was written) and
|
|
3354
|
+
* `packages/mcp/src/tools.ts` — extracted
|
|
3353
3355
|
* here because both packages already depend on `@haven_ai/sdk` and call
|
|
3354
3356
|
* methods on a `HavenClient` instance, so this needed no new dependency
|
|
3355
3357
|
* edge. `funded_but_unsettled` is deliberately excluded: that phase means
|
|
@@ -4348,7 +4350,7 @@ Your user gives you a **budget on their own account** \u2014 not their wallet, a
|
|
|
4348
4350
|
Four of the six steps are your user's \u2014 each needs a human signature or a human decision. The rest is yours. If they already have a funded account, start at step 3.
|
|
4349
4351
|
|
|
4350
4352
|
1. **HUMAN \u2014 create the account.** Name, email, password, then a passkey (Face ID / Touch ID) or a wallet. Never offer to enter any of it: you must not have their password, and the passkey is bound to their device. With a terminal, \`npx @haven_ai/cli@<channel> login --api <api-url>\` afterwards gets you a scoped session for steps 3-4 (that flag or \`HAVEN_API_URL\`, on the first command \u2014 the session then remembers the backend; **the CLI's built-in default is Haven's hosted production backend**, so on any other deployment an omitted flag connects you somewhere real and wrong rather than failing) \u2014 they approve a code in the browser, you never hold their password. The \`<channel>\` in that command is the tag your deployment names \u2014 read it from \`/.well-known/haven.json\` (\`packages.cli.channel\`), never a tag you pick. Do not hold the process open while you wait: under \`--json\`, pass \`--no-wait\` to get the link object back at once, then poll it with \`haven login --poll <device_code>\` \u2014 one round per invocation, exit 3 while it is still pending, 0 once approved. It can set up agents and read the account; it cannot sign, approve a budget, move funds, or rotate any agent's keys.
|
|
4351
|
-
2. **HUMAN \u2014 fund it.** USDC only, no ETH: Haven sponsors the gas. \`haven wallets funding\` prints the address, the amount
|
|
4353
|
+
2. **HUMAN \u2014 fund it.** USDC only, no ETH: Haven sponsors the gas. \`/.well-known/haven.json\` names \`chains.default\` as the deployment's expected chain, but after login \`haven wallets funding\` prints the address, the amount and which chain in one place; confirm that chain before you message your user. Without a CLI session, the dashboard's funding card shows the address and amount and its Receive-funds screen names the chain; never assume one: a testnet deployment and production both call themselves Haven. Before you write that message, read the manifest: \`environment\` says whether this deployment is \`production\`, and each \`chains.supported\` entry says whether that chain is a \`testnet\`. Real money is at stake only on a non-testnet chain of a \`production\` deployment \u2014 tell your user which case theirs is.
|
|
4352
4354
|
3. **HUMAN \u2014 create the agent, set its budget**, and paste you the **setup prompt** it hands back. With a CLI session (step 1) you can do this step yourself: \`haven agents connect --name <n> --budget <amount> --token USDC --period <minutes>\` prints the same connector command and approval link; add \`--run\` to do step 4 too.
|
|
4353
4355
|
4. **YOU \u2014 run the connector command** in that prompt (below). It makes your signing key locally, registering only the public address.
|
|
4354
4356
|
5. **HUMAN \u2014 approve the budget** with their passkey, in the Haven tab they created the agent in: it advances to the approval step by itself once your run registers.
|