@haven_ai/connect 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.d.cts CHANGED
@@ -207,7 +207,7 @@ declare function runtimeInstallCapabilities(runtime: string | undefined, env?: N
207
207
  restartRequired: boolean;
208
208
  };
209
209
 
210
- declare const CONNECTOR_VERSION = "0.1.2";
210
+ declare const CONNECTOR_VERSION = "0.1.11-alpha.0";
211
211
  interface ConnectOptions {
212
212
  setupToken: string;
213
213
  apiBaseUrl: string;
@@ -248,11 +248,11 @@ declare function shortAddress(address: string): string;
248
248
 
249
249
  declare const MCP_RUNTIME_MANIFEST: {
250
250
  readonly mcpPackage: "@haven_ai/mcp";
251
- readonly mcpVersion: "0.1.10-alpha.0";
251
+ readonly mcpVersion: "0.1.11-alpha.0";
252
252
  readonly sdkPackage: "@haven_ai/sdk";
253
- readonly sdkVersion: "0.1.10-alpha.0";
253
+ readonly sdkVersion: "0.1.11-alpha.0";
254
254
  readonly signerPackage: "@haven_ai/signer";
255
- readonly signerVersion: "0.1.10-alpha.0";
255
+ readonly signerVersion: "0.1.11-alpha.0";
256
256
  readonly minimumNodeVersion: "20.0.0";
257
257
  readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
258
258
  readonly requiredTools: readonly string[];
package/dist/index.d.ts CHANGED
@@ -207,7 +207,7 @@ declare function runtimeInstallCapabilities(runtime: string | undefined, env?: N
207
207
  restartRequired: boolean;
208
208
  };
209
209
 
210
- declare const CONNECTOR_VERSION = "0.1.2";
210
+ declare const CONNECTOR_VERSION = "0.1.11-alpha.0";
211
211
  interface ConnectOptions {
212
212
  setupToken: string;
213
213
  apiBaseUrl: string;
@@ -248,11 +248,11 @@ declare function shortAddress(address: string): string;
248
248
 
249
249
  declare const MCP_RUNTIME_MANIFEST: {
250
250
  readonly mcpPackage: "@haven_ai/mcp";
251
- readonly mcpVersion: "0.1.10-alpha.0";
251
+ readonly mcpVersion: "0.1.11-alpha.0";
252
252
  readonly sdkPackage: "@haven_ai/sdk";
253
- readonly sdkVersion: "0.1.10-alpha.0";
253
+ readonly sdkVersion: "0.1.11-alpha.0";
254
254
  readonly signerPackage: "@haven_ai/signer";
255
- readonly signerVersion: "0.1.10-alpha.0";
255
+ readonly signerVersion: "0.1.11-alpha.0";
256
256
  readonly minimumNodeVersion: "20.0.0";
257
257
  readonly supportedClients: readonly ["codex-cli", "codex-desktop", "claude-code"];
258
258
  readonly requiredTools: readonly string[];
package/dist/index.js CHANGED
@@ -6,7 +6,6 @@ import { join, resolve, dirname } from 'path';
6
6
  import { execFile, spawn } from 'child_process';
7
7
  import { promisify } from 'util';
8
8
  import { registeredToolNames, MCP_VERSION, ensureConsent, computeConsentHash, loadCredentials, consentInputFromClient } from '@haven_ai/mcp';
9
- import { SKILL_FOLDER_NAME, HAVEN_SKILL_MD } from '@haven_ai/sdk';
10
9
  import { ensureSignerConsent, computeSignerConsentHash, loadSignerCredentials, createEdgeSigner, toolSchemas } from '@haven_ai/signer';
11
10
 
12
11
  // src/api.ts
@@ -207,9 +206,9 @@ var MCP_RUNTIME_MANIFEST = {
207
206
  mcpPackage: "@haven_ai/mcp",
208
207
  mcpVersion: MCP_VERSION,
209
208
  sdkPackage: "@haven_ai/sdk",
210
- sdkVersion: "0.1.10-alpha.0",
209
+ sdkVersion: "0.1.11-alpha.0",
211
210
  signerPackage: "@haven_ai/signer",
212
- signerVersion: "0.1.10-alpha.0",
211
+ signerVersion: "0.1.11-alpha.0",
213
212
  minimumNodeVersion: "20.0.0",
214
213
  supportedClients: ["codex-cli", "codex-desktop", "claude-code"],
215
214
  requiredTools: registeredToolNames()
@@ -1150,6 +1149,75 @@ async function assertFileExists(path, label) {
1150
1149
  throw new Error(`Missing ${label}: ${path}`);
1151
1150
  }
1152
1151
  }
1152
+
1153
+ // src/skill-content.ts
1154
+ var HAVEN_SKILL_MD = `---
1155
+ name: haven-pay
1156
+ 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.
1157
+ ---
1158
+
1159
+ # Haven: pay from a Haven wallet
1160
+
1161
+ This skill lets the agent make payments from the user's Haven wallet through
1162
+ the Haven MCP tools. Every payment is checked against the agent's on-chain
1163
+ budget before money moves; payments above the remaining budget wait for the
1164
+ user's approval in Haven.
1165
+
1166
+ ## When to use this skill
1167
+
1168
+ - The user asks to send money, pay someone, tip, donate, or transfer tokens.
1169
+ - A request returns HTTP 402 (x402): use the Haven pay tools to settle it,
1170
+ then retry the original request.
1171
+
1172
+ ## Identity and budget come from the tools \u2014 never assume them
1173
+
1174
+ Do not guess the wallet address, network, or budget. Read them live:
1175
+
1176
+ - \`haven_get_agent\` \u2014 agent identity, Haven wallet address, network.
1177
+ - \`haven_get_allowances\` \u2014 current per-token budgets and what remains.
1178
+
1179
+ Budgets reset on a period the user chose. If a payment exceeds the remaining
1180
+ budget it is queued for the user to approve in the Haven dashboard \u2014 this is
1181
+ normal, not an error.
1182
+
1183
+ ## Paying
1184
+
1185
+ - **Direct transfer:** \`haven_pay\` with recipient, amount, and token.
1186
+ - **x402 paywall:** \`haven_quote_x402\` to get a quote, then
1187
+ \`haven_pay_x402_quote\`. In the hosted setup the signing step happens in
1188
+ the local Haven signer; follow the tool results \u2014 they tell you the next
1189
+ action at every step. Retry the original request only when the result says
1190
+ \`retry_original_x402_request\`.
1191
+ - **Status:** \`haven_get_payment_status\` with a \`payment_id\` to check on
1192
+ queued or in-flight payments. Do not poll in a tight loop.
1193
+
1194
+ ## Approval semantics
1195
+
1196
+ - A result with \`pending_approval\` means the payment exceeded the remaining
1197
+ budget and is waiting for the user in Haven. Tell the user, then check
1198
+ status later.
1199
+ - Never ask the user for private keys and never try to sign anything
1200
+ yourself \u2014 Haven signs. If a tool reports a missing or invalid credential,
1201
+ tell the user to re-run the Haven setup command.
1202
+
1203
+ ## Failure handling
1204
+
1205
+ Haven errors are shaped \`{ error, status, details? }\` and written for
1206
+ humans \u2014 surface the message verbatim. Common cases:
1207
+
1208
+ - \`pending_approval\`: queued for the user's approval (see above).
1209
+ - \`insufficient_funds\`: the Haven wallet doesn't hold enough of that token.
1210
+ Suggest the user add funds in the Haven dashboard.
1211
+ - Budget exceeded: tell the user how much remains (from
1212
+ \`haven_get_allowances\`) and that they can raise the budget in Haven.
1213
+
1214
+ ## Revoke
1215
+
1216
+ If this agent's credential may have leaked, tell the user to pause or revoke
1217
+ the agent in the Haven dashboard under Agents. New requests stop immediately
1218
+ for that credential.
1219
+ `;
1220
+ var SKILL_FOLDER_NAME = "haven-pay";
1153
1221
  async function acknowledgeLocalSignerConsent(signerPath, log) {
1154
1222
  try {
1155
1223
  const input = await buildSignerConsentInput(signerPath);
@@ -1527,7 +1595,7 @@ function localRuntimePrepareErrorCode(err) {
1527
1595
  }
1528
1596
 
1529
1597
  // src/runtime.ts
1530
- var CONNECTOR_VERSION = "0.1.2";
1598
+ var CONNECTOR_VERSION = "0.1.11-alpha.0";
1531
1599
  async function runConnect(options, deps = {}) {
1532
1600
  const connectorVersion = options.connectorVersion ?? CONNECTOR_VERSION;
1533
1601
  const api = deps.api ?? createConnectApiClient(options.apiBaseUrl);