@haven_ai/signer 0.0.0-dev.202610071229.20ccd17 → 0.0.0-dev.202610071501.0ff4069

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
@@ -680,7 +680,7 @@ async function fetchTaskBudgetSignContext(identity, taskBudgetId, fetchImpl = fe
680
680
 
681
681
  // src/tools.ts
682
682
  var SIGNER_NAME = "@haven_ai/signer";
683
- var SIGNER_VERSION = "0.0.0-dev.202610071229.20ccd17";
683
+ var SIGNER_VERSION = "0.0.0-dev.202610071501.0ff4069";
684
684
  var UNSUPPORTED_ARGUMENT_MARKER = "HavenSignerUnsupportedArgument:";
685
685
  var USEROP_BINDING_MISMATCH = "USEROP_BINDING_MISMATCH";
686
686
  var HavenUserOpBindingRefusedError = class extends edge.HavenSigningError {
@@ -881,8 +881,10 @@ var X402_SIGN_HEADER_DESCRIPTION = [
881
881
  "do not call this tool. The signer validates the merchant, amount, resource, asset, and",
882
882
  "network against the recorded funding context before signing, checks expires_at when present,",
883
883
  "and rejects mismatches or expired payment windows.",
884
- "Returns { payment_header, accepted }. On your retry set BOTH PAYMENT-SIGNATURE (x402 v2) and",
885
- "X-PAYMENT (v1) to <payment_header>; a strict v2 merchant reads only the first.",
884
+ "Returns { payment_header, retry_headers, accepted }. On your retry set EVERY header named in",
885
+ "retry_headers to <payment_header> \u2014 the names come from the same rule the wire uses (both",
886
+ "PAYMENT-SIGNATURE (x402 v2) and X-PAYMENT (v1) on the EIP-3009 bridge; a strict v2 merchant reads",
887
+ "only the first).",
886
888
  "Only call after haven_submit has confirmed the funding step (nextAction=none or",
887
889
  "the funding tx has a confirmed status). Next for paid MCP tools: call mcp__haven__haven_complete_mcp_tool."
888
890
  ].join(" ");
@@ -908,8 +910,8 @@ var SIGN_X402_DESCRIPTION = [
908
910
  "haven_sign, not to this one. payment_header IS the header to use.",
909
911
  "Next: for a paid MCP tool, call mcp__haven__haven_settle_mcp_tool. For a direct plain-HTTP x402",
910
912
  "merchant (the haven_pay_x402_quote path), relay signature via mcp__haven__haven_submit and then",
911
- "retry the original merchant URL YOURSELF, setting BOTH PAYMENT-SIGNATURE (x402 v2) and",
912
- "X-PAYMENT (v1) to payment_header \u2014 Haven never contacts that merchant."
913
+ "retry the original merchant URL YOURSELF, setting EVERY header the result names in",
914
+ "retry_headers to payment_header \u2014 Haven never contacts that merchant."
913
915
  ].join(" ");
914
916
  var SIGN_SWEEP_DELEGATE_DESCRIPTION = [
915
917
  "Sign a Haven-prepared gasless USDC sweep that recovers stranded funds from the delegate",
@@ -1250,7 +1252,13 @@ function createToolHandlers(signer, options = {}) {
1250
1252
  "haven_x402_sign_header",
1251
1253
  hashPayloadForAudit(args.payment_required)
1252
1254
  );
1253
- return { payment_header: result.paymentHeader, accepted: result.accepted };
1255
+ return {
1256
+ payment_header: result.paymentHeader,
1257
+ accepted: result.accepted,
1258
+ // #3727: the ready-made retry headers beside the prose — the names
1259
+ // come from the SDK's live rule, never re-derived here.
1260
+ retry_headers: edge.x402RetryHeadersFor(result.paymentHeader)
1261
+ };
1254
1262
  }),
1255
1263
  haven_sign_x402: async (input) => runTool(async () => {
1256
1264
  const args = parseStrictFor("haven_sign_x402", coerceX402Expected(coercePaymentRequired(input)));
@@ -1285,6 +1293,9 @@ function createToolHandlers(signer, options = {}) {
1285
1293
  x402_binding: funding.x402Binding,
1286
1294
  payment_header: header.paymentHeader,
1287
1295
  accepted: header.accepted,
1296
+ // #3727: the ready-made retry headers beside the prose — the names
1297
+ // come from the SDK's live rule, never re-derived here.
1298
+ retry_headers: edge.x402RetryHeadersFor(header.paymentHeader),
1288
1299
  ...clientUpdateField(resolved)
1289
1300
  };
1290
1301
  }),