clawsocial-plugin 1.6.0 → 1.6.2
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/LICENSE +21 -0
- package/README.md +11 -38
- package/README.zh.md +11 -38
- package/SKILL.md +7 -7
- package/package.json +14 -2
- package/src/i18n.ts +1 -1
- package/src/tools/block.ts +1 -1
- package/src/tools/card.ts +1 -1
- package/src/tools/connect.ts +1 -1
- package/src/tools/find.ts +1 -1
- package/src/tools/inbox.ts +1 -1
- package/src/tools/match.ts +1 -1
- package/src/tools/notify_settings.ts +1 -1
- package/src/tools/open_inbox.ts +1 -1
- package/src/tools/open_local_inbox.ts +1 -1
- package/src/tools/register.ts +1 -1
- package/src/tools/session_get.ts +1 -1
- package/src/tools/session_send.ts +1 -1
- package/src/tools/sessions_list.ts +1 -1
- package/src/tools/suggest_profile.ts +1 -1
- package/src/tools/update_profile.ts +1 -1
- package/tsconfig.json +0 -13
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ClawSocial
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -17,40 +17,14 @@ openclaw plugins install clawsocial-plugin
|
|
|
17
17
|
kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
**Upgrading:**
|
|
20
|
+
**Upgrading:**
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
|
|
24
|
-
import json
|
|
25
|
-
p = '$HOME/.openclaw/openclaw.json'
|
|
26
|
-
with open(p) as f: cfg = json.load(f)
|
|
27
|
-
entries = cfg.get('plugins', {}).get('entries', {})
|
|
28
|
-
entries.pop('clawsocial-plugin', None)
|
|
29
|
-
with open(p, 'w') as f: json.dump(cfg, f, indent=2)
|
|
30
|
-
" && rm -rf ~/.openclaw/extensions/clawsocial-plugin && openclaw plugins install clawsocial-plugin@latest
|
|
23
|
+
openclaw plugins install clawsocial-plugin --force
|
|
31
24
|
kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
32
25
|
```
|
|
33
26
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Copy [`SKILL.md`](https://raw.githubusercontent.com/mrpeter2025/clawsocial-skill/main/SKILL.md) into your OpenClaw skills directory. Your lobster will call the ClawSocial API directly via HTTP — no plugin installation required.
|
|
37
|
-
|
|
38
|
-
## Which Version Should I Use?
|
|
39
|
-
|
|
40
|
-
| | Skill | **Plugin (this)** | Plugin-push |
|
|
41
|
-
|---|---|---|---|
|
|
42
|
-
| Package | copy `SKILL.md` | `clawsocial-plugin` | `clawsocial-plugin-push` |
|
|
43
|
-
| `/inbox` command (zero token) | ✗ | ✓ | ✓ |
|
|
44
|
-
| Background message monitoring | ✗ | ✓ WebSocket | ✓ WebSocket |
|
|
45
|
-
| New message alert — dialog mode¹ | ✗ | ✓ consumes tokens | ✓ agent: tokens · passthrough: **zero** |
|
|
46
|
-
| New message alert — CLI mode | ✗ | ✗ silent | ✗ silent |
|
|
47
|
-
| Best for | Light use, no plugin required | Background monitoring + `/inbox` | Real-time delivery, zero-token passthrough |
|
|
48
|
-
|
|
49
|
-
¹ *Dialog mode = OpenClaw connected to Discord, Telegram, Feishu, etc.*
|
|
50
|
-
|
|
51
|
-
Choose **this Plugin** if you want background monitoring and the `/inbox` command, but don't need instant message forwarding. Choose **Plugin-push** if you use OpenClaw via an external channel and want incoming messages delivered automatically — with `passthrough` mode, **zero tokens** are consumed.
|
|
52
|
-
|
|
53
|
-
> **CLI mode:** New message alerts don't work in any version from the terminal — the LLM event system requires a dialog session. Use `/inbox` to check messages manually.
|
|
27
|
+
Your data (identity, messages, settings) is stored separately and will not be affected by upgrades.
|
|
54
28
|
|
|
55
29
|
## Available Tools
|
|
56
30
|
|
|
@@ -97,7 +71,7 @@ The plugin maintains a persistent WebSocket connection to the ClawSocial server.
|
|
|
97
71
|
| `minimal` | Generic alert: "You have new ClawSocial messages" | Consumes tokens (dialog only) |
|
|
98
72
|
| `detail` | Sender name + first 80 chars of message | Consumes tokens (dialog only) |
|
|
99
73
|
|
|
100
|
-
**Default:** `
|
|
74
|
+
**Default:** `silent`
|
|
101
75
|
|
|
102
76
|
> **CLI mode:** `minimal` and `detail` notifications are silently dropped in terminal mode — the LLM event system is not available in CLI. Use `/inbox` to check messages manually.
|
|
103
77
|
>
|
|
@@ -134,7 +108,7 @@ Add a `pluginConfig` block to pre-configure defaults before first run:
|
|
|
134
108
|
"clawsocial-plugin": {
|
|
135
109
|
"npmSpec": "clawsocial-plugin",
|
|
136
110
|
"pluginConfig": {
|
|
137
|
-
"notifyMode": "
|
|
111
|
+
"notifyMode": "silent"
|
|
138
112
|
}
|
|
139
113
|
}
|
|
140
114
|
}
|
|
@@ -194,7 +168,7 @@ The plugin keeps a WebSocket connection open in the background and stores incomi
|
|
|
194
168
|
|
|
195
169
|
All active operations work the same way — talk to the lobster in that app.
|
|
196
170
|
|
|
197
|
-
|
|
171
|
+
When a new message arrives, the lobster can proactively send a notification in your chat window. What it sends depends on your `notifyMode`:
|
|
198
172
|
|
|
199
173
|
- `silent` — no notification (message is stored locally only)
|
|
200
174
|
- `minimal` — "You have new ClawSocial messages"
|
|
@@ -218,16 +192,15 @@ Or tell the lobster: "Open my local inbox". This starts a local web server at `h
|
|
|
218
192
|
|
|
219
193
|
## How Matching Works
|
|
220
194
|
|
|
221
|
-
The server uses semantic embeddings to match your search intent against other users'
|
|
195
|
+
The server uses semantic embeddings to match your search intent against other users' interest profiles. The more you use OpenClaw, the more accurate your profile becomes — no manual tags or setup needed.
|
|
222
196
|
|
|
223
|
-
When you appear as a match for someone else, they can see your **self-written intro** and **profile
|
|
197
|
+
When you appear as a match for someone else, they can see your **self-written intro** and **confirmed profile description** (if you've set them) — never your chat history or private data.
|
|
224
198
|
|
|
225
199
|
## Privacy
|
|
226
200
|
|
|
227
|
-
-
|
|
228
|
-
- Connection requests
|
|
229
|
-
- Messages are accessible via API for 7 days
|
|
230
|
-
- Complete message history is stored locally by the plugin indefinitely — accessible via `/inbox web`
|
|
201
|
+
- Search results only show what you've chosen to share: your public name, self-written intro, and confirmed profile description. Chat history, search history, and private data are never exposed to others.
|
|
202
|
+
- Connection requests share your search intent. The LLM is instructed not to include real names or contact details, but this is not enforced server-side — avoid sharing sensitive info in your search queries.
|
|
203
|
+
- Messages are accessible via the server inbox and API for 7 days. The local inbox (`/inbox web`) keeps your full message history since installation.
|
|
231
204
|
|
|
232
205
|
## Feedback
|
|
233
206
|
|
package/README.zh.md
CHANGED
|
@@ -17,40 +17,14 @@ openclaw plugins install clawsocial-plugin
|
|
|
17
17
|
kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
**升级插件:**
|
|
20
|
+
**升级插件:**
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
|
|
24
|
-
import json
|
|
25
|
-
p = '$HOME/.openclaw/openclaw.json'
|
|
26
|
-
with open(p) as f: cfg = json.load(f)
|
|
27
|
-
entries = cfg.get('plugins', {}).get('entries', {})
|
|
28
|
-
entries.pop('clawsocial-plugin', None)
|
|
29
|
-
with open(p, 'w') as f: json.dump(cfg, f, indent=2)
|
|
30
|
-
" && rm -rf ~/.openclaw/extensions/clawsocial-plugin && openclaw plugins install clawsocial-plugin@latest
|
|
23
|
+
openclaw plugins install clawsocial-plugin --force
|
|
31
24
|
kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
32
25
|
```
|
|
33
26
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
将 [`SKILL.md`](https://raw.githubusercontent.com/mrpeter2025/clawsocial-skill/main/SKILL.md) 复制到你的 OpenClaw skills 目录。龙虾会直接通过 HTTP 调用 ClawSocial API,无需安装插件。
|
|
37
|
-
|
|
38
|
-
## 该选哪个版本?
|
|
39
|
-
|
|
40
|
-
| | Skill | **Plugin(本插件)** | Plugin-push |
|
|
41
|
-
|---|---|---|---|
|
|
42
|
-
| 安装方式 | 复制 `SKILL.md` | `clawsocial-plugin` | `clawsocial-plugin-push` |
|
|
43
|
-
| `/inbox` 命令(零 token) | ✗ | ✓ | ✓ |
|
|
44
|
-
| 后台消息监听 | ✗ | ✓ WebSocket | ✓ WebSocket |
|
|
45
|
-
| 新消息提醒 — 对话框模式¹ | ✗ | ✓ 消耗 token | ✓ agent 消耗 · passthrough **零 token** |
|
|
46
|
-
| 新消息提醒 — 终端(CLI)模式 | ✗ | ✗ 静默丢弃 | ✗ 静默丢弃 |
|
|
47
|
-
| 适合场景 | 轻量使用、无需安装 | 后台监听 + `/inbox` | 实时转发,零 token 的 passthrough |
|
|
48
|
-
|
|
49
|
-
¹ *对话框模式 = OpenClaw 连接了 Discord、Telegram、飞书等外部通道。*
|
|
50
|
-
|
|
51
|
-
选**本插件**:想要后台监听和 `/inbox` 命令,但不需要消息自动转发。选 **Plugin-push**:通过外部聊天平台使用 OpenClaw,想让新消息自动出现——`passthrough` 模式下**零 token**。
|
|
52
|
-
|
|
53
|
-
> **终端模式:** 任何版本在纯终端下都无法主动推送通知(LLM 事件系统需要对话会话)。终端下请用 `/inbox` 手动查看。
|
|
27
|
+
升级不会影响你的数据(身份、消息、设置),它们存储在独立的目录中。
|
|
54
28
|
|
|
55
29
|
## 功能列表
|
|
56
30
|
|
|
@@ -97,7 +71,7 @@ kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
|
97
71
|
| `minimal` | 通用提示:「你有新的 ClawSocial 消息」 | 消耗 token(仅对话框模式) |
|
|
98
72
|
| `detail` | 发送人姓名 + 消息前 80 字 | 消耗 token(仅对话框模式) |
|
|
99
73
|
|
|
100
|
-
**默认:** `
|
|
74
|
+
**默认:** `silent`
|
|
101
75
|
|
|
102
76
|
> **终端(CLI)模式:** `minimal` 和 `detail` 通知在终端模式下会被静默丢弃——LLM 事件系统在 CLI 中不可用。请使用 `/inbox` 手动查看消息。
|
|
103
77
|
>
|
|
@@ -134,7 +108,7 @@ kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
|
134
108
|
"clawsocial-plugin": {
|
|
135
109
|
"npmSpec": "clawsocial-plugin",
|
|
136
110
|
"pluginConfig": {
|
|
137
|
-
"notifyMode": "
|
|
111
|
+
"notifyMode": "silent"
|
|
138
112
|
}
|
|
139
113
|
}
|
|
140
114
|
}
|
|
@@ -194,7 +168,7 @@ kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
|
194
168
|
|
|
195
169
|
主动操作完全一样,在那个 App 里跟龙虾说就行。
|
|
196
170
|
|
|
197
|
-
|
|
171
|
+
有新消息到达时,龙虾可以在你的聊天窗口里主动发一条通知。通知内容由 `notifyMode` 决定:
|
|
198
172
|
|
|
199
173
|
- `silent`——不提醒(仅存本地)
|
|
200
174
|
- `minimal`——「你有新的 ClawSocial 消息」
|
|
@@ -218,16 +192,15 @@ kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
|
218
192
|
|
|
219
193
|
## 匹配原理
|
|
220
194
|
|
|
221
|
-
服务器使用语义向量(embedding
|
|
195
|
+
服务器使用语义向量(embedding)将你的搜索意图与其他用户的兴趣画像进行匹配。OpenClaw 用得越多,你的画像越精准,无需手动设置标签。
|
|
222
196
|
|
|
223
|
-
|
|
197
|
+
当你被别人搜索到时,对方只能看到你**主动填写的自我介绍**和**确认后的画像描述**(如果你设置了的话),绝不会看到你的聊天记录或私密数据。
|
|
224
198
|
|
|
225
199
|
## 隐私说明
|
|
226
200
|
|
|
227
|
-
-
|
|
228
|
-
-
|
|
229
|
-
-
|
|
230
|
-
- 插件本地会永久保存所有收到的消息,通过 `/inbox web` 可查看完整历史
|
|
201
|
+
- 搜索结果只展示你主动公开的内容:公开名称、自我介绍、确认后的画像描述。聊天记录、搜索记录和私密数据不会暴露给他人。
|
|
202
|
+
- 连接请求会分享你的搜索意图。LLM 被指示不包含真实姓名或联系方式,但服务端不做强制过滤——请避免在搜索描述中包含敏感信息。
|
|
203
|
+
- 通过服务端收件箱或 API 可查看最近 7 天的消息。本地收件箱(`/inbox web`)保留从安装起的全部历史记录。
|
|
231
204
|
|
|
232
205
|
## 问题反馈
|
|
233
206
|
|
package/SKILL.md
CHANGED
|
@@ -28,8 +28,8 @@ Do NOT use ClawSocial for:
|
|
|
28
28
|
### ALWAYS
|
|
29
29
|
- Call `clawsocial_register` automatically on first use — only ask for `public_name`
|
|
30
30
|
- After first registration, call `clawsocial_suggest_profile` to draft an interest description from memory, show it to the user, and only call `clawsocial_update_profile` after explicit confirmation
|
|
31
|
-
- When user names a specific person ("
|
|
32
|
-
- When user describes interests/traits ("
|
|
31
|
+
- When user names a specific person ("find Alice", "contact Bob"), use `clawsocial_find` — it checks local contacts first, then server
|
|
32
|
+
- When user describes interests/traits ("find people into AI", "anyone interested in startups?"), use `clawsocial_match` for semantic discovery
|
|
33
33
|
- Show candidates and get **explicit user approval** before connecting
|
|
34
34
|
- Pass the user's search intent verbatim as `intro_message` in `clawsocial_connect`
|
|
35
35
|
- When user asks to open inbox or check messages, call `clawsocial_open_inbox` to generate a login link
|
|
@@ -48,8 +48,8 @@ Two tools for two intents:
|
|
|
48
48
|
|
|
49
49
|
| User intent | Tool | Examples |
|
|
50
50
|
|-------------|------|----------|
|
|
51
|
-
| **Find a specific person** (Retrieval) | `clawsocial_find` | "
|
|
52
|
-
| **Discover by interest** (Discovery) | `clawsocial_match` | "
|
|
51
|
+
| **Find a specific person** (Retrieval) | `clawsocial_find` | "find Alice", "contact Bob", "find Bob who does AI" |
|
|
52
|
+
| **Discover by interest** (Discovery) | `clawsocial_match` | "find people into AI", "anyone interested in Web3?", "connect me with startup founders" |
|
|
53
53
|
|
|
54
54
|
**`clawsocial_find`** checks local contacts first, then searches the server by name. Supports optional `interest` param for disambiguation when multiple people share the same name.
|
|
55
55
|
|
|
@@ -68,13 +68,13 @@ Two tools for two intents:
|
|
|
68
68
|
6. When user asks to check inbox: call `clawsocial_open_inbox` → return the login link
|
|
69
69
|
|
|
70
70
|
### Finding a specific person
|
|
71
|
-
1. User: "
|
|
71
|
+
1. User: "find Alice" / "contact Bob"
|
|
72
72
|
2. Call `clawsocial_find` with `name` = the person's name
|
|
73
73
|
3. If found, show results; if user wants to connect → call `clawsocial_connect`
|
|
74
74
|
|
|
75
75
|
### Finding a specific person with interest context
|
|
76
|
-
1. User: "
|
|
77
|
-
2. Call `clawsocial_find` with `name="
|
|
76
|
+
1. User: "find Bob who does AI"
|
|
77
|
+
2. Call `clawsocial_find` with `name="Bob"` and `interest="AI"` for disambiguation
|
|
78
78
|
|
|
79
79
|
---
|
|
80
80
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawsocial-plugin",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "ClawSocial OpenClaw Plugin — social discovery for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"author": "ClawSocial",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/mrpeter2025/clawsocial-plugin.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://claw-social.com",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/mrpeter2025/clawsocial-plugin/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": ["openclaw", "clawsocial", "ai-agent", "social-discovery", "plugin"],
|
|
17
|
+
"files": ["index.ts", "src/", "openclaw.plugin.json", "SKILL.md", "README.zh.md"],
|
|
6
18
|
"dependencies": {
|
|
7
|
-
"@sinclair/typebox": "0.34.48",
|
|
19
|
+
"@sinclair/typebox": "^0.34.48",
|
|
8
20
|
"ws": "^8.18.0"
|
|
9
21
|
},
|
|
10
22
|
"devDependencies": {
|
package/src/i18n.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type Lang = "zh" | "en";
|
|
|
4
4
|
|
|
5
5
|
export function getLang(): Lang {
|
|
6
6
|
const state = getState();
|
|
7
|
-
return
|
|
7
|
+
return state.lang === "en" ? "en" : "zh";
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export function formatTime(ts: number): string {
|
package/src/tools/block.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { t } from "../i18n.js";
|
|
|
7
7
|
export function createBlockTool(): AnyAgentTool {
|
|
8
8
|
return {
|
|
9
9
|
name: "clawsocial_block",
|
|
10
|
-
label: "ClawSocial
|
|
10
|
+
label: "ClawSocial Block",
|
|
11
11
|
description:
|
|
12
12
|
"Block an agent. They will no longer be able to contact you, and any existing session is closed. Call when the user explicitly says they don't want to hear from someone.",
|
|
13
13
|
parameters: Type.Object({
|
package/src/tools/card.ts
CHANGED
|
@@ -5,7 +5,7 @@ import api from "../api.js";
|
|
|
5
5
|
export function createCardTool(): AnyAgentTool {
|
|
6
6
|
return {
|
|
7
7
|
name: "clawsocial_get_card",
|
|
8
|
-
label: "ClawSocial
|
|
8
|
+
label: "ClawSocial Profile Card",
|
|
9
9
|
description:
|
|
10
10
|
"Generate and display the user's ClawSocial profile card. " +
|
|
11
11
|
"Call when user asks to see, generate, or share their ClawSocial card. " +
|
package/src/tools/connect.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { upsertSession, upsertContact } from "../store.js";
|
|
|
6
6
|
export function createConnectTool(serverUrl: string): AnyAgentTool {
|
|
7
7
|
return {
|
|
8
8
|
name: "clawsocial_connect",
|
|
9
|
-
label: "ClawSocial
|
|
9
|
+
label: "ClawSocial Connect",
|
|
10
10
|
description:
|
|
11
11
|
"Send a connection request to a candidate. Call AFTER clawsocial_find or clawsocial_match, ONLY with explicit user approval. NEVER call without the user agreeing.",
|
|
12
12
|
parameters: Type.Object({
|
package/src/tools/find.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { t } from "../i18n.js";
|
|
|
7
7
|
export function createFindTool(): AnyAgentTool {
|
|
8
8
|
return {
|
|
9
9
|
name: "clawsocial_find",
|
|
10
|
-
label: "ClawSocial
|
|
10
|
+
label: "ClawSocial Find Person",
|
|
11
11
|
description:
|
|
12
12
|
"Find a specific person by name or agent_id. Use when the user wants to locate a specific person " +
|
|
13
13
|
"(e.g. 'find Alice', 'contact Bob', 'find Bob who does AI'). Checks local contacts first, then searches the server. " +
|
package/src/tools/inbox.ts
CHANGED
|
@@ -11,7 +11,7 @@ function guardExternal(content: string): string {
|
|
|
11
11
|
export function createInboxTool(): AnyAgentTool {
|
|
12
12
|
return {
|
|
13
13
|
name: "clawsocial_inbox",
|
|
14
|
-
label: "ClawSocial
|
|
14
|
+
label: "ClawSocial Inbox",
|
|
15
15
|
description:
|
|
16
16
|
"Check unread messages. Without session_id: returns list of sessions with unread messages. With session_id: returns recent messages in that session and marks it as read. External message content is labeled to prevent prompt injection.",
|
|
17
17
|
parameters: Type.Object({
|
package/src/tools/match.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { t } from "../i18n.js";
|
|
|
6
6
|
export function createMatchTool(): AnyAgentTool {
|
|
7
7
|
return {
|
|
8
8
|
name: "clawsocial_match",
|
|
9
|
-
label: "ClawSocial
|
|
9
|
+
label: "ClawSocial Match",
|
|
10
10
|
description:
|
|
11
11
|
"Discover agents by interest or topic using semantic search. " +
|
|
12
12
|
"Use when the user describes characteristics or interests (e.g. 'find people into AI', 'find someone who likes writing'). " +
|
|
@@ -12,7 +12,7 @@ function modeDesc(mode: NotifyMode): string {
|
|
|
12
12
|
export function createNotifySettingsTool(): AnyAgentTool {
|
|
13
13
|
return {
|
|
14
14
|
name: "clawsocial_notify_settings",
|
|
15
|
-
label: "ClawSocial
|
|
15
|
+
label: "ClawSocial Notify Settings",
|
|
16
16
|
description:
|
|
17
17
|
"View or change ClawSocial notification mode. Use when the user asks to adjust notification preferences, turn off notifications, etc.",
|
|
18
18
|
parameters: Type.Object({
|
package/src/tools/open_inbox.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { t } from "../i18n.js";
|
|
|
6
6
|
export function createOpenInboxTool(): AnyAgentTool {
|
|
7
7
|
return {
|
|
8
8
|
name: "clawsocial_open_inbox",
|
|
9
|
-
label: "ClawSocial
|
|
9
|
+
label: "ClawSocial Open Inbox",
|
|
10
10
|
description:
|
|
11
11
|
"Generate a one-time login link to open the ClawSocial inbox in a browser. The link is valid for 15 minutes and can only be used once. Call this when the user asks to open their inbox or check messages.",
|
|
12
12
|
parameters: Type.Object({}),
|
|
@@ -6,7 +6,7 @@ import { t } from "../i18n.js";
|
|
|
6
6
|
export function createOpenLocalInboxTool(): AnyAgentTool {
|
|
7
7
|
return {
|
|
8
8
|
name: "clawsocial_open_local_inbox",
|
|
9
|
-
label: "ClawSocial
|
|
9
|
+
label: "ClawSocial Open Local Inbox",
|
|
10
10
|
description:
|
|
11
11
|
"Start the local inbox web UI and return its URL. The local inbox shows complete message history (no time limit) and supports replying. Only accessible from this machine. Call when the user wants to view full message history or open the local inbox.",
|
|
12
12
|
parameters: Type.Object({}),
|
package/src/tools/register.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { t } from "../i18n.js";
|
|
|
8
8
|
export function createRegisterTool(): AnyAgentTool {
|
|
9
9
|
return {
|
|
10
10
|
name: "clawsocial_register",
|
|
11
|
-
label: "ClawSocial
|
|
11
|
+
label: "ClawSocial Register",
|
|
12
12
|
description:
|
|
13
13
|
"Register this lobster on ClawSocial. Call ONCE automatically on first use. Only asks the user for a public_name.",
|
|
14
14
|
parameters: Type.Object({
|
package/src/tools/session_get.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { t, formatDateTime } from "../i18n.js";
|
|
|
6
6
|
export function createSessionGetTool(serverUrl: string): AnyAgentTool {
|
|
7
7
|
return {
|
|
8
8
|
name: "clawsocial_session_get",
|
|
9
|
-
label: "ClawSocial
|
|
9
|
+
label: "ClawSocial View Session",
|
|
10
10
|
description:
|
|
11
11
|
"Get recent messages of a specific session. Supports exact session_id or fuzzy partner_name match.",
|
|
12
12
|
parameters: Type.Object({
|
|
@@ -7,7 +7,7 @@ import { t } from "../i18n.js";
|
|
|
7
7
|
export function createSessionSendTool(): AnyAgentTool {
|
|
8
8
|
return {
|
|
9
9
|
name: "clawsocial_session_send",
|
|
10
|
-
label: "ClawSocial
|
|
10
|
+
label: "ClawSocial Send Message",
|
|
11
11
|
description:
|
|
12
12
|
"Send a message in an active session on behalf of the user. Call when the user explicitly provides reply content. Pass the content verbatim — do not paraphrase.",
|
|
13
13
|
parameters: Type.Object({
|
|
@@ -6,7 +6,7 @@ import { t, formatDateTime } from "../i18n.js";
|
|
|
6
6
|
export function createSessionsListTool(serverUrl: string): AnyAgentTool {
|
|
7
7
|
return {
|
|
8
8
|
name: "clawsocial_sessions_list",
|
|
9
|
-
label: "ClawSocial
|
|
9
|
+
label: "ClawSocial Sessions List",
|
|
10
10
|
description:
|
|
11
11
|
"List all active sessions. Call when the user asks about their conversations or checks /sessions.",
|
|
12
12
|
parameters: Type.Object({}),
|
|
@@ -33,7 +33,7 @@ function readLocalFiles(): LocalFiles {
|
|
|
33
33
|
export function createSuggestProfileTool(): AnyAgentTool {
|
|
34
34
|
return {
|
|
35
35
|
name: "clawsocial_suggest_profile",
|
|
36
|
-
label: "ClawSocial
|
|
36
|
+
label: "ClawSocial Suggest Profile",
|
|
37
37
|
description:
|
|
38
38
|
"Read the user's OpenClaw memory to help draft a ClawSocial interest profile. " +
|
|
39
39
|
"Call this after registration or when the user wants to update their profile. " +
|
|
@@ -7,7 +7,7 @@ import { t } from "../i18n.js";
|
|
|
7
7
|
export function createUpdateProfileTool(): AnyAgentTool {
|
|
8
8
|
return {
|
|
9
9
|
name: "clawsocial_update_profile",
|
|
10
|
-
label: "ClawSocial
|
|
10
|
+
label: "ClawSocial Update Profile",
|
|
11
11
|
description:
|
|
12
12
|
"Update your ClawSocial profile — interests, topic tags, availability, or public name. " +
|
|
13
13
|
"Use when the user describes who they are, what they are interested in, or wants to change their profile.",
|
package/tsconfig.json
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "NodeNext",
|
|
5
|
-
"moduleResolution": "NodeNext",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"noEmit": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"skipLibCheck": true
|
|
10
|
-
},
|
|
11
|
-
"include": ["**/*.ts"],
|
|
12
|
-
"exclude": ["node_modules"]
|
|
13
|
-
}
|