antenna-fyi 1.2.29 → 1.2.30

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.
Files changed (2) hide show
  1. package/lib/cli.js +19 -22
  2. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -534,28 +534,26 @@ export async function handleWatch(f) {
534
534
 
535
535
  const notified = loadNotified();
536
536
 
537
- // Detect local agent framework for push notifications
538
- let pushMethod = f.push || null;
539
- if (!pushMethod) {
540
- pushMethod = "terminal"; // default: just print
537
+ // Detect local agent frameworks for push notifications
538
+ // Push to ALL available frameworks, not just one
539
+ const pushMethods = new Set();
540
+ if (f.push) {
541
+ f.push.split(",").forEach(m => pushMethods.add(m.trim()));
542
+ } else {
541
543
  try {
542
544
  execSync("which openclaw", { stdio: "pipe" });
543
- // Verify gateway is running
544
545
  try {
545
546
  execSync("openclaw gateway health", { stdio: "pipe", timeout: 5000 });
546
- pushMethod = "openclaw";
547
+ pushMethods.add("openclaw");
547
548
  } catch { /* gateway not running */ }
548
549
  } catch { /* openclaw not installed */ }
549
-
550
- if (pushMethod === "terminal") {
550
+ try {
551
+ execSync("which hermes", { stdio: "pipe" });
551
552
  try {
552
- execSync("which hermes", { stdio: "pipe" });
553
- try {
554
- execSync("hermes gateway status", { stdio: "pipe", timeout: 5000 });
555
- pushMethod = "hermes";
556
- } catch { /* hermes gateway not running */ }
557
- } catch { /* hermes not installed */ }
558
- }
553
+ execSync("hermes gateway status", { stdio: "pipe", timeout: 5000 });
554
+ pushMethods.add("hermes");
555
+ } catch { /* hermes gateway not running */ }
556
+ } catch { /* hermes not installed */ }
559
557
  }
560
558
 
561
559
  // Force stdout blocking mode for non-TTY environments (Hermes exec)
@@ -573,10 +571,8 @@ export async function handleWatch(f) {
573
571
  };
574
572
 
575
573
  _log(`📡 Watching for new matches for ${id}...`);
576
- if (pushMethod === "openclaw") {
577
- _log(` 🔗 Detected OpenClaw — will push notifications to your channel.`);
578
- } else if (pushMethod === "hermes") {
579
- _log(` 🔗 Detected Hermes — will push notifications to your channel.`);
574
+ if (pushMethods.size > 0) {
575
+ _log(` 🔗 Push targets: ${[...pushMethods].join(", ")}`);
580
576
  } else {
581
577
  _log(` â„šī¸ No agent framework detected — notifications will print here.`);
582
578
  }
@@ -589,9 +585,9 @@ export async function handleWatch(f) {
589
585
  async function pushNotify(message) {
590
586
  _log(message); // always print to terminal
591
587
 
592
- if (pushMethod === "openclaw") {
588
+ // Push to ALL available frameworks
589
+ if (pushMethods.has("openclaw")) {
593
590
  try {
594
- // Try to get chat_id from DB for direct message send
595
591
  const profile = await getProfile({ device_id: id });
596
592
  const chatId = profile?.last_chat_id;
597
593
  const parts = id.split(":");
@@ -608,7 +604,8 @@ export async function handleWatch(f) {
608
604
  );
609
605
  }
610
606
  } catch (err) { /* terminal output is the fallback */ }
611
- } else if (pushMethod === "hermes") {
607
+ }
608
+ if (pushMethods.has("hermes")) {
612
609
  try {
613
610
  execSync(
614
611
  `hermes cron create --name "Antenna notification" --run-now --once --message ${JSON.stringify(message)}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antenna-fyi",
3
- "version": "1.2.29",
3
+ "version": "1.2.30",
4
4
  "description": "Antenna — nearby people discovery. CLI + MCP server + OpenClaw skill & plugin, all in one package.",
5
5
  "type": "module",
6
6
  "bin": {