claudemesh-cli 1.0.0-alpha.33 → 1.0.0-alpha.34

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.
@@ -2689,7 +2689,13 @@ class BrokerClient {
2689
2689
  plaintext = `[${event}]`;
2690
2690
  }
2691
2691
  } else if (senderPubkey && nonce && ciphertext) {
2692
- plaintext = await decryptDirect({ nonce, ciphertext }, senderPubkey, this.sessionSecretKey ?? this.mesh.secretKey);
2692
+ const envelope = { nonce, ciphertext };
2693
+ if (this.sessionSecretKey) {
2694
+ plaintext = await decryptDirect(envelope, senderPubkey, this.sessionSecretKey);
2695
+ }
2696
+ if (plaintext === null) {
2697
+ plaintext = await decryptDirect(envelope, senderPubkey, this.mesh.secretKey);
2698
+ }
2693
2699
  }
2694
2700
  if (plaintext === null && ciphertext && !senderPubkey) {
2695
2701
  try {
@@ -3488,7 +3494,7 @@ __export(exports_urls, {
3488
3494
  VERSION: () => VERSION,
3489
3495
  URLS: () => URLS
3490
3496
  });
3491
- var URLS, VERSION = "1.0.0-alpha.33", env;
3497
+ var URLS, VERSION = "1.0.0-alpha.34", env;
3492
3498
  var init_urls = __esm(() => {
3493
3499
  URLS = {
3494
3500
  BROKER: process.env.CLAUDEMESH_BROKER_URL ?? "wss://ic.claudemesh.com/ws",
@@ -6527,4 +6533,4 @@ startMcpServer().catch((err) => {
6527
6533
  process.exit(1);
6528
6534
  });
6529
6535
 
6530
- //# debugId=176161E2F9EDE48B64756E2164756E21
6536
+ //# debugId=8F33C4D68058778464756E2164756E21