claudemesh-cli 1.32.0 → 1.32.1

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.
@@ -104,7 +104,7 @@ __export(exports_urls, {
104
104
  VERSION: () => VERSION,
105
105
  URLS: () => URLS
106
106
  });
107
- var URLS, VERSION = "1.32.0", env;
107
+ var URLS, VERSION = "1.32.1", env;
108
108
  var init_urls = __esm(() => {
109
109
  URLS = {
110
110
  BROKER: process.env.CLAUDEMESH_BROKER_URL ?? "wss://ic.claudemesh.com/ws",
@@ -11083,6 +11083,10 @@ class SessionBrokerClient {
11083
11083
  }
11084
11084
  return;
11085
11085
  }
11086
+ if (msg.type === "push" || msg.type === "inbound") {
11087
+ this.opts.onPush?.(msg);
11088
+ return;
11089
+ }
11086
11090
  });
11087
11091
  ws.on("close", (code, reason) => {
11088
11092
  if (this.helloTimer) {
@@ -11645,6 +11649,7 @@ async function runDaemon(opts = {}) {
11645
11649
  sessionBrokers.delete(info.token);
11646
11650
  prior.close().catch(() => {});
11647
11651
  }
11652
+ const sessionSecretKeyHex = info.presence.sessionSecretKey;
11648
11653
  const client = new SessionBrokerClient({
11649
11654
  mesh: meshConfig,
11650
11655
  sessionPubkey: info.presence.sessionPubkey,
@@ -11654,7 +11659,16 @@ async function runDaemon(opts = {}) {
11654
11659
  displayName: info.displayName,
11655
11660
  ...info.role ? { role: info.role } : {},
11656
11661
  ...info.cwd ? { cwd: info.cwd } : {},
11657
- pid: info.pid
11662
+ pid: info.pid,
11663
+ onPush: (m) => {
11664
+ handleBrokerPush(m, {
11665
+ db: inboxDb,
11666
+ bus,
11667
+ meshSlug: meshConfig.slug,
11668
+ recipientSecretKeyHex: meshConfig.secretKey,
11669
+ sessionSecretKeyHex
11670
+ });
11671
+ }
11658
11672
  });
11659
11673
  sessionBrokers.set(info.token, client);
11660
11674
  client.connect().catch((err) => process.stderr.write(JSON.stringify({
@@ -20273,4 +20287,4 @@ main().catch((err) => {
20273
20287
  process.exit(EXIT.INTERNAL_ERROR);
20274
20288
  });
20275
20289
 
20276
- //# debugId=9045DA825D3D7C3164756E2164756E21
20290
+ //# debugId=FAFB4F8D5ECBBBB864756E2164756E21