@haven_ai/signer 0.1.33-alpha.0 → 0.1.34-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/cli.cjs CHANGED
@@ -302,11 +302,9 @@ function createEdgeSigner(delegateKey, options = {}) {
302
302
  }
303
303
  try {
304
304
  const payment = sdk.decodeBase64Json(header);
305
- const wrapped = sdk.encodeBase64Json({
306
- x402Version: paymentRequired.x402Version,
307
- accepted: option,
308
- payload: payment.payload
309
- });
305
+ const wrapped = sdk.encodeBase64Json(
306
+ sdk.x402V2PaymentEnvelope(paymentRequired, option, payment.payload)
307
+ );
310
308
  return { paymentHeader: wrapped, accepted: option };
311
309
  } finally {
312
310
  x402Bindings.delete(x402Binding);
@@ -415,7 +413,7 @@ function assertSupportedBindingVersion(received, supported, context) {
415
413
  const ceiling = outOfDate ? `This signer is out of date: it supports ${context} versions up to ${highest}, and Haven sent version ${received}. Update @haven_ai/signer \u2014 rerun the Haven connector (\`npx @haven_ai/connect@alpha\`), which reinstalls the pinned MCP runtime.` : `Unsupported ${context} version ${received}: this signer supports ${supported.join(", ")}.`;
416
414
  const fallback = outOfDate ? sdk.SIGNER_UPDATE_FALLBACK : `This ${context} version (${received}) is older than what this signer enforces (${supported.join(", ")}) \u2014 updating @haven_ai/signer will not restore it. Nothing was signed or spent; stop and tell the user rather than retrying.`;
417
415
  throw new sdk.HavenUnsupportedSignerVersionError(
418
- `${ceiling} Nothing was signed. Do not rewrite the version field to a supported value: it is part of the Haven-signed binding message, so changing it invalidates the signature and would misrepresent what Haven authorised.`,
416
+ `${ceiling} Nothing was signed. Do not rewrite the version field to a supported value: it is part of the Haven-signed binding message, so changing it invalidates the signature and would misrepresent what Haven declared.`,
419
417
  code,
420
418
  supported,
421
419
  received,
@@ -1239,7 +1237,7 @@ async function warnIfCredentialFilePermissive(path, log = (message) => process.s
1239
1237
 
1240
1238
  // src/server.ts
1241
1239
  var SIGNER_NAME = "@haven_ai/signer";
1242
- var SIGNER_VERSION = "0.1.33-alpha.0";
1240
+ var SIGNER_VERSION = "0.1.34-alpha.0";
1243
1241
  async function resolveSignerRuntime(options = {}) {
1244
1242
  assertSupportedNodeVersion(options.nodeVersion);
1245
1243
  if (options.delegateKey) {