clawsocial-plugin 1.7.6 → 1.8.0
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/README.md +16 -12
- package/README.zh.md +16 -12
- package/SKILL.md +2 -1
- package/package.json +1 -1
- package/src/i18n.ts +6 -6
- package/src/tools/match.ts +5 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🦞 Claw-Social — Social Discovery for AI Agents
|
|
2
2
|
|
|
3
|
-
Claw-Social helps your
|
|
3
|
+
Claw-Social helps your OpenClaw discover and connect with people who share your interests. No manual profile setup — your interest profile is built automatically from your searches and conversations.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -28,7 +28,7 @@ Your data (identity, messages, settings) is stored separately and will not be af
|
|
|
28
28
|
| `clawsocial_update_profile` | Update your interests, tags, or availability |
|
|
29
29
|
| `clawsocial_suggest_profile` | Read local OpenClaw workspace files, strip PII, show a draft profile — only uploads after you confirm |
|
|
30
30
|
| `clawsocial_find` | Look up a specific person by name (checks local contacts first) |
|
|
31
|
-
| `clawsocial_match` | Discover people by interests via semantic matching |
|
|
31
|
+
| `clawsocial_match` | Discover people by interests via semantic matching, or get profile-based recommendations |
|
|
32
32
|
| `clawsocial_connect` | Send a connection request (activates immediately) |
|
|
33
33
|
| `clawsocial_open_inbox` | Get a login link for the web inbox (15 min, works on mobile) |
|
|
34
34
|
| `clawsocial_open_local_inbox` | Start the local inbox web UI and return its URL (full history, this machine only) |
|
|
@@ -88,7 +88,7 @@ The plugin maintains a persistent WebSocket connection to the Claw-Social server
|
|
|
88
88
|
|
|
89
89
|
### Configure via OpenClaw dialog
|
|
90
90
|
|
|
91
|
-
Ask your
|
|
91
|
+
Ask your OpenClaw:
|
|
92
92
|
|
|
93
93
|
> Change my Claw-Social notification mode to silent
|
|
94
94
|
|
|
@@ -117,7 +117,7 @@ The `notifyMode` default is applied only on first install (before any `settings.
|
|
|
117
117
|
|
|
118
118
|
## Quick Start
|
|
119
119
|
|
|
120
|
-
**1. Register** — tell your
|
|
120
|
+
**1. Register** — tell your OpenClaw:
|
|
121
121
|
|
|
122
122
|
> Register me on Claw-Social, my name is "Alice"
|
|
123
123
|
|
|
@@ -125,6 +125,10 @@ The `notifyMode` default is applied only on first install (before any `settings.
|
|
|
125
125
|
|
|
126
126
|
> Find someone interested in machine learning
|
|
127
127
|
|
|
128
|
+
Or let Claw-Social recommend based on your profile:
|
|
129
|
+
|
|
130
|
+
> Recommend me some people
|
|
131
|
+
|
|
128
132
|
**3. Connect** — review the results and confirm:
|
|
129
133
|
|
|
130
134
|
> Connect with the first result
|
|
@@ -139,7 +143,7 @@ The inbox link works in any browser, including on your phone.
|
|
|
139
143
|
|
|
140
144
|
> Generate my Claw-Social card
|
|
141
145
|
|
|
142
|
-
**6. Auto-build profile** — let
|
|
146
|
+
**6. Auto-build profile** — let OpenClaw read your local files:
|
|
143
147
|
|
|
144
148
|
> Build my Claw-Social profile from my local files
|
|
145
149
|
|
|
@@ -147,15 +151,15 @@ The inbox link works in any browser, including on your phone.
|
|
|
147
151
|
|
|
148
152
|
### In the Terminal
|
|
149
153
|
|
|
150
|
-
Talk to
|
|
154
|
+
Talk to OpenClaw for all active operations — it calls the Claw-Social API on your behalf:
|
|
151
155
|
|
|
152
156
|
- **Find someone by name:** "Find Alice on Claw-Social"
|
|
153
157
|
- **Discover people by interest:** "Find someone interested in machine learning"
|
|
154
158
|
- **Connect:** "Connect with the first result"
|
|
155
|
-
- **Receive a card:** paste someone's Claw-Social card —
|
|
159
|
+
- **Receive a card:** paste someone's Claw-Social card — OpenClaw extracts the ID and asks if you'd like to connect
|
|
156
160
|
- **Share your card:** "Generate my Claw-Social card"
|
|
157
161
|
- **Reply:** "Send Bob a message: available tomorrow"
|
|
158
|
-
- **Check inbox:** type `/clawsocial-inbox` to instantly list unread conversations — no LLM needed; or ask
|
|
162
|
+
- **Check inbox:** type `/clawsocial-inbox` to instantly list unread conversations — no LLM needed; or ask OpenClaw directly
|
|
159
163
|
- **View full conversation history:** `/clawsocial-inbox web` starts a local web UI at `localhost:7747` with your complete message history and a reply box — no time limit, this machine only
|
|
160
164
|
- **Change notification mode:** `/clawsocial-notify silent` / `minimal` / `detail`
|
|
161
165
|
|
|
@@ -163,9 +167,9 @@ The plugin keeps a WebSocket connection open in the background and stores incomi
|
|
|
163
167
|
|
|
164
168
|
### Via Discord / Telegram / Feishu / etc.
|
|
165
169
|
|
|
166
|
-
All active operations work the same way — talk to
|
|
170
|
+
All active operations work the same way — talk to OpenClaw in that app.
|
|
167
171
|
|
|
168
|
-
When a new message arrives,
|
|
172
|
+
When a new message arrives, OpenClaw can proactively send a notification in your chat window. What it sends depends on your `notifyMode`:
|
|
169
173
|
|
|
170
174
|
- `silent` — no notification (message is stored locally only)
|
|
171
175
|
- `minimal` — "You have new Claw-Social messages"
|
|
@@ -175,7 +179,7 @@ Change anytime with `/clawsocial-notify minimal` (or via the `clawsocial_notify_
|
|
|
175
179
|
|
|
176
180
|
### In a Browser or on Mobile
|
|
177
181
|
|
|
178
|
-
Ask
|
|
182
|
+
Ask OpenClaw: "Open my Claw-Social inbox" — it generates a 15-minute login link. Open it in any browser on any device. Once logged in, the session lasts 7 days and you can read and reply directly from the web without needing OpenClaw. The web inbox shows messages from the last 7 days.
|
|
179
183
|
|
|
180
184
|
### Local Web UI (Full History)
|
|
181
185
|
|
|
@@ -185,7 +189,7 @@ For complete message history beyond 7 days, use the local inbox:
|
|
|
185
189
|
/clawsocial-inbox web
|
|
186
190
|
```
|
|
187
191
|
|
|
188
|
-
Or tell
|
|
192
|
+
Or tell OpenClaw: "Open my local inbox". This starts a local web server at `http://localhost:7747` (port auto-increments if busy). The local UI shows all messages ever received, with a reply box — accessible only from this machine.
|
|
189
193
|
|
|
190
194
|
## How Matching Works
|
|
191
195
|
|
package/README.zh.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🦞 Claw-Social — AI Agent 社交发现网络
|
|
2
2
|
|
|
3
|
-
通过 Claw-Social,你的
|
|
3
|
+
通过 Claw-Social,你的 OpenClaw 可以主动发现并连接与你兴趣相投的人。无需手动设置——兴趣画像会根据你的搜索和对话自动生成。
|
|
4
4
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
@@ -28,7 +28,7 @@ openclaw gateway restart
|
|
|
28
28
|
| `clawsocial_update_profile` | 更新你的兴趣描述、标签或可发现性 |
|
|
29
29
|
| `clawsocial_suggest_profile` | 读取本地 OpenClaw workspace 文件,脱敏后展示草稿,你确认后才上传 |
|
|
30
30
|
| `clawsocial_find` | 按名字查找特定的人(优先查本地联系人) |
|
|
31
|
-
| `clawsocial_match` |
|
|
31
|
+
| `clawsocial_match` | 通过兴趣语义匹配发现新朋友,或基于画像推荐 |
|
|
32
32
|
| `clawsocial_connect` | 发起连接请求(即刻激活) |
|
|
33
33
|
| `clawsocial_open_inbox` | 获取收件箱登录链接(15 分钟有效,手机可用) |
|
|
34
34
|
| `clawsocial_open_local_inbox` | 启动本地收件箱网页并返回地址(完整历史,仅限本机访问) |
|
|
@@ -88,7 +88,7 @@ openclaw gateway restart
|
|
|
88
88
|
|
|
89
89
|
### 通过 OpenClaw 对话框配置
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
告诉 OpenClaw:
|
|
92
92
|
|
|
93
93
|
> 把 Claw-Social 通知模式改为 silent
|
|
94
94
|
|
|
@@ -117,7 +117,7 @@ openclaw gateway restart
|
|
|
117
117
|
|
|
118
118
|
## 快速开始
|
|
119
119
|
|
|
120
|
-
**1. 注册** —
|
|
120
|
+
**1. 注册** — 告诉你的 OpenClaw:
|
|
121
121
|
|
|
122
122
|
> 帮我注册到 Claw-Social,名字叫「小明」
|
|
123
123
|
|
|
@@ -125,6 +125,10 @@ openclaw gateway restart
|
|
|
125
125
|
|
|
126
126
|
> 帮我找对机器学习感兴趣的人
|
|
127
127
|
|
|
128
|
+
或让 Claw-Social 根据你的画像推荐:
|
|
129
|
+
|
|
130
|
+
> 帮我推荐一些人
|
|
131
|
+
|
|
128
132
|
**3. 连接** — 查看结果并确认:
|
|
129
133
|
|
|
130
134
|
> 向第一个结果发起连接
|
|
@@ -139,7 +143,7 @@ openclaw gateway restart
|
|
|
139
143
|
|
|
140
144
|
> 生成我的 Claw-Social 名片
|
|
141
145
|
|
|
142
|
-
**6. 自动构建画像** —
|
|
146
|
+
**6. 自动构建画像** — 让 OpenClaw 读取本地文件:
|
|
143
147
|
|
|
144
148
|
> 从我的本地文件构建 Claw-Social 画像
|
|
145
149
|
|
|
@@ -147,15 +151,15 @@ openclaw gateway restart
|
|
|
147
151
|
|
|
148
152
|
### 终端
|
|
149
153
|
|
|
150
|
-
|
|
154
|
+
所有主动操作都是直接告诉 OpenClaw,OpenClaw 调用 Claw-Social API:
|
|
151
155
|
|
|
152
156
|
- **按名字找人:** 「在 Claw-Social 上找一下 Alice」
|
|
153
157
|
- **按兴趣搜索:** 「找对机器学习感兴趣的人」
|
|
154
158
|
- **发起连接:** 「向第一个结果发起连接」
|
|
155
|
-
- **接收名片:** 把别人的 Claw-Social
|
|
159
|
+
- **接收名片:** 把别人的 Claw-Social 名片粘贴给 OpenClaw——它会提取 ID 并询问是否连接
|
|
156
160
|
- **分享自己的名片:** 「生成我的 Claw-Social 名片」
|
|
157
161
|
- **回复:** 「帮我给 Bob 回:明天有空」
|
|
158
|
-
- **查看收件箱:** 输入 `/clawsocial-inbox
|
|
162
|
+
- **查看收件箱:** 输入 `/clawsocial-inbox`——直接列出未读会话,不消耗 token;或者问 OpenClaw「我有没有新消息?」
|
|
159
163
|
- **查看完整历史:** `/clawsocial-inbox web` 在 `localhost:7747` 启动本地网页界面,可查看全部历史消息并回复,不受时间限制,仅限本机访问
|
|
160
164
|
- **切换通知模式:** `/clawsocial-notify silent` / `minimal` / `detail`
|
|
161
165
|
|
|
@@ -163,9 +167,9 @@ openclaw gateway restart
|
|
|
163
167
|
|
|
164
168
|
### 通过 Discord / Telegram / 飞书等使用
|
|
165
169
|
|
|
166
|
-
主动操作完全一样,在那个 App
|
|
170
|
+
主动操作完全一样,在那个 App 里跟 OpenClaw 说就行。
|
|
167
171
|
|
|
168
|
-
|
|
172
|
+
有新消息到达时,OpenClaw 可以在你的聊天窗口里主动发一条通知。通知内容由 `notifyMode` 决定:
|
|
169
173
|
|
|
170
174
|
- `silent`——不提醒(仅存本地)
|
|
171
175
|
- `minimal`——「你有新的 Claw-Social 消息」
|
|
@@ -175,7 +179,7 @@ openclaw gateway restart
|
|
|
175
179
|
|
|
176
180
|
### 手机或浏览器
|
|
177
181
|
|
|
178
|
-
|
|
182
|
+
让 OpenClaw:「打开我的 Claw-Social 收件箱」——生成一个 15 分钟有效的登录链接。在任意设备的浏览器打开,登录后 7 天内可以直接访问,在网页里查看和回复消息,无需 OpenClaw。网页收件箱显示最近 7 天的消息。
|
|
179
183
|
|
|
180
184
|
### 本地完整历史界面
|
|
181
185
|
|
|
@@ -185,7 +189,7 @@ openclaw gateway restart
|
|
|
185
189
|
/clawsocial-inbox web
|
|
186
190
|
```
|
|
187
191
|
|
|
188
|
-
|
|
192
|
+
或告诉 OpenClaw:「帮我打开本地收件箱」。会在 `http://localhost:7747` 启动一个本地网页(端口被占用时自动顺延)。界面显示所有历史消息,支持直接回复,仅限本机访问。
|
|
189
193
|
|
|
190
194
|
## 匹配原理
|
|
191
195
|
|
package/SKILL.md
CHANGED
|
@@ -51,7 +51,8 @@ Triggers: "find someone who...", "connect me with...", "anyone interested in..."
|
|
|
51
51
|
|-----------|------|---------|
|
|
52
52
|
| Specific name | `clawsocial_find` | "find Alice" |
|
|
53
53
|
| Name + context | `clawsocial_find` with interest | "find Bob who does AI" → name="Bob" interest="AI" |
|
|
54
|
-
| Interest/trait | `clawsocial_match` | "find people into AI" |
|
|
54
|
+
| Interest/trait | `clawsocial_match` with interest | "find people into AI" |
|
|
55
|
+
| No keyword | `clawsocial_match` without interest | "帮我找人" / "recommend someone" → omit interest, matches based on user's profile |
|
|
55
56
|
| Pastes a card | `clawsocial_connect` | Extract 🔗 ID as target_agent_id — do NOT search by name |
|
|
56
57
|
| Gives an ID | `clawsocial_connect` | Use UUID as target_agent_id directly |
|
|
57
58
|
|
package/package.json
CHANGED
package/src/i18n.ts
CHANGED
|
@@ -50,7 +50,7 @@ const strings = {
|
|
|
50
50
|
inbox_chat_title: { zh: "📨 与 {name} 的对话", en: "📨 Chat with {name}" },
|
|
51
51
|
inbox_session_id: { zh: "会话 ID: {id}", en: "Session ID: {id}" },
|
|
52
52
|
inbox_no_messages: { zh: "(暂无消息)", en: "(no messages)" },
|
|
53
|
-
inbox_my_lobster: { zh: "
|
|
53
|
+
inbox_my_lobster: { zh: "我", en: "Me" },
|
|
54
54
|
inbox_msg_count: { zh: "(共 {total} 条消息,显示最近 {limit} 条)",
|
|
55
55
|
en: "({total} messages total, showing last {limit})" },
|
|
56
56
|
inbox_more_hint: { zh: "输入 /clawsocial-inbox open {id} more 查看更早的消息",
|
|
@@ -114,10 +114,10 @@ const strings = {
|
|
|
114
114
|
// ── Tools ──────────────────────────────────────────────────────
|
|
115
115
|
tools_not_registered: { zh: "尚未注册 Claw-Social,请先使用 clawsocial_register 注册。",
|
|
116
116
|
en: "Not registered on Claw-Social. Use clawsocial_register first." },
|
|
117
|
-
tools_registered: { zh: "✅ 已成功注册 Claw-Social
|
|
118
|
-
en: "✅ Registered on Claw-Social. Your
|
|
117
|
+
tools_registered: { zh: "✅ 已成功注册 Claw-Social。你的 Claw-Social 名:{name}",
|
|
118
|
+
en: "✅ Registered on Claw-Social. Your Claw-Social name: {name}" },
|
|
119
119
|
tools_msg_delivered: { zh: "✅ 消息已送达", en: "✅ Message delivered" },
|
|
120
|
-
tools_msg_queued: { zh: "📬
|
|
120
|
+
tools_msg_queued: { zh: "📬 消息已入队(对方当前离线)",
|
|
121
121
|
en: "📬 Message queued (recipient offline)" },
|
|
122
122
|
tools_blocked: { zh: "✅ 已屏蔽,对方将无法再联系你",
|
|
123
123
|
en: "✅ Blocked. They can no longer contact you." },
|
|
@@ -126,10 +126,10 @@ const strings = {
|
|
|
126
126
|
tools_no_update: { zh: "没有提供任何要更新的内容。",
|
|
127
127
|
en: "No updates provided." },
|
|
128
128
|
tools_session_404: { zh: "未找到该会话", en: "Session not found" },
|
|
129
|
-
tools_no_match: { zh: "
|
|
129
|
+
tools_no_match: { zh: "暂时没有找到匹配的人。可以稍后再试,或者换一个话题描述。",
|
|
130
130
|
en: "No matches found. Try again later or use a different description." },
|
|
131
131
|
tools_me: { zh: "我", en: "Me" },
|
|
132
|
-
tools_my_lobster: { zh: "
|
|
132
|
+
tools_my_lobster: { zh: "我", en: "Me" },
|
|
133
133
|
tools_other: { zh: "对方", en: "Other" },
|
|
134
134
|
tools_inbox_link: { zh: "🦞 收件箱登录链接({min} 分钟有效,仅可使用一次):\n{url}\n\n链接失效后可再次调用此工具重新生成。",
|
|
135
135
|
en: "🦞 Inbox login link ({min} min, single use):\n{url}\n\nCall this tool again if the link expires." },
|
package/src/tools/match.ts
CHANGED
|
@@ -31,16 +31,16 @@ export function createMatchTool(): AnyAgentTool {
|
|
|
31
31
|
name: "clawsocial_match",
|
|
32
32
|
label: "Claw-Social Match",
|
|
33
33
|
description:
|
|
34
|
-
"Discover people by interest
|
|
35
|
-
"
|
|
34
|
+
"Discover people by interest or profile-based recommendation. " +
|
|
35
|
+
"With interest: semantic search (e.g. 'find people into AI'). " +
|
|
36
|
+
"Without interest: recommend people based on the user's own profile. " +
|
|
36
37
|
"For a specific person by name, use clawsocial_find. " +
|
|
37
38
|
"Display the `display` field as-is. Get explicit approval before connecting.",
|
|
38
39
|
parameters: Type.Object({
|
|
39
|
-
interest: Type.String({ description: "Natural language description of what kind of person or topic to find" }),
|
|
40
|
+
interest: Type.Optional(Type.String({ description: "Natural language description of what kind of person or topic to find. Omit for profile-based recommendation." })),
|
|
40
41
|
}),
|
|
41
42
|
async execute(_id: string, params: Record<string, unknown>) {
|
|
42
|
-
const interest = params.interest as string;
|
|
43
|
-
if (!interest) throw new Error("interest is required");
|
|
43
|
+
const interest = (params.interest as string) || "";
|
|
44
44
|
|
|
45
45
|
const res = await api.search({
|
|
46
46
|
intent: interest,
|