antenna-openclaw-plugin 1.2.8 → 1.2.10

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/index.ts CHANGED
@@ -519,12 +519,14 @@ export default function register(api: any) {
519
519
  api.registerTool({
520
520
  name: "antenna_bind",
521
521
  description:
522
- "Generate a GPS binding link. Send this URL to the user so they can share their phone's location via the web browser at antenna.fyi.",
522
+ "Generate a GPS binding link. Use purpose='event' + event_code when setting an event's location.",
523
523
  parameters: {
524
524
  type: "object",
525
525
  properties: {
526
526
  sender_id: { type: "string", description: "The sender's user ID" },
527
527
  channel: { type: "string", description: "The channel name" },
528
+ purpose: { type: "string", description: "'profile' (default) or 'event'" },
529
+ event_code: { type: "string", description: "Event code (required when purpose=event)" },
528
530
  },
529
531
  required: ["sender_id", "channel"],
530
532
  },
@@ -533,7 +535,11 @@ export default function register(api: any) {
533
535
  const supabase = getSupabase(cfg);
534
536
  const deviceId = deriveDeviceId(params.sender_id, params.channel);
535
537
 
536
- const { data, error } = await supabase.rpc("create_bind_token", { p_device_id: deviceId });
538
+ const { data, error } = await supabase.rpc("create_bind_token", {
539
+ p_device_id: deviceId,
540
+ p_purpose: params.purpose || "profile",
541
+ p_event_code: params.event_code || null,
542
+ });
537
543
  if (error) return ok({ error: error.message });
538
544
 
539
545
  const token = data?.token;
@@ -541,7 +547,10 @@ export default function register(api: any) {
541
547
  return ok({
542
548
  token,
543
549
  url: `${baseUrl}/locate?token=${token}`,
544
- message: "发送这个链接给用户,在手机浏览器打开即可共享位置。",
550
+ purpose: params.purpose || "profile",
551
+ message: params.purpose === "event"
552
+ ? "发送这个链接给活动创建者,在活动地点打开即可设定活动位置。"
553
+ : "发送这个链接给用户,在手机浏览器打开即可共享位置。",
545
554
  });
546
555
  },
547
556
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antenna-openclaw-plugin",
3
- "version": "1.2.8",
3
+ "version": "1.2.10",
4
4
  "description": "Antenna — agent-mediated nearby people discovery for OpenClaw",
5
5
  "openclaw": {
6
6
  "extensions": ["./index.ts"]
@@ -112,9 +112,12 @@ Check for mutual matches and contact info updates.
112
112
  ### `antenna_bind`
113
113
  Generate a GPS binding link. **You MUST call this immediately after saving a profile.** Do not skip this step.
114
114
  - `sender_id`, `channel`: from context
115
+ - `purpose`: optional — `'profile'` (default) updates user location; `'event'` sets event location
116
+ - `event_code`: required when `purpose='event'`
115
117
  - Returns a URL like `https://www.antenna.fyi/locate?token=xxx`
116
118
  - Send this link to the user — they open it on their phone, allow GPS, and their location is automatically shared
117
119
  - **MANDATORY after profile save. Do not wait for user to ask.**
120
+ - **For events:** When a creator needs to set event location, call with `purpose='event'` and `event_code`. The GPS will update the event's coordinates, NOT the user's profile.
118
121
 
119
122
  ### `antenna_discover`
120
123
  Get today's global recommendation — the person most similar to you worldwide. 1 per day, no repeats.
@@ -282,7 +285,7 @@ Create an event. Returns a shareable link (antenna.fyi/e/CODE).
282
285
  - `description`: optional event description
283
286
  - `og_image`: optional OG image URL for social sharing preview
284
287
 
285
- **GPS flow for events:** If the user doesn't provide coordinates, generate a bind link (`antenna_bind`) and ask them to open it at the event location. Once GPS comes in, use those coordinates for `lat`/`lng`. Don't use profile location the user may create an event at a different place.
288
+ **GPS flow for events:** If the user doesn't provide coordinates, generate a bind link (`antenna_bind`) and ask them to open it at the event location. Once GPS comes in, use those coordinates for the event's `lat`/`lng` do NOT treat this as the user's personal location. The bind link GPS for event creation goes to the event, not the user's profile. Only use `antenna_checkin` when the user wants to update their own location.
286
289
 
287
290
  ### `antenna_event_end`
288
291
  End an event. Only the creator can end it.