@haven_ai/sdk 0.0.0-dev.202609050705.51c3d92 → 0.0.0-dev.202609051106.201fc90
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 +11 -0
- package/dist/index.cjs +12 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -2
- package/dist/index.d.ts +33 -2
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,17 @@ TypeScript SDK for [Haven](https://github.com/d-hinders/Haven-AI) — agent wall
|
|
|
4
4
|
|
|
5
5
|
Haven lets AI agents request and sign payments within strict, user-approved on-chain guardrails. This SDK makes it straightforward to integrate Haven payment requests into any agent without giving Haven custody of user or agent keys.
|
|
6
6
|
|
|
7
|
+
## Are you an AI agent whose user has no Haven account yet?
|
|
8
|
+
|
|
9
|
+
Read **`/for-agents.md`** on the Haven host your user gave you — or
|
|
10
|
+
[the copy in this repository](https://github.com/d-hinders/Haven-AI/blob/dev/packages/frontend/public/for-agents.md)
|
|
11
|
+
if you do not have that host yet.
|
|
12
|
+
|
|
13
|
+
Your user creates the account and the passkey: those are theirs, they need a
|
|
14
|
+
human, and you should never ask for their password. You can do everything else
|
|
15
|
+
— including running the connector command from the setup prompt they paste you,
|
|
16
|
+
and managing the account from the shell with `@haven_ai/cli`.
|
|
17
|
+
|
|
7
18
|
## Install
|
|
8
19
|
|
|
9
20
|
```bash
|
package/dist/index.cjs
CHANGED
|
@@ -4490,7 +4490,7 @@ check on in-flight payments. Do not poll in a tight loop.
|
|
|
4490
4490
|
- Never ask the user for private keys. Signing happens only in the local Haven
|
|
4491
4491
|
signer; the hosted Haven tools never receive the signing key. If a tool
|
|
4492
4492
|
reports a missing or invalid credential, tell the user to re-run the Haven
|
|
4493
|
-
|
|
4493
|
+
connector command.
|
|
4494
4494
|
|
|
4495
4495
|
## Failure handling
|
|
4496
4496
|
|
|
@@ -4551,6 +4551,16 @@ var AGENT_APPROVAL_RELAY_JSON_SENTENCE = "When a --json outcome reports approval
|
|
|
4551
4551
|
var AGENT_APPROVAL_RELAY_PROSE_SENTENCE = "If you ran the command without --json, the connector waits for the approval itself and prints its next steps when it finishes: relay the budget-approval instruction to me \u2014 the approval link if those steps printed one, otherwise that you need to return to Haven and approve this agent's budget \u2014 only if those printed next steps still ask for it. If they report the budget as already approved, there is nothing for me to approve.";
|
|
4552
4552
|
var AGENT_WIRING_COLLISION_RELAY_SENTENCE = "If the connector refuses with wiring_collision, this machine is already wired to a different agent: relay that refusal to me with the superseded_agent_ids and suggested_name it carries, and let me choose whether to replace the existing wiring or add this agent alongside it. Never pick for me by adding --replace or --name yourself.";
|
|
4553
4553
|
var AGENT_COMMAND_MODIFICATION_SENTENCE = "Only two changes to the command above are permitted, and no others: appending --json, and \u2014 only if the connector refuses because it could not determine the agent runtime \u2014 re-running it once with --runtime <name> added, naming the harness you are running in, using one of the values that refusal lists. Never invent a runtime name and never change anything else.";
|
|
4554
|
+
var AGENT_README_SECTION_MD = `## Are you an AI agent whose user has no Haven account yet?
|
|
4555
|
+
|
|
4556
|
+
Read **\`/for-agents.md\`** on the Haven host your user gave you \u2014 or
|
|
4557
|
+
[the copy in this repository](https://github.com/d-hinders/Haven-AI/blob/dev/packages/frontend/public/for-agents.md)
|
|
4558
|
+
if you do not have that host yet.
|
|
4559
|
+
|
|
4560
|
+
Your user creates the account and the passkey: those are theirs, they need a
|
|
4561
|
+
human, and you should never ask for their password. You can do everything else
|
|
4562
|
+
\u2014 including running the connector command from the setup prompt they paste you,
|
|
4563
|
+
and managing the account from the shell with \`@haven_ai/cli\`.`;
|
|
4554
4564
|
var HAVEN_AGENT_RUNBOOK_MD = `# Haven for agents \u2014 set your user up to let you pay
|
|
4555
4565
|
|
|
4556
4566
|
You are an AI agent whose user has no Haven account yet, or has one but has not connected you.
|
|
@@ -4736,6 +4746,7 @@ exports.AGENT_PAYMENT_FAILURE_CODE_VALUES = AGENT_PAYMENT_FAILURE_CODE_VALUES;
|
|
|
4736
4746
|
exports.AGENT_PAYMENT_NEXT_ACTION_VALUES = AGENT_PAYMENT_NEXT_ACTION_VALUES;
|
|
4737
4747
|
exports.AGENT_PAYMENT_PHASE_VALUES = AGENT_PAYMENT_PHASE_VALUES;
|
|
4738
4748
|
exports.AGENT_PAYMENT_RAIL_VALUES = AGENT_PAYMENT_RAIL_VALUES;
|
|
4749
|
+
exports.AGENT_README_SECTION_MD = AGENT_README_SECTION_MD;
|
|
4739
4750
|
exports.AGENT_SECRET_HYGIENE_SENTENCE = AGENT_SECRET_HYGIENE_SENTENCE;
|
|
4740
4751
|
exports.AGENT_WIRING_COLLISION_RELAY_SENTENCE = AGENT_WIRING_COLLISION_RELAY_SENTENCE;
|
|
4741
4752
|
exports.AgentPaymentFailureCode = AgentPaymentFailureCode;
|