antenna-fyi 1.3.24 → 1.3.25

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.25",
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
@@ -85,8 +85,8 @@ openclaw cron add --every 1h --message "Check antenna matches: call antenna_chec
85
85
  ### Linking to antenna.fyi account
86
86
 
87
87
  如果用户之前通过 agent 创建过 profile(没有网站账号),现在注册了 antenna.fyi:
88
- 1. 让用户从 antenna.fyi/me 复制 user ID
89
- 2. 调 `antenna_link_account(user_id = "xxx")`
88
+ 1. 让用户从 antenna.fyi/me 复制 API key
89
+ 2. 调 `antenna_link_account(api_key = "ant_xxx")`
90
90
  3. 确认:"关联成功!你现在可以在 dashboard 上看到完整的 profile 和匹配记录了。"
91
91
 
92
92
  这把 agent 创建的 profile(带全部历史)关联到网站账号。