@haven_ai/mcp 0.0.0-dev.202610221956.436fa7a → 0.0.0-dev.202610222020.b071b39

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/cli.cjs CHANGED
@@ -1152,6 +1152,24 @@ function normalizeError(err) {
1152
1152
  message: err.message
1153
1153
  };
1154
1154
  }
1155
+ if (err instanceof sdk.MerchantEgressRefusedError && !err.beforeRequest && err.paymentId) {
1156
+ const noFundingLeg = err.settlementScheme === "erc7710";
1157
+ const nextAction = noFundingLeg ? sdk.AgentPaymentNextAction.CheckStatusLater : sdk.AgentPaymentNextAction.SweepStrandedFunds;
1158
+ return {
1159
+ success: false,
1160
+ code: err.code,
1161
+ message: err.message,
1162
+ statusCode: err.statusCode,
1163
+ paymentId: err.paymentId,
1164
+ status: "merchant_unresponsive_after_funding",
1165
+ phase: noFundingLeg ? "not_delivered" : "funded_but_unsettled",
1166
+ nextAction,
1167
+ next_action: nextAction,
1168
+ next_tool: "haven_get_payment_status",
1169
+ next_arguments: { payment_id: err.paymentId },
1170
+ suggested_tool: "haven_get_payment_status"
1171
+ };
1172
+ }
1155
1173
  if (err instanceof sdk.HavenApiError) {
1156
1174
  const body = err.body;
1157
1175
  return {
@@ -1409,7 +1427,7 @@ async function resolveHavenClient(options = {}) {
1409
1427
  return { client, credentials };
1410
1428
  }
1411
1429
  var MCP_NAME = "@haven_ai/mcp";
1412
- var MCP_VERSION = "0.0.0-dev.202610221956.436fa7a";
1430
+ var MCP_VERSION = "0.0.0-dev.202610222020.b071b39";
1413
1431
  var MCP_INSTRUCTIONS = [
1414
1432
  "Haven local MCP server: signs in-process with the delegate key it holds on",
1415
1433
  "this machine \u2014 the key never leaves this process. Call haven_get_agent",