antenna-fyi 1.3.16 → 1.3.18
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 +16 -13
- package/lib/core.js +24 -18
- package/lib/mcp.js +5 -5
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -47,9 +47,9 @@ export async function handleScan(f) {
|
|
|
47
47
|
}
|
|
48
48
|
result.profiles.forEach((p) => {
|
|
49
49
|
console.log(` ${p.emoji} ${p.name}${p.distance_m != null ? ` (${Math.round(p.distance_m)}m)` : ""}`);
|
|
50
|
-
if (p.
|
|
51
|
-
if (p.
|
|
52
|
-
if (p.
|
|
50
|
+
if (p.personal_description) console.log(` ${p.personal_description}`);
|
|
51
|
+
if (p.looking_for) console.log(` ${p.looking_for}`);
|
|
52
|
+
if (p.conversation_style) console.log(` ${p.conversation_style}`);
|
|
53
53
|
console.log(` ref: ${p.ref}\n`);
|
|
54
54
|
});
|
|
55
55
|
|
|
@@ -81,11 +81,14 @@ export async function handleProfile(f) {
|
|
|
81
81
|
console.log(JSON.stringify(data, null, 2));
|
|
82
82
|
} else {
|
|
83
83
|
const data = await getProfile({ device_id: id });
|
|
84
|
-
if (!data) return console.log("No profile yet. Create one with --name and --
|
|
84
|
+
if (!data) return console.log("No profile yet. Create one with --name and --personal-description");
|
|
85
85
|
console.log(`${data.emoji || "👤"} ${data.display_name || "Anonymous"}`);
|
|
86
|
-
if (data.
|
|
87
|
-
if (data.
|
|
88
|
-
if (data.
|
|
86
|
+
if (data.personal_description) console.log(` ${data.personal_description}`);
|
|
87
|
+
if (data.looking_for) console.log(` Looking for: ${data.looking_for}`);
|
|
88
|
+
if (data.conversation_style) console.log(` Conversation: ${data.conversation_style}`);
|
|
89
|
+
if (data.interest_tags?.length) console.log(` Tags: ${data.interest_tags.join(", ")}`);
|
|
90
|
+
if (data.city) console.log(` 📍 ${data.city}`);
|
|
91
|
+
if (data.context) console.log(` More info: ${data.context}`);
|
|
89
92
|
}
|
|
90
93
|
}
|
|
91
94
|
|
|
@@ -128,7 +131,7 @@ export async function handleMatches(f) {
|
|
|
128
131
|
}
|
|
129
132
|
for (const m of result.incoming_accepts) {
|
|
130
133
|
console.log(`📩 WANTS TO MEET YOU: ${m.emoji} ${m.name}`);
|
|
131
|
-
if (m.
|
|
134
|
+
if (m.personal_description) console.log(` ${m.personal_description}`);
|
|
132
135
|
console.log(` Accept: antenna accept --id ${f.id} --ref ${m.ref}`);
|
|
133
136
|
console.log();
|
|
134
137
|
}
|
|
@@ -142,9 +145,9 @@ export async function handleDiscover(f) {
|
|
|
142
145
|
console.log(`🌍 Global discover:\n`);
|
|
143
146
|
result.profiles.forEach((p) => {
|
|
144
147
|
console.log(` ${p.emoji} ${p.name}`);
|
|
145
|
-
if (p.
|
|
146
|
-
if (p.
|
|
147
|
-
if (p.
|
|
148
|
+
if (p.personal_description) console.log(` ${p.personal_description}`);
|
|
149
|
+
if (p.looking_for) console.log(` ${p.looking_for}`);
|
|
150
|
+
if (p.conversation_style) console.log(` ${p.conversation_style}`);
|
|
148
151
|
if (p.match_reason) console.log(` → ${p.match_reason}`);
|
|
149
152
|
console.log(` ref: ${p.ref}\n`);
|
|
150
153
|
});
|
|
@@ -229,7 +232,7 @@ export async function handleEvent(f) {
|
|
|
229
232
|
const creatorTag = p.role === "creator" ? " [主办]" : "";
|
|
230
233
|
const statusTag = p.status === "pending" ? " 🟡待审批" : "";
|
|
231
234
|
console.log(` ${p.emoji} ${p.name}${creatorTag}${badge}${statusTag}`);
|
|
232
|
-
if (p.
|
|
235
|
+
if (p.personal_description) console.log(` ${p.personal_description}`);
|
|
233
236
|
if (p.application_context) console.log(` 📝 ${p.application_context}`);
|
|
234
237
|
console.log(` ref: ${p.ref}\n`);
|
|
235
238
|
});
|
|
@@ -763,7 +766,7 @@ export async function handleWatch(f) {
|
|
|
763
766
|
for (const m of initial.incoming_accepts) {
|
|
764
767
|
const key = `incoming:${m._device_id}`;
|
|
765
768
|
notified.add(key);
|
|
766
|
-
_log(` ${m.emoji || "👤"} ${m.name} — ${m.
|
|
769
|
+
_log(` ${m.emoji || "👤"} ${m.name} — ${m.personal_description || ""}`);
|
|
767
770
|
}
|
|
768
771
|
saveNotified(notified);
|
|
769
772
|
_log("");
|
package/lib/core.js
CHANGED
|
@@ -106,9 +106,9 @@ export async function scan({ lat, lng, radius_m = 500, device_id, supabaseUrl, s
|
|
|
106
106
|
ref,
|
|
107
107
|
name: p.display_name || "匿名",
|
|
108
108
|
emoji: p.emoji || "👤",
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
personal_description: p.line1,
|
|
110
|
+
looking_for: p.line2,
|
|
111
|
+
conversation_style: p.line3,
|
|
112
112
|
distance_m: p.distance_m ?? p.dist_meters ?? null,
|
|
113
113
|
};
|
|
114
114
|
});
|
|
@@ -185,9 +185,9 @@ export async function scan({ lat, lng, radius_m = 500, device_id, supabaseUrl, s
|
|
|
185
185
|
|
|
186
186
|
export const PROFILE_FIELDS = {
|
|
187
187
|
display_name: { label: "显示名称", description: "How you want to be called" },
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
personal_description: { label: "个人描述", description: "Who you are and what you do", maxLength: 220, required: true },
|
|
189
|
+
looking_for: { label: "想认识的人", description: "The kind of people you want to meet", maxLength: 140 },
|
|
190
|
+
conversation_style: { label: "想要的交流方式", description: "The type of conversations you want", maxLength: 160 },
|
|
191
191
|
matching_context: { label: "匹配上下文", description: "Agent-generated rich context for better matching (not shown to others)", maxLength: 1000 },
|
|
192
192
|
interest_tags: { label: "兴趣标签", description: "Interest/topic tags shown on the card (up to 8)", maxItems: 8 },
|
|
193
193
|
city: { label: "国家/地区", description: "Country or region" },
|
|
@@ -215,6 +215,12 @@ export async function getProfile({ device_id, supabaseUrl, supabaseKey }) {
|
|
|
215
215
|
data.context = ctx.context || null;
|
|
216
216
|
} catch {}
|
|
217
217
|
}
|
|
218
|
+
|
|
219
|
+
// Add semantic field aliases
|
|
220
|
+
data.personal_description = data.line1 || null;
|
|
221
|
+
data.looking_for = data.line2 || null;
|
|
222
|
+
data.conversation_style = data.line3 || null;
|
|
223
|
+
|
|
218
224
|
return data;
|
|
219
225
|
}
|
|
220
226
|
|
|
@@ -418,9 +424,9 @@ export async function checkMatches({ device_id, supabaseUrl, supabaseKey }) {
|
|
|
418
424
|
_device_id: m.target_id,
|
|
419
425
|
name: m.name || "匿名",
|
|
420
426
|
emoji: m.emoji || "👤",
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
427
|
+
personal_description: m.line1,
|
|
428
|
+
looking_for: m.line2,
|
|
429
|
+
conversation_style: m.line3,
|
|
424
430
|
their_contact: m.their_contact || null,
|
|
425
431
|
you_shared: m.you_shared || null,
|
|
426
432
|
}));
|
|
@@ -431,9 +437,9 @@ export async function checkMatches({ device_id, supabaseUrl, supabaseKey }) {
|
|
|
431
437
|
_device_id: m.target_id,
|
|
432
438
|
name: m.name || "匿名",
|
|
433
439
|
emoji: m.emoji || "👤",
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
440
|
+
personal_description: m.line1,
|
|
441
|
+
looking_for: m.line2,
|
|
442
|
+
conversation_style: m.line3,
|
|
437
443
|
}));
|
|
438
444
|
|
|
439
445
|
const messages = [];
|
|
@@ -503,9 +509,9 @@ export async function discover({ device_id, supabaseUrl, supabaseKey }) {
|
|
|
503
509
|
ref,
|
|
504
510
|
name: p.display_name || "匿名",
|
|
505
511
|
emoji: p.emoji || "👤",
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
512
|
+
personal_description: p.line1,
|
|
513
|
+
looking_for: p.line2,
|
|
514
|
+
conversation_style: p.line3,
|
|
509
515
|
match_reason: reason,
|
|
510
516
|
});
|
|
511
517
|
}
|
|
@@ -694,9 +700,9 @@ export async function eventScan({ code, device_id, supabaseUrl, supabaseKey }) {
|
|
|
694
700
|
ref,
|
|
695
701
|
name: p.display_name || "匿名",
|
|
696
702
|
emoji: p.emoji || "👤",
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
703
|
+
personal_description: p.line1,
|
|
704
|
+
looking_for: p.line2,
|
|
705
|
+
conversation_style: p.line3,
|
|
700
706
|
checked_in: !!p.checked_in,
|
|
701
707
|
role: p.role || "participant",
|
|
702
708
|
status: p.status || "active",
|
package/lib/mcp.js
CHANGED
|
@@ -111,9 +111,9 @@ export async function startMcpServer() {
|
|
|
111
111
|
sender_id: z.string().describe("The sender's user ID"),
|
|
112
112
|
channel: z.string().describe("Channel name"),
|
|
113
113
|
display_name: z.string().optional().describe("Display name"),
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
personal_description: z.string().optional().describe("Personal description — who you are and what you do (max 220 chars)"),
|
|
115
|
+
looking_for: z.string().optional().describe("Looking for — the kind of people you want to meet (max 140 chars)"),
|
|
116
|
+
conversation_style: z.string().optional().describe("Conversation style — the type of conversations you want (max 160 chars)"),
|
|
117
117
|
matching_context: z.string().optional().describe("Agent-generated rich context for embedding-based matching (not shown to others, max 1000 chars). Generate this FIRST, then derive the three descriptions from it."),
|
|
118
118
|
interest_tags: z.array(z.string()).optional().describe("Interest/topic tags shown on the card (up to 8)"),
|
|
119
119
|
city: z.string().optional().describe("Country or region (e.g. 'United States', 'Beijing')"),
|
|
@@ -121,7 +121,7 @@ export async function startMcpServer() {
|
|
|
121
121
|
is_active: z.boolean().optional().describe("Whether the profile is active or quiet"),
|
|
122
122
|
visible: z.boolean().optional().default(true),
|
|
123
123
|
},
|
|
124
|
-
async ({ action, sender_id, channel, display_name,
|
|
124
|
+
async ({ action, sender_id, channel, display_name, personal_description, looking_for, conversation_style, matching_context, interest_tags, city, links, is_active, visible }) => {
|
|
125
125
|
const deviceId = deriveDeviceId(sender_id, channel);
|
|
126
126
|
try {
|
|
127
127
|
if (action === "get") {
|
|
@@ -131,7 +131,7 @@ export async function startMcpServer() {
|
|
|
131
131
|
: { profile: null, message: "还没有名片。跟用户聊聊他们是谁、做什么、想认识什么人,然后帮他们创建。", fields: PROFILE_FIELDS };
|
|
132
132
|
return jsonResult(await withMatchNotifications(deviceId, result));
|
|
133
133
|
}
|
|
134
|
-
const data = await setProfile({ device_id: deviceId, display_name, line1, line2, line3, matching_context, interest_tags, city, links, is_active, visible });
|
|
134
|
+
const data = await setProfile({ device_id: deviceId, display_name, line1: personal_description, line2: looking_for, line3: conversation_style, matching_context, interest_tags, city, links, is_active, visible });
|
|
135
135
|
return jsonResult(await withMatchNotifications(deviceId, { saved: true, profile: data }));
|
|
136
136
|
} catch (e) {
|
|
137
137
|
return jsonResult({ error: e.message });
|