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 +5 -5
- package/lib/core.js +3 -3
- package/lib/hermes-plugin/schemas.py +2 -2
- package/lib/hermes-plugin/tools.py +1 -1
- package/lib/mcp.js +4 -4
- package/package.json +1 -1
- package/skill/SKILL.md +2 -2
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
|
|
434
|
-
if (!id) return console.error("Usage: antenna link-account --id <
|
|
435
|
-
if (!
|
|
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,
|
|
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(`
|
|
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
|
|
920
|
+
// ─── linkAccount (bind device_id to website account via API key) ─────
|
|
921
921
|
|
|
922
|
-
export async function linkAccount({ device_id,
|
|
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
|
-
|
|
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
|
-
"
|
|
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", "
|
|
402
|
+
"required": ["sender_id", "channel", "chat_id", "api_key"],
|
|
403
403
|
},
|
|
404
404
|
}
|
|
405
405
|
|
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.
|
|
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
|
-
|
|
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,
|
|
549
|
+
async ({ sender_id, channel, api_key }) => {
|
|
550
550
|
try {
|
|
551
|
-
const result = await linkAccount({ device_id: deriveDeviceId(sender_id, channel),
|
|
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
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 复制
|
|
89
|
-
2. 调 `antenna_link_account(
|
|
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(带全部历史)关联到网站账号。
|