@haven_ai/sdk 0.1.10-alpha.0 → 0.1.11-alpha.0

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 CHANGED
@@ -3046,75 +3046,6 @@ var havenTools = {
3046
3046
  openai: openaiTools
3047
3047
  };
3048
3048
 
3049
- // src/skill-content.ts
3050
- var HAVEN_SKILL_MD = `---
3051
- name: haven-pay
3052
- description: Pay for things from the user's Haven wallet within their agent rules. Use when the user asks to send, pay, tip, or transfer crypto \u2014 or when a request hits an HTTP 402 (x402) paywall.
3053
- ---
3054
-
3055
- # Haven: pay from a Haven wallet
3056
-
3057
- This skill lets the agent make payments from the user's Haven wallet through
3058
- the Haven MCP tools. Every payment is checked against the agent's on-chain
3059
- budget before money moves; payments above the remaining budget wait for the
3060
- user's approval in Haven.
3061
-
3062
- ## When to use this skill
3063
-
3064
- - The user asks to send money, pay someone, tip, donate, or transfer tokens.
3065
- - A request returns HTTP 402 (x402): use the Haven pay tools to settle it,
3066
- then retry the original request.
3067
-
3068
- ## Identity and budget come from the tools \u2014 never assume them
3069
-
3070
- Do not guess the wallet address, network, or budget. Read them live:
3071
-
3072
- - \`haven_get_agent\` \u2014 agent identity, Haven wallet address, network.
3073
- - \`haven_get_allowances\` \u2014 current per-token budgets and what remains.
3074
-
3075
- Budgets reset on a period the user chose. If a payment exceeds the remaining
3076
- budget it is queued for the user to approve in the Haven dashboard \u2014 this is
3077
- normal, not an error.
3078
-
3079
- ## Paying
3080
-
3081
- - **Direct transfer:** \`haven_pay\` with recipient, amount, and token.
3082
- - **x402 paywall:** \`haven_quote_x402\` to get a quote, then
3083
- \`haven_pay_x402_quote\`. In the hosted setup the signing step happens in
3084
- the local Haven signer; follow the tool results \u2014 they tell you the next
3085
- action at every step. Retry the original request only when the result says
3086
- \`retry_original_x402_request\`.
3087
- - **Status:** \`haven_get_payment_status\` with a \`payment_id\` to check on
3088
- queued or in-flight payments. Do not poll in a tight loop.
3089
-
3090
- ## Approval semantics
3091
-
3092
- - A result with \`pending_approval\` means the payment exceeded the remaining
3093
- budget and is waiting for the user in Haven. Tell the user, then check
3094
- status later.
3095
- - Never ask the user for private keys and never try to sign anything
3096
- yourself \u2014 Haven signs. If a tool reports a missing or invalid credential,
3097
- tell the user to re-run the Haven setup command.
3098
-
3099
- ## Failure handling
3100
-
3101
- Haven errors are shaped \`{ error, status, details? }\` and written for
3102
- humans \u2014 surface the message verbatim. Common cases:
3103
-
3104
- - \`pending_approval\`: queued for the user's approval (see above).
3105
- - \`insufficient_funds\`: the Haven wallet doesn't hold enough of that token.
3106
- Suggest the user add funds in the Haven dashboard.
3107
- - Budget exceeded: tell the user how much remains (from
3108
- \`haven_get_allowances\`) and that they can raise the budget in Haven.
3109
-
3110
- ## Revoke
3111
-
3112
- If this agent's credential may have leaked, tell the user to pause or revoke
3113
- the agent in the Haven dashboard under Agents. New requests stop immediately
3114
- for that credential.
3115
- `;
3116
- var SKILL_FOLDER_NAME = "haven-pay";
3117
-
3118
3049
  exports.AGENT_PAYMENT_NEXT_ACTION_VALUES = AGENT_PAYMENT_NEXT_ACTION_VALUES;
3119
3050
  exports.AGENT_PAYMENT_PHASE_VALUES = AGENT_PAYMENT_PHASE_VALUES;
3120
3051
  exports.AGENT_PAYMENT_RAIL_VALUES = AGENT_PAYMENT_RAIL_VALUES;
@@ -3127,14 +3058,12 @@ exports.AgentPaymentPhaseSchema = AgentPaymentPhaseSchema;
3127
3058
  exports.AgentPaymentRail = AgentPaymentRail;
3128
3059
  exports.AgentPaymentRailDescriptions = AgentPaymentRailDescriptions;
3129
3060
  exports.AgentPaymentRailSchema = AgentPaymentRailSchema;
3130
- exports.HAVEN_SKILL_MD = HAVEN_SKILL_MD;
3131
3061
  exports.HavenApiError = HavenApiError;
3132
3062
  exports.HavenClient = HavenClient;
3133
3063
  exports.HavenError = HavenError;
3134
3064
  exports.HavenPaymentStateError = HavenPaymentStateError;
3135
3065
  exports.HavenSigningError = HavenSigningError;
3136
3066
  exports.HavenTimeoutError = HavenTimeoutError;
3137
- exports.SKILL_FOLDER_NAME = SKILL_FOLDER_NAME;
3138
3067
  exports.addressFromKey = addressFromKey;
3139
3068
  exports.buildMachinePaymentIdempotencyKey = buildMachinePaymentIdempotencyKey;
3140
3069
  exports.buildX402ExpectedMessage = buildX402ExpectedMessage;