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.
@@ -88,7 +88,7 @@ __export(exports_urls, {
88
88
  VERSION: () => VERSION,
89
89
  URLS: () => URLS
90
90
  });
91
- var URLS, VERSION = "1.0.0-alpha.33", env;
91
+ var URLS, VERSION = "1.0.0-alpha.34", env;
92
92
  var init_urls = __esm(() => {
93
93
  URLS = {
94
94
  BROKER: process.env.CLAUDEMESH_BROKER_URL ?? "wss://ic.claudemesh.com/ws",
@@ -2522,7 +2522,13 @@ class BrokerClient {
2522
2522
  plaintext = `[${event}]`;
2523
2523
  }
2524
2524
  } else if (senderPubkey && nonce && ciphertext) {
2525
- plaintext = await decryptDirect({ nonce, ciphertext }, senderPubkey, this.sessionSecretKey ?? this.mesh.secretKey);
2525
+ const envelope = { nonce, ciphertext };
2526
+ if (this.sessionSecretKey) {
2527
+ plaintext = await decryptDirect(envelope, senderPubkey, this.sessionSecretKey);
2528
+ }
2529
+ if (plaintext === null) {
2530
+ plaintext = await decryptDirect(envelope, senderPubkey, this.mesh.secretKey);
2531
+ }
2526
2532
  }
2527
2533
  if (plaintext === null && ciphertext && !senderPubkey) {
2528
2534
  try {
@@ -12484,4 +12490,4 @@ main().catch((err) => {
12484
12490
  process.exit(EXIT.INTERNAL_ERROR);
12485
12491
  });
12486
12492
 
12487
- //# debugId=7971C6A86DFF7B3F64756E2164756E21
12493
+ //# debugId=9FBBACA39D70481964756E2164756E21