antenna-fyi 1.2.31 → 1.2.32
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 +12 -3
- package/lib/hermes-plugin/tools.py +1 -5
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -564,7 +564,7 @@ export async function handleWatch(f) {
|
|
|
564
564
|
const logFile = path.join(logDir, 'watch.log');
|
|
565
565
|
try { if (!existsSync(logDir)) mkdirSync(logDir, { recursive: true }); } catch {}
|
|
566
566
|
const logStream = await import('fs').then(fs => fs.createWriteStream(logFile, { flags: 'a' }));
|
|
567
|
-
const _log = (msg) => {
|
|
567
|
+
const _log = (msg = "") => {
|
|
568
568
|
const line = `[${new Date().toISOString()}] ${msg}`;
|
|
569
569
|
console.log(msg);
|
|
570
570
|
try { logStream.write(line + '\n'); } catch {}
|
|
@@ -625,7 +625,7 @@ export async function handleWatch(f) {
|
|
|
625
625
|
_log(` ${m.emoji || "👤"} ${m.name}${m.their_contact ? " — contact: " + m.their_contact : ""}`);
|
|
626
626
|
}
|
|
627
627
|
saveNotified(notified);
|
|
628
|
-
_log();
|
|
628
|
+
_log("");
|
|
629
629
|
}
|
|
630
630
|
if (initial.incoming_accepts?.length) {
|
|
631
631
|
_log(`📩 ${initial.incoming_accepts.length} person(s) want to meet you!`);
|
|
@@ -635,9 +635,18 @@ export async function handleWatch(f) {
|
|
|
635
635
|
_log(` ${m.emoji || "👤"} ${m.name} — ${m.line1 || ""}`);
|
|
636
636
|
}
|
|
637
637
|
saveNotified(notified);
|
|
638
|
-
_log();
|
|
638
|
+
_log("");
|
|
639
639
|
}
|
|
640
640
|
|
|
641
|
+
// Seed notified set with current event states (don't push, just record)
|
|
642
|
+
try {
|
|
643
|
+
const { data: evts } = await sb.rpc("get_my_event_updates", { p_device_id: id });
|
|
644
|
+
for (const ev of (evts || [])) {
|
|
645
|
+
notified.add(`event:${ev.event_id}:${ev.status}`);
|
|
646
|
+
}
|
|
647
|
+
saveNotified(notified);
|
|
648
|
+
} catch { /* silent */ }
|
|
649
|
+
|
|
641
650
|
// Subscribe to realtime changes on matches table
|
|
642
651
|
const channel = sb
|
|
643
652
|
.channel("antenna-cli-watch")
|
|
@@ -103,11 +103,6 @@ def handle_scan(params: dict) -> str:
|
|
|
103
103
|
|
|
104
104
|
flat, flng = _fuzzy(lat, lng)
|
|
105
105
|
|
|
106
|
-
# Update own location
|
|
107
|
-
sb.rpc("upsert_profile_location", {
|
|
108
|
-
"p_device_id": did, "p_lng": flng, "p_lat": flat,
|
|
109
|
-
}).execute()
|
|
110
|
-
|
|
111
106
|
# Query nearby
|
|
112
107
|
resp = sb.rpc("nearby_profiles", {
|
|
113
108
|
"p_lat": flat, "p_lng": flng, "p_radius_m": radius,
|
|
@@ -132,6 +127,7 @@ def handle_scan(params: dict) -> str:
|
|
|
132
127
|
"line1": p.get("line1"),
|
|
133
128
|
"line2": p.get("line2"),
|
|
134
129
|
"line3": p.get("line3"),
|
|
130
|
+
"distance_m": p.get("distance_m") or p.get("dist_meters"),
|
|
135
131
|
})
|
|
136
132
|
|
|
137
133
|
return _ok({
|