antenna-fyi 1.3.13 → 1.3.15
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/core.js +14 -1
- package/lib/mcp.js +2 -3
- package/package.json +1 -1
package/lib/core.js
CHANGED
|
@@ -295,7 +295,20 @@ export async function setProfile({
|
|
|
295
295
|
console.error("Embedding generation failed (non-fatal):", e.message);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
|
|
298
|
+
// Read back profile to get slug for public page link
|
|
299
|
+
let publicUrl = null;
|
|
300
|
+
try {
|
|
301
|
+
const profile = await getProfile({ device_id, supabaseUrl, supabaseKey });
|
|
302
|
+
if (profile?.profile_slug) {
|
|
303
|
+
publicUrl = `https://www.antenna.fyi/p/${profile.profile_slug}`;
|
|
304
|
+
}
|
|
305
|
+
} catch {}
|
|
306
|
+
|
|
307
|
+
return {
|
|
308
|
+
...data,
|
|
309
|
+
public_url: publicUrl,
|
|
310
|
+
next_step: "IMPORTANT: 1) Send the public_url to the user so they can share their profile. 2) Call antenna_bind to generate a GPS link. Do not skip either step.",
|
|
311
|
+
};
|
|
299
312
|
}
|
|
300
313
|
|
|
301
314
|
// ─── accept ──────────────────────────────────────────────────────────
|
package/lib/mcp.js
CHANGED
|
@@ -111,7 +111,6 @@ 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
|
-
emoji: z.string().optional().describe("Profile emoji (stored but not displayed on card)"),
|
|
115
114
|
line1: z.string().optional().describe("Personal description — who you are and what you do (max 220 chars)"),
|
|
116
115
|
line2: z.string().optional().describe("Looking for — the kind of people you want to meet (max 140 chars)"),
|
|
117
116
|
line3: z.string().optional().describe("Conversation style — the type of conversations you want (max 160 chars)"),
|
|
@@ -122,7 +121,7 @@ export async function startMcpServer() {
|
|
|
122
121
|
is_active: z.boolean().optional().describe("Whether the profile is active or quiet"),
|
|
123
122
|
visible: z.boolean().optional().default(true),
|
|
124
123
|
},
|
|
125
|
-
async ({ action, sender_id, channel, display_name,
|
|
124
|
+
async ({ action, sender_id, channel, display_name, line1, line2, line3, matching_context, interest_tags, city, links, is_active, visible }) => {
|
|
126
125
|
const deviceId = deriveDeviceId(sender_id, channel);
|
|
127
126
|
try {
|
|
128
127
|
if (action === "get") {
|
|
@@ -132,7 +131,7 @@ export async function startMcpServer() {
|
|
|
132
131
|
: { profile: null, message: "还没有名片。跟用户聊聊他们是谁、做什么、想认识什么人,然后帮他们创建。", fields: PROFILE_FIELDS };
|
|
133
132
|
return jsonResult(await withMatchNotifications(deviceId, result));
|
|
134
133
|
}
|
|
135
|
-
const data = await setProfile({ device_id: deviceId, display_name,
|
|
134
|
+
const data = await setProfile({ device_id: deviceId, display_name, line1, line2, line3, matching_context, interest_tags, city, links, is_active, visible });
|
|
136
135
|
return jsonResult(await withMatchNotifications(deviceId, { saved: true, profile: data }));
|
|
137
136
|
} catch (e) {
|
|
138
137
|
return jsonResult({ error: e.message });
|