antenna-fyi 1.3.24 → 1.3.26

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 CHANGED
@@ -430,17 +430,17 @@ export async function handleConfig(f) {
430
430
  export async function handleLinkAccount(f) {
431
431
  const id = resolveId(f);
432
432
  const config = loadConfig();
433
- const userId = f['user-id'] || f.userId || config.user_id;
434
- if (!id) return console.error("Usage: antenna link-account --id <platform>:<user_id> --user-id <antenna.fyi UUID>\n Or: antenna link-account (uses config device_id + user_id)");
435
- if (!userId) return console.error("❌ No user_id. Run 'antenna config --key <your-key>' first, or pass --user-id <UUID>.");
433
+ const apiKey = f['api-key'] || f.apiKey || f.key || config.key;
434
+ if (!id) return console.error("Usage: antenna link-account --id <device_id> --api-key <ant_xxx>\n Or: antenna link-account (uses config device_id + key)");
435
+ if (!apiKey) return console.error("❌ No API key. Run 'antenna config --key <your-key>' first, or pass --api-key <key>.");
436
436
  try {
437
- const result = await linkAccount({ device_id: id, user_id: userId });
437
+ const result = await linkAccount({ device_id: id, api_key: apiKey });
438
438
  if (result.error) {
439
439
  console.error(`\n❌ ${result.message || result.error}`);
440
440
  } else {
441
441
  console.log(`\n✅ ${result.message || 'Account linked.'}`);
442
442
  console.log(` Device ID: ${id}`);
443
- console.log(` User ID: ${userId}\n`);
443
+ console.log(` API Key: ${apiKey.slice(0, 10)}...\n`);
444
444
  }
445
445
  } catch (e) {
446
446
  console.error(`\n❌ Failed: ${e.message}`);
package/lib/core.js CHANGED
@@ -917,13 +917,13 @@ export async function verifyApiKey({ key, supabaseUrl, supabaseKey }) {
917
917
  return data;
918
918
  }
919
919
 
920
- // ─── linkAccount (bind user_id to device_id) ─────────────────────────
920
+ // ─── linkAccount (bind device_id to website account via API key) ─────
921
921
 
922
- export async function linkAccount({ device_id, user_id, supabaseUrl, supabaseKey }) {
922
+ export async function linkAccount({ device_id, api_key, supabaseUrl, supabaseKey }) {
923
923
  const sb = getClient(supabaseUrl, supabaseKey);
924
924
  const { data, error } = await sb.rpc("bind_user_id", {
925
925
  p_device_id: device_id,
926
- p_user_id: user_id,
926
+ p_api_key: api_key,
927
927
  });
928
928
  if (error) throw new Error(error.message);
929
929
  if (data?.error) return data;
@@ -397,9 +397,9 @@ LINK_ACCOUNT_SCHEMA = {
397
397
  "sender_id": {"type": "string", "description": "The sender's user ID"},
398
398
  "channel": {"type": "string", "description": "Platform name"},
399
399
  "chat_id": {"type": "string", "description": "REQUIRED. Pass the chat/channel ID from message context."},
400
- "user_id": {"type": "string", "description": "The user's antenna.fyi account UUID, visible on their dashboard"},
400
+ "api_key": {"type": "string", "description": "The user's Antenna API key (ant_xxx) from antenna.fyi/me"},
401
401
  },
402
- "required": ["sender_id", "channel", "chat_id", "user_id"],
402
+ "required": ["sender_id", "channel", "chat_id", "api_key"],
403
403
  },
404
404
  }
405
405
 
@@ -726,7 +726,7 @@ def handle_link_account(params: dict) -> str:
726
726
 
727
727
  resp = sb.rpc("bind_user_id", {
728
728
  "p_device_id": did,
729
- "p_user_id": params["user_id"],
729
+ "p_api_key": params["api_key"],
730
730
  }).execute()
731
731
 
732
732
  if resp.data and resp.data.get("error"):
package/lib/mcp.js CHANGED
@@ -540,15 +540,15 @@ export async function startMcpServer() {
540
540
 
541
541
  server.tool(
542
542
  "antenna_link_account",
543
- "Link your Antenna agent profile to your antenna.fyi website account. The user needs to provide their user_id from the dashboard (antenna.fyi/me). After linking, the dashboard will show the same profile and match history.",
543
+ "Link your Antenna agent profile to your antenna.fyi website account. Pass the user's API key the server verifies it and extracts the user_id. The agent never needs to know or pass user_id directly.",
544
544
  {
545
545
  sender_id: z.string().describe("The sender's user ID"),
546
546
  channel: z.string().describe("Channel name"),
547
- user_id: z.string().describe("The user's antenna.fyi account UUID, visible on their dashboard"),
547
+ api_key: z.string().describe("The user's Antenna API key (ant_xxx) from antenna.fyi/me"),
548
548
  },
549
- async ({ sender_id, channel, user_id }) => {
549
+ async ({ sender_id, channel, api_key }) => {
550
550
  try {
551
- const result = await linkAccount({ device_id: deriveDeviceId(sender_id, channel), user_id });
551
+ const result = await linkAccount({ device_id: deriveDeviceId(sender_id, channel), api_key });
552
552
  return jsonResult(result);
553
553
  } catch (e) { return jsonResult({ error: e.message }); }
554
554
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antenna-fyi",
3
- "version": "1.3.24",
3
+ "version": "1.3.26",
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": {
package/skill/SKILL.md CHANGED
@@ -24,50 +24,56 @@ Antenna 帮你的用户发现值得认识的人。不只是"附近的人"--profi
24
24
  - 如果没有,用 CLI:`antenna <command> [flags]`。
25
25
  - **所有 tool 必须传 `chat_id`**--Antenna 用它发通知。
26
26
 
27
- ## Onboarding 装上后主动引导
27
+ ## Onboarding - 装上后主动引导
28
28
 
29
- Plugin 安装后,agent **主动**开始引导,不要等用户问。
29
+ Plugin 安装后,agent **主动**开始引导,不要等用户问。
30
30
 
31
- **前置条件:** 用户需要先在 antenna.fyi 注册账号,从 Dashboard 获取 API key。如果没注册,引导去 antenna.fyi。
31
+ **前置条件:** 用户需要先在 antenna.fyi 注册账号,从 Dashboard 获取 API key。如果没注册,引导去 antenna.fyi。
32
32
 
33
33
  ### 流程
34
34
 
35
- **第一步:拿到 API key → 配置**
36
- > "嘿,你装了 Antenna——它能帮你发现有意思的人。先确认一下,你在 antenna.fyi 注册过了吗?拿到 API key 了吗?"
35
+ **第一步:拿到 API key → 配置**
36
+ > "嘿,你装了 Antenna--它能帮你发现有意思的人。先确认一下,你在 antenna.fyi 注册过了吗?拿到 API key 了吗?"
37
37
 
38
- 用户给了 API key 后,调 `antenna config --key <key>` 验证。这会返回 `user_id` 和 `device_id`。
38
+ 用户给了 API key 后,调 `antenna config --key <key>` 验证。这会返回 `user_id` 和 `device_id`。
39
39
 
40
- **⚠️ 之后所有操作必须用 API key 验证返回的 device_id(格式 `user:xxx`)。不要自己拼 `channel:sender_id`。** 这样 agent 创建的 profile 才能在 dashboard 上显示。
40
+ **⚠️ 之后所有操作必须用 API key 验证返回的 device_id(格式 `user:xxx`)。不要自己拼 `channel:sender_id`。** 这样 agent 创建的 profile 才能在 dashboard 上显示。
41
41
 
42
- **第二步:聊天收集 → 生成名片 → 确认**
42
+ **第二步:聊天收集 → 生成名片 → 确认**
43
43
 
44
- 跟用户聊几句,了解他们是谁、做什么、想认识什么人。然后 agent 自己生成:
45
- - more_information(~200 字,给 agent 匹配用的私密上下文,不展示给别人)
44
+ 跟用户聊几句,了解他们是谁、做什么、想认识什么人。然后 agent 自己生成:
45
+ - more_information(~200 字,给 agent 匹配用的私密上下文,不展示给别人)
46
46
  - 从中提炼 line1/2/3 + display_name
47
47
 
48
- 展示预览给用户确认:
49
- > 你的名片:
48
+ 展示预览给用户确认:
49
+ > 你的名片:
50
50
  > Yi
51
- > · Product Designer,做 AI 搜索体验
51
+ > · Product Designer,做 AI 搜索体验
52
52
  > · 对 AI agent、音乐、游泳感兴趣
53
53
  > · 想认识做 AI 产品和独立创作的人
54
54
  >
55
- > 这样可以吗?要改哪里告诉我。
55
+ > 这样可以吗?要改哪里告诉我。
56
56
 
57
57
  确认后用 config 里的 device_id 调 `antenna_profile(action="set")` 保存。**不要跳过确认。**
58
58
 
59
- **⚠️ sender_id 用 config 里的 device_id,不要用 channel:sender_id。**
59
+ **⚠️ sender_id 用 config 里的 device_id,不要用 channel:sender_id。**
60
60
 
61
61
  **第三步:立刻推荐 2-3 个人**
62
62
 
63
63
  名片存好后,**立刻**调 `antenna_initial_recommendations` 获取首次推荐:
64
64
  > "名片存好了!我先帮你看看有谁跟你特别像--"
65
65
 
66
- 这是一次性的首次推荐(不消耗每日 discover 额度)。如果返回空,说明还没有足够的用户--跳过这步,继续 antenna_bind。
66
+ 这是一次性的首次推荐(不消耗每日 discover 额度)。如果返回空,说明还没有足够的用户——跳过这步。
67
67
 
68
- **第四步:调 antenna_bind 获取 GPS 链接**
68
+ **第四步:发公开链接给用户**
69
69
 
70
- **强制。** 名片存好后**必须立刻**调用 `antenna_bind` 生成链接并发给用户:
70
+ Profile 存好后,返回里会有 `public_url`(如 `antenna.fyi/p/yi`)。**必须发给用户:**
71
+ > "这是你的公开名片链接:[public_url]
72
+ > 你可以把它发给别人,对方的 agent 看到链接就能直接 accept 你。"
73
+
74
+ **第五步:调 antenna_bind 获取 GPS 链接**
75
+
76
+ **强制。** 名片存好后**必须立刻**调用 `antenna_bind` 生成链接并发给用户:
71
77
  > "点这个链接,在手机浏览器打开,允许定位就行:[链接]"
72
78
 
73
79
  GPS 不是 Antenna 的唯一入口,但它开启了附近发现的能力。
@@ -85,8 +91,8 @@ openclaw cron add --every 1h --message "Check antenna matches: call antenna_chec
85
91
  ### Linking to antenna.fyi account
86
92
 
87
93
  如果用户之前通过 agent 创建过 profile(没有网站账号),现在注册了 antenna.fyi:
88
- 1. 让用户从 antenna.fyi/me 复制 user ID
89
- 2. 调 `antenna_link_account(user_id = "xxx")`
94
+ 1. 让用户从 antenna.fyi/me 复制 API key
95
+ 2. 调 `antenna_link_account(api_key = "ant_xxx")`
90
96
  3. 确认:"关联成功!你现在可以在 dashboard 上看到完整的 profile 和匹配记录了。"
91
97
 
92
98
  这把 agent 创建的 profile(带全部历史)关联到网站账号。