antenna-fyi 1.2.26 → 1.2.27

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/lib/cli.js CHANGED
@@ -515,19 +515,36 @@ export async function handleWatch(f) {
515
515
  } catch { /* hermes not installed */ }
516
516
  }
517
517
 
518
- console.log(`📡 Watching for new matches for ${id}...`);
518
+ // Force stdout blocking mode for non-TTY environments (Hermes exec)
519
+ try { if (process.stdout._handle) process.stdout._handle.setBlocking(true); } catch {}
520
+
521
+ // Log to file as fallback
522
+ const logDir = path.join(os.homedir(), '.antenna');
523
+ const logFile = path.join(logDir, 'watch.log');
524
+ try { if (!existsSync(logDir)) mkdirSync(logDir, { recursive: true }); } catch {}
525
+ const logStream = await import('fs').then(fs => fs.createWriteStream(logFile, { flags: 'a' }));
526
+ const _log = (msg) => {
527
+ const line = `[${new Date().toISOString()}] ${msg}`;
528
+ console.log(msg);
529
+ try { logStream.write(line + '\n'); } catch {}
530
+ };
531
+
532
+ _log(`📡 Watching for new matches for ${id}...`);
519
533
  if (pushMethod === "openclaw") {
520
- console.log(` 🔗 Detected OpenClaw — will push notifications to your channel.`);
534
+ _log(` 🔗 Detected OpenClaw — will push notifications to your channel.`);
521
535
  } else if (pushMethod === "hermes") {
522
- console.log(` 🔗 Detected Hermes — will push notifications to your channel.`);
536
+ _log(` 🔗 Detected Hermes — will push notifications to your channel.`);
523
537
  } else {
524
- console.log(` â„šī¸ No agent framework detected — notifications will print here.`);
538
+ _log(` â„šī¸ No agent framework detected — notifications will print here.`);
525
539
  }
526
- console.log(` Press Ctrl+C to stop.\n`);
540
+ _log(` Press Ctrl+C to stop.\n`);
541
+
542
+ // Keep process alive (prevent exit when backgrounded)
543
+ process.stdin.resume();
527
544
 
528
545
  // Push notification helper
529
546
  async function pushNotify(message) {
530
- console.log(message); // always print to terminal
547
+ _log(message); // always print to terminal
531
548
 
532
549
  if (pushMethod === "openclaw") {
533
550
  try {
@@ -561,22 +578,22 @@ export async function handleWatch(f) {
561
578
  // Initial check
562
579
  const initial = await checkMatches({ device_id: id });
563
580
  if (initial.mutual_matches?.length) {
564
- console.log(`🎉 You have ${initial.mutual_matches.length} mutual match(es)!`);
581
+ _log(`🎉 You have ${initial.mutual_matches.length} mutual match(es)!`);
565
582
  for (const m of initial.mutual_matches) {
566
583
  const key = `mutual:${m.device_id}`;
567
584
  notified.add(key);
568
- console.log(` ${m.emoji || "👤"} ${m.name}${m.their_contact ? " — contact: " + m.their_contact : ""}`);
585
+ _log(` ${m.emoji || "👤"} ${m.name}${m.their_contact ? " — contact: " + m.their_contact : ""}`);
569
586
  }
570
- console.log();
587
+ _log();
571
588
  }
572
589
  if (initial.incoming_accepts?.length) {
573
- console.log(`📩 ${initial.incoming_accepts.length} person(s) want to meet you!`);
590
+ _log(`📩 ${initial.incoming_accepts.length} person(s) want to meet you!`);
574
591
  for (const m of initial.incoming_accepts) {
575
592
  const key = `incoming:${m.device_id}`;
576
593
  notified.add(key);
577
- console.log(` ${m.emoji || "👤"} ${m.name} — ${m.line1 || ""}`);
594
+ _log(` ${m.emoji || "👤"} ${m.name} — ${m.line1 || ""}`);
578
595
  }
579
- console.log();
596
+ _log();
580
597
  }
581
598
 
582
599
  // Subscribe to realtime changes on matches table
@@ -632,9 +649,9 @@ export async function handleWatch(f) {
632
649
  )
633
650
  .subscribe((status) => {
634
651
  if (status === "SUBSCRIBED") {
635
- console.log("✅ Connected — listening for matches in real-time.");
652
+ _log("✅ Connected — listening for matches in real-time.");
636
653
  } else if (status === "CHANNEL_ERROR" || status === "TIMED_OUT") {
637
- console.log(`âš ī¸ Connection issue (${status}), retrying...`);
654
+ _log(`âš ī¸ Connection issue (${status}), retrying...`);
638
655
  }
639
656
  });
640
657
 
@@ -678,7 +695,7 @@ export async function handleWatch(f) {
678
695
  )
679
696
  .subscribe((status) => {
680
697
  if (status === "SUBSCRIBED") {
681
- console.log("✅ Connected — listening for event notifications.");
698
+ _log("✅ Connected — listening for event notifications.");
682
699
  }
683
700
  });
684
701
 
@@ -44,7 +44,7 @@ PROFILE_SCHEMA = {
44
44
  },
45
45
  "sender_id": {"type": "string"},
46
46
  "channel": {"type": "string"},
47
- "chat_id": {"type": "string", "description": "Chat/channel ID for notifications"},
47
+ "chat_id": {"type": "string", "description": "REQUIRED for notifications. Pass chat/channel ID from message context."},
48
48
  "display_name": {"type": "string", "description": "Display name"},
49
49
  "emoji": {"type": "string", "description": "Profile emoji"},
50
50
  "line1": {"type": "string", "description": "Who you are / what you do"},
@@ -67,7 +67,7 @@ ACCEPT_SCHEMA = {
67
67
  "properties": {
68
68
  "sender_id": {"type": "string"},
69
69
  "channel": {"type": "string"},
70
- "chat_id": {"type": "string", "description": "Chat/channel ID for notifications"},
70
+ "chat_id": {"type": "string", "description": "REQUIRED for notifications. Pass chat/channel ID from message context."},
71
71
  "ref": {
72
72
  "type": "string",
73
73
  "description": "Ref number from scan results (e.g. '1')",
@@ -97,7 +97,7 @@ CHECKIN_SCHEMA = {
97
97
  "lng": {"type": "number", "description": "Longitude"},
98
98
  "sender_id": {"type": "string"},
99
99
  "channel": {"type": "string"},
100
- "chat_id": {"type": "string", "description": "Chat/channel ID for notifications"},
100
+ "chat_id": {"type": "string", "description": "REQUIRED for notifications. Pass chat/channel ID from message context."},
101
101
  "place_name": {
102
102
  "type": "string",
103
103
  "description": "Name of the place (optional)",
@@ -117,7 +117,7 @@ CHECK_MATCHES_SCHEMA = {
117
117
  "properties": {
118
118
  "sender_id": {"type": "string"},
119
119
  "channel": {"type": "string"},
120
- "chat_id": {"type": "string", "description": "Chat/channel ID for notifications"},
120
+ "chat_id": {"type": "string", "description": "REQUIRED for notifications. Pass chat/channel ID from message context."},
121
121
  },
122
122
  "required": ["sender_id", "channel"],
123
123
  },
@@ -133,7 +133,7 @@ BIND_SCHEMA = {
133
133
  "properties": {
134
134
  "sender_id": {"type": "string"},
135
135
  "channel": {"type": "string"},
136
- "chat_id": {"type": "string", "description": "Chat/channel ID for notifications"},
136
+ "chat_id": {"type": "string", "description": "REQUIRED for notifications. Pass chat/channel ID from message context."},
137
137
  "purpose": {"type": "string", "description": "'profile' (default) or 'event'"},
138
138
  "event_code": {"type": "string", "description": "Event code (when purpose=event)"},
139
139
  },
@@ -287,7 +287,7 @@ EVENT_UPDATE_SCHEMA = {
287
287
  "code": {"type": "string"},
288
288
  "sender_id": {"type": "string"},
289
289
  "channel": {"type": "string"},
290
- "chat_id": {"type": "string", "description": "Chat/channel ID for notifications"},
290
+ "chat_id": {"type": "string", "description": "REQUIRED for notifications. Pass chat/channel ID from message context."},
291
291
  "name": {"type": "string"},
292
292
  "description": {"type": "string"},
293
293
  "og_image": {"type": "string"},
@@ -309,7 +309,7 @@ EVENT_APPROVE_SCHEMA = {
309
309
  "code": {"type": "string"},
310
310
  "sender_id": {"type": "string"},
311
311
  "channel": {"type": "string"},
312
- "chat_id": {"type": "string", "description": "Chat/channel ID for notifications"},
312
+ "chat_id": {"type": "string", "description": "REQUIRED for notifications. Pass chat/channel ID from message context."},
313
313
  "ref": {"type": "string"},
314
314
  },
315
315
  "required": ["code", "sender_id", "channel", "ref"],
@@ -325,7 +325,7 @@ EVENT_REJECT_SCHEMA = {
325
325
  "code": {"type": "string"},
326
326
  "sender_id": {"type": "string"},
327
327
  "channel": {"type": "string"},
328
- "chat_id": {"type": "string", "description": "Chat/channel ID for notifications"},
328
+ "chat_id": {"type": "string", "description": "REQUIRED for notifications. Pass chat/channel ID from message context."},
329
329
  "ref": {"type": "string"},
330
330
  },
331
331
  "required": ["code", "sender_id", "channel", "ref"],
@@ -341,7 +341,7 @@ EVENT_ADD_HOST_SCHEMA = {
341
341
  "code": {"type": "string"},
342
342
  "sender_id": {"type": "string"},
343
343
  "channel": {"type": "string"},
344
- "chat_id": {"type": "string", "description": "Chat/channel ID for notifications"},
344
+ "chat_id": {"type": "string", "description": "REQUIRED for notifications. Pass chat/channel ID from message context."},
345
345
  "ref": {"type": "string"},
346
346
  },
347
347
  "required": ["code", "sender_id", "channel", "ref"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antenna-fyi",
3
- "version": "1.2.26",
3
+ "version": "1.2.27",
4
4
  "description": "Antenna — nearby people discovery. CLI + MCP server + OpenClaw skill & plugin, all in one package.",
5
5
  "type": "module",
6
6
  "bin": {