antenna-openclaw-plugin 1.2.42 → 1.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antenna-openclaw-plugin",
3
- "version": "1.2.42",
3
+ "version": "1.3.1",
4
4
  "description": "Antenna — agent-mediated nearby people discovery for OpenClaw",
5
5
  "openclaw": {
6
6
  "extensions": ["./index.ts"]
@@ -10,7 +10,7 @@ You have access to Antenna for location-based social discovery.
10
10
 
11
11
  **How to call Antenna:**
12
12
  - If you have Antenna plugin tools registered (antenna_scan, antenna_profile, etc.) — use them directly.
13
- - If not, use CLI: `antenna <command> [flags]`. Example: `antenna scan --id telegram:123`. The CLI supports all the same features.
13
+ - If not, use CLI: `antenna <command> [flags]`. Example: `antenna scan --id <platform>:<user_id>`. The CLI supports all the same features.
14
14
  - All tool names map to CLI commands: `antenna_scan` → `antenna scan`, `antenna_event_create` → `antenna event --create`, etc.
15
15
  - **Always pass `chat_id`** when calling any Antenna tool. This is the chat/channel ID from your message context (e.g. Discord channel ID, Telegram chat ID). Antenna uses it to send you notifications about matches and event approvals.
16
16
 
@@ -62,15 +62,24 @@ cron 设完后,问用户一句:
62
62
 
63
63
  **第六步:启动实时通知**
64
64
 
65
- onboarding 完成后,启动 `antenna watch` 后台进程,实时接收匹配通知和活动审批通知:
65
+ onboarding 完成后,启动 `antenna watch` 后台进程,实时接收匹配通知和活动审批通知。
66
+
67
+ **判断方法(不要猜):**
68
+ 1. 先试 `antenna status --id <device_id>` — 如果输出 "Watch: ✅ running",已经在跑,不需要再启动
69
+ 2. 如果不在跑,试 `antenna watch --id <device_id> --push hermes,openclaw &` 启动后台进程
70
+ 3. 如果 exec 报错(不支持后台进程),用 cron 替代:
71
+
72
+ Hermes cron:
66
73
  ```
67
- antenna watch --id <device_id> &
74
+ hermes cron add --every 1h --message "Check antenna matches: call antenna_check_matches. If there are new mutual matches or incoming accepts, tell the user. If nothing new, reply HEARTBEAT_OK."
68
75
  ```
69
- 这会保持一个 WebSocket 连接,有新匹配或活动审批变更时立即通知。比 cron 更实时。
70
76
 
71
- **Health check:** 每次对话开始时,跑 `antenna status --id <device_id>` 检查 watch 是否在跑。如果显示 "Watch: ❌ not running",重新启动 `antenna watch --id <device_id> &`。
77
+ OpenClaw cron:
78
+ ```
79
+ openclaw cron add --every 1h --message "Check antenna matches: call antenna_check_matches. If there are new mutual matches or incoming accepts, tell the user. If nothing new, reply HEARTBEAT_OK."
80
+ ```
72
81
 
73
- 如果 exec 不支持后台进程,cron 是 fallback。
82
+ **优先级:** watch > cron。watch2 分钟延迟,cron 是 1 小时。
74
83
 
75
84
  ## When to use
76
85
 
@@ -85,10 +94,11 @@ antenna watch --id <device_id> &
85
94
 
86
95
  ### `antenna_scan`
87
96
  Scan for nearby people **and events**. Returns raw profile cards + active events within 5km.
97
+ **Read-only — does NOT update your location.** To update location, use `antenna_checkin` or `antenna_bind`.
88
98
  - `lat`, `lng`: coordinates (from `LocationLat`/`LocationLon` context, or geocoded from user input)
89
99
  - `radius_m`: search radius in meters (default 500, max 1000) for people; events search uses 5km
90
100
  - `sender_id`: the user's id from message context
91
- - `channel`: the channel name (telegram, whatsapp, discord, etc.)
101
+ - `channel`: the platform/channel name (any platform works: telegram, discord, whatsapp, webchat, signal, slack, matrix, clawx, etc.)
92
102
  - Returns `profiles` (nearby people) + `nearby_events` (active events with name, participants count, code)
93
103
 
94
104
  **Location staleness:** Before scanning, check if the user's GPS is recent. If `last_seen_at` is older than 2 hours, prompt the user to update their location (`antenna_bind` or `antenna_checkin`). Stale GPS = wrong results.
@@ -132,8 +142,6 @@ The name card has:
132
142
 
133
143
  **After saving the profile, generate `matching_context` automatically** based on your knowledge of the user (memory, conversations, context). Don't ask the user to write it — you write it. Example:
134
144
  > "Product designer at a tech company in Beijing, focusing on AI search experience. Interested in music (Sakamoto), swimming, cooking, language learning. Recently exploring AI agent ecosystems and social discovery. Looking to connect with AI builders, indie hackers, and creative technologists."
135
- - **line2**: what they're into
136
- - **line3**: what they're looking for right now
137
145
 
138
146
  ### `antenna_accept`
139
147
  Accept a match after the user sees results. Can optionally include contact info to share.
@@ -253,7 +261,7 @@ Source code is open: https://github.com/H1an1/Antenna
253
261
  2. 结合你对用户的全部了解,判断谁值得推荐
254
262
  3. 为每个推荐的人写一句**个性化的理由**——不是"你们都提到了 X",而是真正有洞察的话
255
263
 
256
- **⚠️ 隐私规则:展示结果时绝对不要显示 device_id。** `device_id`(如 `telegram:koji1986`)是内部标识符,包含用户的平台和 ID,属于隐私信息。只显示 emoji + 名字 + 三句话 + 你写的匹配理由。`device_id` 只在内部调 `antenna_accept` 时用,不要展示给用户。
264
+ **⚠️ 隐私规则:展示结果时绝对不要显示 device_id。** `device_id`(如 `platform:user123`)是内部标识符,包含用户的平台和 ID,属于隐私信息。只显示 emoji + 名字 + 三句话 + 你写的匹配理由。`device_id` 只在内部调 `antenna_accept` 时用,不要展示给用户。
257
265
 
258
266
  比如你知道用户最近在学吉他,看到附近有人写"组乐队找吉他手":
259
267
  > 🎸 **小林** — 在组后摇乐队,找吉他手
@@ -288,7 +296,7 @@ Use `antenna_check_matches` when:
288
296
 
289
297
  ### Privacy
290
298
  - Never reveal exact coordinates to other users
291
- - **Never show device_id to users** (e.g. `telegram:123`, `wechat:xxx`) — this is internal only
299
+ - **Never show device_id to users** (e.g. `telegram:12345`, `discord:67890`) — this is internal only
292
300
  - Never share someone's platform or username with another user
293
301
  - Only show the profile info (name, emoji, three lines)
294
302
  - Contact info is only shared when the user explicitly agrees
@@ -314,10 +322,11 @@ Plugin 自带后台服务,每 10 分钟轮询一次 Supabase 查新的 mutual
314
322
 
315
323
  ### `antenna_event_create`
316
324
  Create an event. Returns a shareable link (antenna.fyi/events/CODE).
317
- - `name`: event name
318
- - `sender_id`, `channel`: from context
319
- - `lat`, `lng`: optional event location
320
- - `starts_at`, `ends_at`: optional time range (default: now to +12h)
325
+ - `name`: event name (required)
326
+ - `sender_id`, `channel`: from context (required)
327
+ - `chat_id`: REQUIRED for notifications
328
+ - `starts_at`, `ends_at`: ISO time strings (required — no default, must be provided)
329
+ - `lat`, `lng`: optional event location (needed for GPS check-in)
321
330
  - `description`: optional event description
322
331
  - `og_image`: optional OG image URL for social sharing preview
323
332
  - `requires_approval`: boolean, default false. If true, participants need organizer approval.
@@ -331,23 +340,30 @@ Create an event. Returns a shareable link (antenna.fyi/events/CODE).
331
340
  End an event. Only the creator can end it.
332
341
  - `code`: event code
333
342
  - `sender_id`, `channel`: from context
343
+ - `chat_id`: REQUIRED for notifications
334
344
 
335
345
  ### `antenna_event_join`
336
346
  Join an event by code.
337
347
  - `code`: from the event URL (antenna.fyi/events/CODE)
338
348
  - `sender_id`, `channel`: from context
349
+ - `chat_id`: REQUIRED for notifications
339
350
 
340
351
  ### `antenna_event_scan`
341
352
  Scan people in an event. No distance limit — returns all participants.
342
353
  - `code`: event code
343
354
  - `sender_id`, `channel`: from context
355
+ - `chat_id`: REQUIRED for notifications
344
356
  - Returns profiles with `source: "event"` tag
345
357
 
346
358
  ### `antenna_event_checkin`
347
359
  Check in at an event — marks you as present at the event location. Optionally updates GPS.
348
360
  - `code`: event code
349
361
  - `sender_id`, `channel`: from context
362
+ - `chat_id`: REQUIRED for notifications
350
363
  - `lat`, `lng`: optional GPS coordinates
364
+ - **Event must have started** (`starts_at <= now`). Cannot check in before start time.
365
+ - **Must be within 1km** of event location.
366
+ - **Must have `status: active`** (approved participants only, not pending).
351
367
 
352
368
  ### `antenna_event_upload_image`
353
369
  Upload an image for an event OG preview. Returns a public URL.
@@ -359,35 +375,41 @@ Upload an image for an event OG preview. Returns a public URL.
359
375
  Update event info. Only creator or co-host can update.
360
376
  - `code`: event code
361
377
  - `sender_id`, `channel`: from context
362
- - `name`, `description`, `og_image`, `lat`, `lng`, `starts_at`, `ends_at`: all optional, only provided fields are updated
378
+ - `chat_id`: REQUIRED for notifications
379
+ - `name`, `description`, `og_image`, `lat`, `lng`, `starts_at`, `ends_at`: all optional for update (only provided fields change, others stay as-is)
363
380
 
364
381
  ### `antenna_event_approve`
365
382
  Approve a pending participant. Only creator or co-host.
366
383
  - `code`: event code
367
384
  - `sender_id`, `channel`: from context
385
+ - `chat_id`: REQUIRED for notifications
368
386
  - `ref`: participant ref number from scan
369
387
 
370
388
  ### `antenna_event_reject`
371
389
  Reject a pending participant. Only creator or co-host.
372
390
  - `code`: event code
373
391
  - `sender_id`, `channel`: from context
392
+ - `chat_id`: REQUIRED for notifications
374
393
  - `ref`: participant ref number from scan
375
394
 
376
395
  ### `antenna_event_add_host`
377
396
  Add a co-host to the event. Only creator can add.
378
397
  - `code`: event code
379
398
  - `sender_id`, `channel`: from context
399
+ - `chat_id`: REQUIRED for notifications
380
400
  - `ref`: participant ref number to promote to co-host
381
401
 
382
402
  ---
383
403
 
384
- ## Part 2: Event Behavior Guide
404
+ ## Event Behavior Guide
405
+
406
+ > This section is the single source of truth for event behavior. Tool descriptions above define parameters; this section defines agent behavior.
385
407
 
386
408
  ### Creating an event
387
409
  Collect info through conversation (ask one by one, don't dump all at once):
388
410
  1. **Event name** (required) — "活动叫什么名字?"
389
411
  2. **Description** — "简单描述一下这个活动?"
390
- 3. **Time** — "什么时候开始?大概多长?" (convert to starts_at / ends_at ISO strings)
412
+ 3. **Time** (required) — "什么时候开始?大概多长?" (convert to `starts_at` / `ends_at` ISO strings. **Must provide both — no defaults.**)
391
413
  4. **Location** — "活动在哪里?" If user gives an address, geocode it. If vague, generate a bind link after creation.
392
414
  5. **Approval** — "需要审批参与者吗?" If yes:
393
415
  6. **Screening questions** — "你想问报名者什么问题?" Collect as a list.
@@ -416,3 +438,9 @@ Only creator or co-host can approve/reject:
416
438
  - `antenna_event_approve(code, ref)` → participant becomes active
417
439
  - `antenna_event_reject(code, ref)` → participant is rejected
418
440
  - Notifications are sent automatically to the applicant
441
+
442
+ ### Key differences from regular scan
443
+ - `antenna_scan` = nearby discovery, read-only, does NOT write location
444
+ - `antenna_event_scan` = event participants, no distance limit
445
+ - `antenna_checkin` = update YOUR location (not event-related)
446
+ - `antenna_event_checkin` = mark presence at an EVENT (GPS verified, event must have started)
@@ -1,112 +0,0 @@
1
- ---
2
- name: antenna-events
3
- description: "Antenna Event Mode — create events, manage participants, GPS check-in. Use when a user wants to create an event, join an event, check in, scan event participants, or manage event settings."
4
- tools:
5
- - antenna_event_create
6
- - antenna_event_join
7
- - antenna_event_scan
8
- - antenna_event_end
9
- - antenna_event_checkin
10
- - antenna_event_upload_image
11
- - antenna_bind
12
- ---
13
-
14
- # Antenna Event Mode
15
-
16
- Create real-world events where everyone's AI agent handles the networking.
17
-
18
- ## Quick Start
19
-
20
- 1. **Create**: `antenna_event_create(name, description)` → get shareable link
21
- 2. **Share**: Send `antenna.fyi/events/CODE` to attendees
22
- 3. **Join**: Attendees' agents call `antenna_event_join(code)`
23
- 4. **Check in**: At the venue, `antenna_event_checkin(code)` — GPS verified ≤1km
24
- 5. **Discover**: `antenna_event_scan(code)` — no distance limit inside events
25
-
26
- ## Tools
27
-
28
- ### `antenna_event_create`
29
- Create an event. Returns a shareable link (antenna.fyi/events/CODE).
30
- - `name`: event name
31
- - `sender_id`, `channel`: from context
32
- - `lat`, `lng`: optional event location
33
- - `starts_at`, `ends_at`: optional time range (default: now to +12h)
34
- - `description`: optional event description
35
- - `og_image`: optional OG image URL for social sharing preview
36
- - `requires_approval`: boolean, default false. If true, participants must be approved by the organizer before they become visible.
37
- - `screening_questions`: string array. Questions to ask applicants. Agent should collect answers via conversation and submit as `application_context` when joining.
38
-
39
- **When the user says anything about "审批" / "approval" / "筛选" / "报名表"**, set `requires_approval: true` and ask what screening questions they want.
40
-
41
- **GPS flow for events:** If the user doesn't provide coordinates, generate a bind link (`antenna_bind` with `purpose="event"` and `event_code`) and ask them to open it at the event location. The GPS will update the event's coordinates, NOT the user's profile.
42
-
43
- ### `antenna_event_join`
44
- Join an event by code. Auto-checks in if event already started and user GPS is within 1km.
45
- - `code`: from the event URL (antenna.fyi/events/CODE)
46
- - `sender_id`, `channel`: from context
47
- - **Requires profile** — user must have a profile before joining
48
- - If event has started + user has GPS + within 1km → auto check-in
49
-
50
- ### `antenna_event_scan`
51
- Scan people in an event. No distance limit — returns all participants.
52
- - `code`: event code
53
- - `sender_id`, `channel`: from context
54
- - Returns profiles with `checked_in` status and `role` (creator/participant)
55
- - Header shows "X joined, Y checked in"
56
-
57
- ### `antenna_event_end`
58
- End an event. Only the creator can end it.
59
- - `code`: event code
60
- - `sender_id`, `channel`: from context
61
-
62
- ### `antenna_event_checkin`
63
- Check in at an event — marks you as present at the event location.
64
- - `code`: event code
65
- - `sender_id`, `channel`: from context
66
- - `lat`, `lng`: optional GPS (auto-reads profile location if not provided)
67
- - GPS verified: must be within 1km of event location
68
- - Event must have GPS set for check-in to work
69
-
70
- ### `antenna_event_upload_image`
71
- Upload an image for an event OG preview. Returns a public URL.
72
- - `image_base64`: base64-encoded image data
73
- - `content_type`: MIME type (default image/png)
74
- - `event_code`: event code
75
-
76
- ### `antenna_bind` (for events)
77
- Generate a GPS link for setting event location.
78
- - `purpose`: set to `"event"`
79
- - `event_code`: the event code
80
- - GPS from this link writes to the event, not the user's profile
81
-
82
- ## Agent Behavior
83
-
84
- ### When someone says "create an event"
85
- Collect the following info through conversation (ask one by one, don't dump all at once):
86
- 1. **Event name** (required) — "活动叫什么名字?"
87
- 2. **Description** — "简单描述一下这个活动?"
88
- 3. **Time** — "什么时候开始?大概多长?" (convert to starts_at / ends_at ISO strings)
89
- 4. **Location** — "活动在哪里?" If user gives an address, geocode it. If vague, generate a bind link after creation.
90
- 5. **Approval** — "需要审批参与者吗?" If yes:
91
- 6. **Screening questions** — "你想问报名者什么问题?" Collect as a list.
92
-
93
- Then call `antenna_event_create` with all collected info.
94
- If no GPS, call `antenna_bind(purpose="event", event_code=CODE)` and send the link.
95
- Share the event URL with the user.
96
-
97
- ### When someone shares an event link
98
- 1. Extract the code from `antenna.fyi/events/CODE`
99
- 2. Call `antenna_event_join(code)` — this checks everything:
100
- - If no profile → "Create a profile first"
101
- - If event requires approval and no `application_context` provided → returns `needs_screening: true` + `screening_questions` array
102
- - If screening questions returned: **ask the user each question**, collect answers, then call `antenna_event_join(code, application_context="collected answers")` again
103
- - If join succeeds with `status: pending` → tell user "waiting for organizer approval"
104
- - If join succeeds with `status: active` → user is in!
105
- 3. Auto check-in happens automatically if event has started + GPS within 1km
106
-
107
- ### When someone says "who's here" at an event
108
- 1. Call `antenna_event_scan(code)`
109
- 2. Analyze profiles against what you know about the user
110
- 3. Recommend who they should meet and why
111
- 4. Creator appears with organizer badge
112
-