antenna-fyi 1.3.18 → 1.3.20
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 -16
- package/lib/core.js +1 -1
- package/lib/mcp.js +3 -3
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -66,15 +66,15 @@ export async function handleScan(f) {
|
|
|
66
66
|
|
|
67
67
|
export async function handleProfile(f) {
|
|
68
68
|
const id = resolveId(f);
|
|
69
|
-
if (!id) return console.error("Usage: antenna profile --id <platform>:<user_id> [--name Yi --emoji 🦦 --
|
|
70
|
-
if (f.name || f
|
|
69
|
+
if (!id) return console.error("Usage: antenna profile --id <platform>:<user_id> [--name Yi --emoji 🦦 --personal-description '...' --looking-for '...' --conversation-style '...'].']");
|
|
70
|
+
if (f.name || f["personal-description"] || f["looking-for"] || f["conversation-style"] || f.visible !== undefined || f.hide !== undefined) {
|
|
71
71
|
const visible = f.hide ? false : (f.visible !== undefined ? f.visible === 'true' || f.visible === true : undefined);
|
|
72
72
|
const payload = { device_id: id };
|
|
73
73
|
if (f.name) payload.display_name = f.name;
|
|
74
74
|
if (f.emoji) payload.emoji = f.emoji;
|
|
75
|
-
if (f
|
|
76
|
-
if (f
|
|
77
|
-
if (f
|
|
75
|
+
if (f["personal-description"] !== undefined) payload.line1 = f["personal-description"];
|
|
76
|
+
if (f["looking-for"] !== undefined) payload.line2 = f["looking-for"];
|
|
77
|
+
if (f["conversation-style"] !== undefined) payload.line3 = f["conversation-style"];
|
|
78
78
|
if (visible !== undefined) payload.visible = visible;
|
|
79
79
|
const data = await setProfile(payload);
|
|
80
80
|
console.log("✅ Profile saved");
|
|
@@ -88,7 +88,7 @@ export async function handleProfile(f) {
|
|
|
88
88
|
if (data.conversation_style) console.log(` Conversation: ${data.conversation_style}`);
|
|
89
89
|
if (data.interest_tags?.length) console.log(` Tags: ${data.interest_tags.join(", ")}`);
|
|
90
90
|
if (data.city) console.log(` 📍 ${data.city}`);
|
|
91
|
-
if (data.context) console.log(` More
|
|
91
|
+
if (data.context) console.log(` More information: ${data.context}`);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -337,9 +337,9 @@ export async function handleSetup(f) {
|
|
|
337
337
|
|
|
338
338
|
const name = await ask("Display name: ");
|
|
339
339
|
const emoji = (await ask("Emoji (default 👤): ")) || "👤";
|
|
340
|
-
const
|
|
341
|
-
const
|
|
342
|
-
const
|
|
340
|
+
const personalDesc = await ask("Personal description — who you are, what you do: ");
|
|
341
|
+
const lookingFor = await ask("Looking for — the kind of people you want to meet: ");
|
|
342
|
+
const convStyle = await ask("Conversation style — the type of conversations you want: ");
|
|
343
343
|
|
|
344
344
|
rl.close();
|
|
345
345
|
|
|
@@ -347,16 +347,16 @@ export async function handleSetup(f) {
|
|
|
347
347
|
device_id: id,
|
|
348
348
|
display_name: name || null,
|
|
349
349
|
emoji,
|
|
350
|
-
line1:
|
|
351
|
-
line2:
|
|
352
|
-
line3:
|
|
350
|
+
line1: personalDesc || null,
|
|
351
|
+
line2: lookingFor || null,
|
|
352
|
+
line3: convStyle || null,
|
|
353
353
|
});
|
|
354
354
|
|
|
355
355
|
console.log("\n✅ Profile saved!\n");
|
|
356
356
|
console.log(` ${emoji} ${name || "Anonymous"}`);
|
|
357
|
-
if (
|
|
358
|
-
if (
|
|
359
|
-
if (
|
|
357
|
+
if (personalDesc) console.log(` ${personalDesc}`);
|
|
358
|
+
if (lookingFor) console.log(` ${lookingFor}`);
|
|
359
|
+
if (convStyle) console.log(` ${convStyle}`);
|
|
360
360
|
console.log();
|
|
361
361
|
}
|
|
362
362
|
|
|
@@ -974,7 +974,7 @@ export function printHelp() {
|
|
|
974
974
|
Usage:
|
|
975
975
|
antenna scan --lat 39.99 --lng 116.48 [--radius 500] (max 1000) [--id <platform>:<user_id>]
|
|
976
976
|
antenna checkin --id <platform>:<user_id> --lat 39.99 --lng 116.48
|
|
977
|
-
antenna profile --id <platform>:<user_id> [--name Yi --emoji 🦦 --
|
|
977
|
+
antenna profile --id <platform>:<user_id> [--name Yi --emoji 🦦 --personal-description '...']
|
|
978
978
|
antenna accept --id <platform>:<user_id> --target <ref_or_device_id> [--contact 'WeChat: yi']
|
|
979
979
|
antenna pass --id <platform>:<user_id> --target <ref_or_device_id> (or --ref 1)
|
|
980
980
|
antenna matches --id <platform>:<user_id>
|
package/lib/core.js
CHANGED
|
@@ -188,7 +188,7 @@ export const PROFILE_FIELDS = {
|
|
|
188
188
|
personal_description: { label: "个人描述", description: "Who you are and what you do", maxLength: 220, required: true },
|
|
189
189
|
looking_for: { label: "想认识的人", description: "The kind of people you want to meet", maxLength: 140 },
|
|
190
190
|
conversation_style: { label: "想要的交流方式", description: "The type of conversations you want", maxLength: 160 },
|
|
191
|
-
|
|
191
|
+
more_information: { 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" },
|
|
194
194
|
links: { label: "社交链接", description: "Social links shown on the card footer (up to 3)", maxItems: 3 },
|
package/lib/mcp.js
CHANGED
|
@@ -114,14 +114,14 @@ export async function startMcpServer() {
|
|
|
114
114
|
personal_description: z.string().optional().describe("Personal description — who you are and what you do (max 220 chars)"),
|
|
115
115
|
looking_for: z.string().optional().describe("Looking for — the kind of people you want to meet (max 140 chars)"),
|
|
116
116
|
conversation_style: z.string().optional().describe("Conversation style — the type of conversations you want (max 160 chars)"),
|
|
117
|
-
|
|
117
|
+
more_information: z.string().optional().describe("More information — agent-generated rich context for better matching (not shown to others, max 1000 chars). Generate this FIRST, then derive personal_description, looking_for, and conversation_style 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')"),
|
|
120
120
|
links: z.array(z.string()).optional().describe("Social links shown on the card footer (up to 3)"),
|
|
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, personal_description, looking_for, conversation_style,
|
|
124
|
+
async ({ action, sender_id, channel, display_name, personal_description, looking_for, conversation_style, more_information, 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: personal_description, line2: looking_for, line3: conversation_style, 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: more_information, 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 });
|