antenna-fyi 1.3.29 → 1.3.31
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 +11 -1
- package/lib/core.js +15 -2
- package/package.json +2 -2
- package/skill/SKILL.md +7 -7
package/lib/cli.js
CHANGED
|
@@ -67,14 +67,18 @@ export async function handleScan(f) {
|
|
|
67
67
|
export async function handleProfile(f) {
|
|
68
68
|
const id = resolveId(f);
|
|
69
69
|
if (!id) return console.error("Usage: antenna profile --id <platform>:<user_id> [--name Yi --personal-description '...' --looking-for '...' --conversation-style '...' --hide --visible true]");
|
|
70
|
-
if (f.name || f["personal-description"] || f["looking-for"] || f["conversation-style"] || f["more-information"] || f.visible !== undefined || f.hide !== undefined) {
|
|
70
|
+
if (f.name || f["personal-description"] !== undefined || f.line1 !== undefined || f["looking-for"] !== undefined || f.line2 !== undefined || f["conversation-style"] !== undefined || f.line3 !== undefined || f["more-information"] !== undefined || f.contact !== undefined || 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["personal-description"] !== undefined) payload.line1 = f["personal-description"];
|
|
75
|
+
else if (f.line1 !== undefined) payload.line1 = f.line1;
|
|
75
76
|
if (f["looking-for"] !== undefined) payload.line2 = f["looking-for"];
|
|
77
|
+
else if (f.line2 !== undefined) payload.line2 = f.line2;
|
|
76
78
|
if (f["conversation-style"] !== undefined) payload.line3 = f["conversation-style"];
|
|
79
|
+
else if (f.line3 !== undefined) payload.line3 = f.line3;
|
|
77
80
|
if (f["more-information"] !== undefined) payload.matching_context = f["more-information"];
|
|
81
|
+
if (f.contact !== undefined) payload.contact_info = f.contact;
|
|
78
82
|
if (visible !== undefined) payload.visible = visible;
|
|
79
83
|
const data = await setProfile(payload);
|
|
80
84
|
console.log("✅ Profile saved");
|
|
@@ -86,8 +90,14 @@ export async function handleProfile(f) {
|
|
|
86
90
|
if (data.personal_description) console.log(` ${data.personal_description}`);
|
|
87
91
|
if (data.looking_for) console.log(` Looking for: ${data.looking_for}`);
|
|
88
92
|
if (data.conversation_style) console.log(` Conversation: ${data.conversation_style}`);
|
|
93
|
+
if (data.line1 && data.line1 !== data.personal_description) console.log(` Line 1: ${data.line1}`);
|
|
94
|
+
if (data.line2 && data.line2 !== data.looking_for) console.log(` Line 2: ${data.line2}`);
|
|
95
|
+
if (data.line3 && data.line3 !== data.conversation_style) console.log(` Line 3: ${data.line3}`);
|
|
89
96
|
if (data.interest_tags?.length) console.log(` Tags: ${data.interest_tags.join(", ")}`);
|
|
90
97
|
if (data.city) console.log(` 📍 ${data.city}`);
|
|
98
|
+
if (data.contact_info) console.log(` 📇 Contact: ${data.contact_info}`);
|
|
99
|
+
if (data.profile_slug) console.log(` 🔗 https://www.antenna.fyi/p/${data.profile_slug}`);
|
|
100
|
+
console.log(` Status: ${data.visible === false ? "hidden" : "visible"}`);
|
|
91
101
|
if (data.context) console.log(` More information: ${data.context}`);
|
|
92
102
|
}
|
|
93
103
|
}
|
package/lib/core.js
CHANGED
|
@@ -250,6 +250,7 @@ export async function setProfile({
|
|
|
250
250
|
line2,
|
|
251
251
|
line3,
|
|
252
252
|
matching_context,
|
|
253
|
+
contact_info,
|
|
253
254
|
visible = true,
|
|
254
255
|
interest_tags,
|
|
255
256
|
city,
|
|
@@ -301,6 +302,7 @@ export async function setProfile({
|
|
|
301
302
|
p_line3: line3 || null,
|
|
302
303
|
p_visible: visible,
|
|
303
304
|
p_matching_context: contextJson || null,
|
|
305
|
+
p_contact_info: contact_info || null,
|
|
304
306
|
});
|
|
305
307
|
if (error) throw new Error(error.message);
|
|
306
308
|
|
|
@@ -326,10 +328,20 @@ export async function setProfile({
|
|
|
326
328
|
let publicUrl = null;
|
|
327
329
|
let bindUrl = null;
|
|
328
330
|
let archetypeResult = null;
|
|
331
|
+
let profileSlug = null;
|
|
329
332
|
try {
|
|
330
333
|
const profile = await getProfile({ device_id, supabaseUrl, supabaseKey });
|
|
331
|
-
|
|
332
|
-
|
|
334
|
+
profileSlug = profile?.profile_slug || null;
|
|
335
|
+
if (!profileSlug && display_name) {
|
|
336
|
+
const slug = display_name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").substring(0, 30);
|
|
337
|
+
if (slug) {
|
|
338
|
+
const { error: slugError } = await sb.from("profiles").update({ profile_slug: slug }).eq("device_id", device_id);
|
|
339
|
+
if (slugError) throw new Error(slugError.message);
|
|
340
|
+
profileSlug = slug;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
if (profileSlug) {
|
|
344
|
+
publicUrl = `https://www.antenna.fyi/p/${profileSlug}`;
|
|
333
345
|
}
|
|
334
346
|
} catch {}
|
|
335
347
|
|
|
@@ -386,6 +398,7 @@ export async function setProfile({
|
|
|
386
398
|
|
|
387
399
|
return {
|
|
388
400
|
...data,
|
|
401
|
+
profile_slug: profileSlug || data?.profile_slug || null,
|
|
389
402
|
public_url: publicUrl,
|
|
390
403
|
gps_bind_url: bindUrl,
|
|
391
404
|
archetype: archetypeResult || null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antenna-fyi",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.31",
|
|
4
4
|
"description": "Antenna \u2014 nearby people discovery. CLI + MCP server + OpenClaw skill & plugin, all in one package.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
27
27
|
"zod": "^3.24.4"
|
|
28
28
|
}
|
|
29
|
-
}
|
|
29
|
+
}
|
package/skill/SKILL.md
CHANGED
|
@@ -43,7 +43,7 @@ Plugin 安装后,agent **主动**开始引导,不要等用户问。
|
|
|
43
43
|
|
|
44
44
|
跟用户聊几句,了解他们是谁、做什么、想认识什么人。然后 agent 自己生成:
|
|
45
45
|
- more_information(~200 字,给 agent 匹配用的私密上下文,不展示给别人)
|
|
46
|
-
- 从中提炼
|
|
46
|
+
- 从中提炼 personal_description/looking_for/conversation_style + display_name
|
|
47
47
|
|
|
48
48
|
展示预览给用户确认:
|
|
49
49
|
> 你的名片:
|
|
@@ -146,14 +146,14 @@ openclaw cron add --every 1h --message "Check antenna matches: call antenna_chec
|
|
|
146
146
|
查看或更新用户名片。
|
|
147
147
|
- `action`:"get" 或 "set"
|
|
148
148
|
- `sender_id`, `channel`, `chat_id`
|
|
149
|
-
- "set" 时传:`display_name`, `
|
|
149
|
+
- "set" 时传:`display_name`, `personal_description`, `looking_for`, `conversation_style`, `visible`, `matching_context`
|
|
150
150
|
|
|
151
151
|
名片内容:
|
|
152
152
|
- **display_name**:显示名称
|
|
153
|
-
- **
|
|
154
|
-
- **
|
|
155
|
-
- **
|
|
156
|
-
- **matching_context**(more_information,不展示给别人):agent 基于对用户的了解生成的详细描述,~200 字。**这是匹配的核心数据源。**
|
|
153
|
+
- **personal_description**:个人描述(谁 / 做什么)
|
|
154
|
+
- **looking_for**:想认识的人
|
|
155
|
+
- **conversation_style**:想要的交流方式
|
|
156
|
+
- **matching_context**(more_information,不展示给别人):agent 基于对用户的了解生成的详细描述,~200 字。**这是匹配的核心数据源。** personal_description/looking_for/conversation_style 从它提炼出来,不是反过来。
|
|
157
157
|
|
|
158
158
|
### `antenna_accept`
|
|
159
159
|
接受一个匹配。**不需要先 scan**--任何发现路径都可以触发 accept。
|
|
@@ -229,7 +229,7 @@ openclaw cron add --every 1h --message "Check antenna matches: call antenna_chec
|
|
|
229
229
|
- **每次只问一个问题。**
|
|
230
230
|
- **用户说的原话尽量保留。** 帮缩短但让用户确认。
|
|
231
231
|
- **不要在名片里写联系方式。** 联系方式在 accept 时分享。
|
|
232
|
-
- **
|
|
232
|
+
- **personal_description 必填。**
|
|
233
233
|
- **确认后才存。**
|
|
234
234
|
|
|
235
235
|
### Showing results - 你来判断
|