antenna-fyi 1.3.9 โ†’ 1.3.11

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
@@ -67,15 +67,14 @@ export async function handleProfile(f) {
67
67
  if (!f.id) return console.error("Usage: antenna profile --id <platform>:<user_id> [--name Yi --emoji ๐Ÿฆฆ --line1 '...' --line2 '...' --line3 '...']");
68
68
  if (f.name || f.line1 || f.line2 || f.line3 || f.visible !== undefined || f.hide !== undefined) {
69
69
  const visible = f.hide ? false : (f.visible !== undefined ? f.visible === 'true' || f.visible === true : undefined);
70
- const data = await setProfile({
71
- device_id: f.id,
72
- display_name: f.name,
73
- emoji: f.emoji || "๐Ÿ‘ค",
74
- line1: f.line1,
75
- line2: f.line2,
76
- line3: f.line3,
77
- ...(visible !== undefined && { visible }),
78
- });
70
+ const payload = { device_id: f.id };
71
+ if (f.name) payload.display_name = f.name;
72
+ if (f.emoji) payload.emoji = f.emoji;
73
+ if (f.line1 !== undefined) payload.line1 = f.line1;
74
+ if (f.line2 !== undefined) payload.line2 = f.line2;
75
+ if (f.line3 !== undefined) payload.line3 = f.line3;
76
+ if (visible !== undefined) payload.visible = visible;
77
+ const data = await setProfile(payload);
79
78
  console.log("โœ… Profile saved");
80
79
  console.log(JSON.stringify(data, null, 2));
81
80
  } else {
package/lib/core.js CHANGED
@@ -181,6 +181,16 @@ export async function scan({ lat, lng, radius_m = 500, device_id, supabaseUrl, s
181
181
  };
182
182
  }
183
183
 
184
+ // โ”€โ”€โ”€ Profile field metadata (self-describing API) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
185
+
186
+ export const PROFILE_FIELDS = {
187
+ display_name: { label: "ๆ˜พ็คบๅ็งฐ", description: "How you want to be called" },
188
+ line1: { label: "ไธชไบบๆ่ฟฐ", description: "Who you are and what you do", maxLength: 220, required: true },
189
+ line2: { label: "ๆƒณ่ฎค่ฏ†็š„ไบบ", description: "The kind of people you want to meet", maxLength: 140 },
190
+ line3: { label: "ๆƒณ่ฆ็š„ไบคๆตๆ–นๅผ", description: "The type of conversations you want", maxLength: 160 },
191
+ matching_context: { label: "ๅŒน้…ไธŠไธ‹ๆ–‡", description: "Agent-generated rich context for better matching (not shown to others)", maxLength: 1000 },
192
+ };
193
+
184
194
  // โ”€โ”€โ”€ getProfile โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
185
195
 
186
196
  export async function getProfile({ device_id, supabaseUrl, supabaseKey }) {
@@ -195,7 +205,7 @@ export async function getProfile({ device_id, supabaseUrl, supabaseKey }) {
195
205
  export async function setProfile({
196
206
  device_id,
197
207
  display_name,
198
- emoji = "๐Ÿ‘ค",
208
+ emoji,
199
209
  line1,
200
210
  line2,
201
211
  line3,
@@ -208,7 +218,7 @@ export async function setProfile({
208
218
  const { data, error } = await sb.rpc("upsert_profile", {
209
219
  p_device_id: device_id,
210
220
  p_display_name: display_name || null,
211
- p_emoji: emoji,
221
+ p_emoji: emoji || null,
212
222
  p_line1: line1 || null,
213
223
  p_line2: line2 || null,
214
224
  p_line3: line3 || null,
package/lib/mcp.js CHANGED
@@ -25,6 +25,7 @@ import {
25
25
  addCohost,
26
26
  sendEventMessage,
27
27
  deriveDeviceId,
28
+ PROFILE_FIELDS,
28
29
  } from "./core.js";
29
30
 
30
31
  export async function startMcpServer() {
@@ -104,17 +105,17 @@ export async function startMcpServer() {
104
105
 
105
106
  server.tool(
106
107
  "antenna_profile",
107
- "Get or set the user's Antenna profile card.",
108
+ "Get or set the user's Antenna profile card. The profile has a display name and three descriptions: personal description, looking for, and conversation style.",
108
109
  {
109
110
  action: z.enum(["get", "set"]).describe("'get' to read, 'set' to write"),
110
111
  sender_id: z.string().describe("The sender's user ID"),
111
112
  channel: z.string().describe("Channel name"),
112
- display_name: z.string().optional(),
113
- emoji: z.string().optional(),
114
- line1: z.string().optional(),
115
- line2: z.string().optional(),
116
- line3: z.string().optional(),
117
- matching_context: z.string().optional().describe("Agent-generated rich context for better matching (not shown to others)"),
113
+ display_name: z.string().optional().describe("Display name"),
114
+ emoji: z.string().optional().describe("Profile emoji (stored but not displayed on card)"),
115
+ line1: z.string().optional().describe("Personal description โ€” who you are and what you do (max 220 chars)"),
116
+ line2: z.string().optional().describe("Looking for โ€” the kind of people you want to meet (max 140 chars)"),
117
+ line3: z.string().optional().describe("Conversation style โ€” the type of conversations you want (max 160 chars)"),
118
+ matching_context: z.string().optional().describe("Agent-generated rich context for embedding-based matching (not shown to others, max 1000 chars). Generate this FIRST, then derive the three descriptions from it."),
118
119
  visible: z.boolean().optional().default(true),
119
120
  },
120
121
  async ({ action, sender_id, channel, display_name, emoji, line1, line2, line3, matching_context, visible }) => {
@@ -122,7 +123,9 @@ export async function startMcpServer() {
122
123
  try {
123
124
  if (action === "get") {
124
125
  const data = await getProfile({ device_id: deviceId });
125
- const result = data ? { profile: data } : { profile: null, message: "่ฟ˜ๆฒกๆœ‰ๅ็‰‡๏ผŒๅธฎไฝ ๅˆ›ๅปบไธ€ไธช๏ผŸ" };
126
+ const result = data
127
+ ? { profile: data, fields: PROFILE_FIELDS }
128
+ : { profile: null, message: "่ฟ˜ๆฒกๆœ‰ๅ็‰‡ใ€‚่ทŸ็”จๆˆท่Š่Šไป–ไปฌๆ˜ฏ่ฐใ€ๅšไป€ไนˆใ€ๆƒณ่ฎค่ฏ†ไป€ไนˆไบบ๏ผŒ็„ถๅŽๅธฎไป–ไปฌๅˆ›ๅปบใ€‚", fields: PROFILE_FIELDS };
126
129
  return jsonResult(await withMatchNotifications(deviceId, result));
127
130
  }
128
131
  const data = await setProfile({ device_id: deviceId, display_name, emoji, line1, line2, line3, matching_context, visible });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antenna-fyi",
3
- "version": "1.3.9",
3
+ "version": "1.3.11",
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": {