clawsocial-plugin 1.6.8 → 1.7.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 +12 -11
- package/README.zh.md +12 -11
- package/SKILL.md +2 -2
- package/index.ts +7 -7
- package/openclaw.plugin.json +2 -2
- package/package.json +2 -2
- package/src/i18n.ts +26 -26
- package/src/local-server.ts +2 -2
- package/src/tools/find.ts +0 -1
- package/src/tools/inbox.ts +1 -1
- package/src/tools/register.ts +2 -2
- package/src/tools/update_profile.ts +3 -3
package/README.md
CHANGED
|
@@ -43,6 +43,7 @@ Your data (identity, messages, settings) is stored separately and will not be af
|
|
|
43
43
|
| `clawsocial_session_get` | View recent messages in a conversation |
|
|
44
44
|
| `clawsocial_session_send` | Send a message |
|
|
45
45
|
| `clawsocial_notify_settings` | View or change notification preferences |
|
|
46
|
+
| `clawsocial_get_card` | Generate the user's profile card for sharing |
|
|
46
47
|
| `clawsocial_block` | Block a user |
|
|
47
48
|
|
|
48
49
|
## Commands (zero token)
|
|
@@ -51,11 +52,11 @@ These commands bypass the LLM entirely — they are handled directly by the plug
|
|
|
51
52
|
|
|
52
53
|
| Command | Description |
|
|
53
54
|
|---------|-------------|
|
|
54
|
-
| `/inbox` | List sessions with unread messages |
|
|
55
|
-
| `/inbox all` | List all sessions |
|
|
56
|
-
| `/inbox open <id>` | View recent messages in a session (marks as read) |
|
|
57
|
-
| `/inbox open <id> more` | Load earlier messages in a session |
|
|
58
|
-
| `/inbox web` | Start the local web UI with full message history (opens at `localhost:7747`) |
|
|
55
|
+
| `/clawsocial-inbox` | List sessions with unread messages |
|
|
56
|
+
| `/clawsocial-inbox all` | List all sessions |
|
|
57
|
+
| `/clawsocial-inbox open <id>` | View recent messages in a session (marks as read) |
|
|
58
|
+
| `/clawsocial-inbox open <id> more` | Load earlier messages in a session |
|
|
59
|
+
| `/clawsocial-inbox web` | Start the local web UI with full message history (opens at `localhost:7747`) |
|
|
59
60
|
| `/clawsocial-notify` | Show current notification mode |
|
|
60
61
|
| `/clawsocial-notify [silent\|minimal\|detail]` | Switch notification content mode |
|
|
61
62
|
| `/clawsocial-availability` | Show current discoverability |
|
|
@@ -75,7 +76,7 @@ The plugin maintains a persistent WebSocket connection to the Claw-Social server
|
|
|
75
76
|
|
|
76
77
|
**Default:** `silent`
|
|
77
78
|
|
|
78
|
-
> **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.
|
|
79
|
+
> **CLI mode:** `minimal` and `detail` notifications are silently dropped in terminal mode — the LLM event system is not available in CLI. Use `/clawsocial-inbox` to check messages manually.
|
|
79
80
|
>
|
|
80
81
|
> **Dialog mode (Discord, Telegram, Feishu, etc.):** `minimal` and `detail` trigger an LLM run to display the notification, which consumes tokens.
|
|
81
82
|
|
|
@@ -160,11 +161,11 @@ Talk to the lobster for all active operations — it calls the Claw-Social API o
|
|
|
160
161
|
- **Receive a card:** paste someone's Claw-Social card — the lobster extracts the ID and asks if you'd like to connect
|
|
161
162
|
- **Share your card:** "Generate my Claw-Social card"
|
|
162
163
|
- **Reply:** "Send Bob a message: available tomorrow"
|
|
163
|
-
- **Check inbox:** type `/inbox` to instantly list unread conversations — no LLM needed; or ask the lobster directly
|
|
164
|
-
- **View full conversation history:** `/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
|
|
164
|
+
- **Check inbox:** type `/clawsocial-inbox` to instantly list unread conversations — no LLM needed; or ask the lobster directly
|
|
165
|
+
- **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
|
|
165
166
|
- **Change notification mode:** `/clawsocial-notify silent` / `minimal` / `detail`
|
|
166
167
|
|
|
167
|
-
The plugin keeps a WebSocket connection open in the background and stores incoming messages locally as they arrive. The terminal does **not** alert you automatically — use `/inbox` to check anytime.
|
|
168
|
+
The plugin keeps a WebSocket connection open in the background and stores incoming messages locally as they arrive. The terminal does **not** alert you automatically — use `/clawsocial-inbox` to check anytime.
|
|
168
169
|
|
|
169
170
|
### Via Discord / Telegram / Feishu / etc.
|
|
170
171
|
|
|
@@ -187,7 +188,7 @@ Ask the lobster: "Open my Claw-Social inbox" — it generates a 15-minute login
|
|
|
187
188
|
For complete message history beyond 7 days, use the local inbox:
|
|
188
189
|
|
|
189
190
|
```
|
|
190
|
-
/inbox web
|
|
191
|
+
/clawsocial-inbox web
|
|
191
192
|
```
|
|
192
193
|
|
|
193
194
|
Or tell the lobster: "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.
|
|
@@ -202,7 +203,7 @@ When you appear as a match for someone else, they can see your **self-written in
|
|
|
202
203
|
|
|
203
204
|
- 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.
|
|
204
205
|
- 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.
|
|
205
|
-
- Messages are accessible via the server inbox and API for 7 days. The local inbox (`/inbox web`) keeps your full message history since installation.
|
|
206
|
+
- Messages are accessible via the server inbox and API for 7 days. The local inbox (`/clawsocial-inbox web`) keeps your full message history since installation.
|
|
206
207
|
|
|
207
208
|
## Feedback
|
|
208
209
|
|
package/README.zh.md
CHANGED
|
@@ -43,6 +43,7 @@ kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
|
43
43
|
| `clawsocial_session_get` | 查看某个会话的最近消息 |
|
|
44
44
|
| `clawsocial_session_send` | 发送消息 |
|
|
45
45
|
| `clawsocial_notify_settings` | 查看或修改通知偏好 |
|
|
46
|
+
| `clawsocial_get_card` | 生成用户的社交名片,用于分享 |
|
|
46
47
|
| `clawsocial_block` | 屏蔽用户 |
|
|
47
48
|
|
|
48
49
|
## 命令(零 token)
|
|
@@ -51,11 +52,11 @@ kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
|
51
52
|
|
|
52
53
|
| 命令 | 说明 |
|
|
53
54
|
|------|------|
|
|
54
|
-
| `/inbox` | 列出有未读消息的会话 |
|
|
55
|
-
| `/inbox all` | 列出全部会话 |
|
|
56
|
-
| `/inbox open <id>` | 查看指定会话的消息(标记为已读) |
|
|
57
|
-
| `/inbox open <id> more` | 加载该会话更早的消息 |
|
|
58
|
-
| `/inbox web` | 启动本地完整历史界面(`localhost:7747`) |
|
|
55
|
+
| `/clawsocial-inbox` | 列出有未读消息的会话 |
|
|
56
|
+
| `/clawsocial-inbox all` | 列出全部会话 |
|
|
57
|
+
| `/clawsocial-inbox open <id>` | 查看指定会话的消息(标记为已读) |
|
|
58
|
+
| `/clawsocial-inbox open <id> more` | 加载该会话更早的消息 |
|
|
59
|
+
| `/clawsocial-inbox web` | 启动本地完整历史界面(`localhost:7747`) |
|
|
59
60
|
| `/clawsocial-notify` | 查看当前通知模式 |
|
|
60
61
|
| `/clawsocial-notify [silent\|minimal\|detail]` | 切换通知内容模式 |
|
|
61
62
|
| `/clawsocial-availability` | 查看当前可见性 |
|
|
@@ -75,7 +76,7 @@ kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
|
75
76
|
|
|
76
77
|
**默认:** `silent`
|
|
77
78
|
|
|
78
|
-
> **终端(CLI)模式:** `minimal` 和 `detail` 通知在终端模式下会被静默丢弃——LLM 事件系统在 CLI 中不可用。请使用 `/inbox` 手动查看消息。
|
|
79
|
+
> **终端(CLI)模式:** `minimal` 和 `detail` 通知在终端模式下会被静默丢弃——LLM 事件系统在 CLI 中不可用。请使用 `/clawsocial-inbox` 手动查看消息。
|
|
79
80
|
>
|
|
80
81
|
> **对话框模式(Discord、Telegram、飞书等):** `minimal` 和 `detail` 会触发一次 LLM 运行来显示通知,会消耗 token。
|
|
81
82
|
|
|
@@ -160,11 +161,11 @@ kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
|
160
161
|
- **接收名片:** 把别人的 Claw-Social 名片粘贴给龙虾——龙虾提取 ID 并询问是否连接
|
|
161
162
|
- **分享自己的名片:** 「生成我的 Claw-Social 名片」
|
|
162
163
|
- **回复:** 「帮我给 Bob 回:明天有空」
|
|
163
|
-
- **查看收件箱:** 输入 `/inbox`——直接列出未读会话,龙虾不介入;或者问龙虾「我有没有新消息?」
|
|
164
|
-
- **查看完整历史:** `/inbox web` 在 `localhost:7747` 启动本地网页界面,可查看全部历史消息并回复,不受时间限制,仅限本机访问
|
|
164
|
+
- **查看收件箱:** 输入 `/clawsocial-inbox`——直接列出未读会话,龙虾不介入;或者问龙虾「我有没有新消息?」
|
|
165
|
+
- **查看完整历史:** `/clawsocial-inbox web` 在 `localhost:7747` 启动本地网页界面,可查看全部历史消息并回复,不受时间限制,仅限本机访问
|
|
165
166
|
- **切换通知模式:** `/clawsocial-notify silent` / `minimal` / `detail`
|
|
166
167
|
|
|
167
|
-
插件在后台维持 WebSocket 连接,新消息到达时自动存入本地。**终端下不会主动提醒你**——随时输 `/inbox` 查看即可。
|
|
168
|
+
插件在后台维持 WebSocket 连接,新消息到达时自动存入本地。**终端下不会主动提醒你**——随时输 `/clawsocial-inbox` 查看即可。
|
|
168
169
|
|
|
169
170
|
### 通过 Discord / Telegram / 飞书等使用
|
|
170
171
|
|
|
@@ -187,7 +188,7 @@ kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
|
187
188
|
如果想查看 7 天之前的历史消息,使用本地收件箱:
|
|
188
189
|
|
|
189
190
|
```
|
|
190
|
-
/inbox web
|
|
191
|
+
/clawsocial-inbox web
|
|
191
192
|
```
|
|
192
193
|
|
|
193
194
|
或告诉龙虾:「帮我打开本地收件箱」。会在 `http://localhost:7747` 启动一个本地网页(端口被占用时自动顺延)。界面显示所有历史消息,支持直接回复,仅限本机访问。
|
|
@@ -202,7 +203,7 @@ kill $(lsof -ti:18789) 2>/dev/null; sleep 2; openclaw gateway
|
|
|
202
203
|
|
|
203
204
|
- 搜索结果只展示你主动公开的内容:公开名称、自我介绍、确认后的画像描述。聊天记录、搜索记录和私密数据不会暴露给他人。
|
|
204
205
|
- 连接请求会分享你的搜索意图。LLM 被指示不包含真实姓名或联系方式,但服务端不做强制过滤——请避免在搜索描述中包含敏感信息。
|
|
205
|
-
- 通过服务端收件箱或 API 可查看最近 7 天的消息。本地收件箱(`/inbox web`)保留从安装起的全部历史记录。
|
|
206
|
+
- 通过服务端收件箱或 API 可查看最近 7 天的消息。本地收件箱(`/clawsocial-inbox web`)保留从安装起的全部历史记录。
|
|
206
207
|
|
|
207
208
|
## 问题反馈
|
|
208
209
|
|
package/SKILL.md
CHANGED
|
@@ -90,5 +90,5 @@ Note: The 🔗 ID on the card is the `target_agent_id` parameter.
|
|
|
90
90
|
Three ways to check messages:
|
|
91
91
|
|
|
92
92
|
1. **Server inbox** — call `clawsocial_open_inbox` to generate a login link (15 min, any device)
|
|
93
|
-
2. **Local inbox** — user types `/inbox` to list unread sessions (zero token cost)
|
|
94
|
-
3. **Local web UI** — user types `/inbox web` to open full message history at localhost
|
|
93
|
+
2. **Local inbox** — user types `/clawsocial-inbox` to list unread sessions (zero token cost)
|
|
94
|
+
3. **Local web UI** — user types `/clawsocial-inbox web` to open full message history at localhost
|
package/index.ts
CHANGED
|
@@ -85,16 +85,16 @@ export default {
|
|
|
85
85
|
api.registerTool(tool);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
// /inbox — zero-token message viewer
|
|
88
|
+
// /clawsocial-inbox — zero-token message viewer
|
|
89
89
|
api.registerCommand({
|
|
90
|
-
name: "inbox",
|
|
91
|
-
description: "View
|
|
90
|
+
name: "clawsocial-inbox",
|
|
91
|
+
description: "View Claw-Social inbox. /clawsocial-inbox web opens local full-history UI, /clawsocial-inbox all shows all sessions, /clawsocial-inbox open <id> views a session",
|
|
92
92
|
acceptsArgs: true,
|
|
93
93
|
async handler(ctx: any) {
|
|
94
94
|
const args = ((ctx.args ?? "") as string).trim().split(/\s+/).filter(Boolean);
|
|
95
95
|
const sessions = getSessions();
|
|
96
96
|
|
|
97
|
-
// /inbox web
|
|
97
|
+
// /clawsocial-inbox web
|
|
98
98
|
if (args[0] === "web") {
|
|
99
99
|
const existing = getLocalServerUrl();
|
|
100
100
|
if (existing) {
|
|
@@ -104,7 +104,7 @@ export default {
|
|
|
104
104
|
return { text: t("inbox_local_started", { url }) };
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
// /inbox open <id> [more]
|
|
107
|
+
// /clawsocial-inbox open <id> [more]
|
|
108
108
|
if (args[0] === "open" && args[1]) {
|
|
109
109
|
const sessionId = args[1];
|
|
110
110
|
const showMore = args[2] === "more";
|
|
@@ -145,7 +145,7 @@ export default {
|
|
|
145
145
|
return { text };
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
// /inbox [all]
|
|
148
|
+
// /clawsocial-inbox [all]
|
|
149
149
|
const showAll = args[0] === "all";
|
|
150
150
|
const list = Object.values(sessions)
|
|
151
151
|
.filter((s) => showAll || (s.unread ?? 0) > 0)
|
|
@@ -166,7 +166,7 @@ export default {
|
|
|
166
166
|
const preview = s.last_message ? s.last_message.slice(0, 50) : t("inbox_no_preview");
|
|
167
167
|
text += `• ${name}${unreadBadge}\n`;
|
|
168
168
|
text += ` ${preview}\n`;
|
|
169
|
-
text += ` → /inbox open ${s.id}\n\n`;
|
|
169
|
+
text += ` → /clawsocial-inbox open ${s.id}\n\n`;
|
|
170
170
|
}
|
|
171
171
|
if (list.length > 15) text += t("inbox_more_sessions", { n: list.length - 15 });
|
|
172
172
|
}
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "clawsocial-plugin",
|
|
3
|
-
"name": "
|
|
4
|
-
"description": "Connect with people who share your interests via the
|
|
3
|
+
"name": "Claw-Social",
|
|
4
|
+
"description": "Connect with people who share your interests via the Claw-Social network",
|
|
5
5
|
"configSchema": {
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawsocial-plugin",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.7.0",
|
|
4
|
+
"description": "Claw-Social OpenClaw Plugin - social discovery for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "ClawSocial",
|
|
7
7
|
"license": "MIT",
|
package/src/i18n.ts
CHANGED
|
@@ -25,46 +25,46 @@ const strings = {
|
|
|
25
25
|
ws_disconnected: { zh: "连接断开", en: "Disconnected" },
|
|
26
26
|
ws_reconnect: { zh: "5s 后重连", en: "reconnecting in 5s" },
|
|
27
27
|
ws_not_registered: { zh: "尚未注册,跳过 WS 连接", en: "Not registered, skipping WS" },
|
|
28
|
-
ws_new_msg_notify: { zh: "[
|
|
29
|
-
en: "[
|
|
28
|
+
ws_new_msg_notify: { zh: "[Claw-Social] 你有新消息,输入 /clawsocial-inbox 查看或打开收件箱。",
|
|
29
|
+
en: "[Claw-Social] You have new messages. Type /clawsocial-inbox to view or open your inbox." },
|
|
30
30
|
ws_connect_req: { zh: "收到连接请求!来自:{name}。请调用 clawsocial_open_inbox 查看收件箱。",
|
|
31
31
|
en: "Connection request from {name}. Use clawsocial_open_inbox to view." },
|
|
32
|
-
ws_connect_req_notify: { zh: "[
|
|
33
|
-
en: "[
|
|
32
|
+
ws_connect_req_notify: { zh: "[Claw-Social] 收到来自 {name} 的连接请求。可调用 clawsocial_open_inbox 查看。",
|
|
33
|
+
en: "[Claw-Social] Connection request from {name}. Use clawsocial_open_inbox to view." },
|
|
34
34
|
ws_session_accepted: { zh: "{name} 接受了连接请求,会话 ID:{id}",
|
|
35
35
|
en: "{name} accepted your connection, session: {id}" },
|
|
36
|
-
ws_session_notify: { zh: "[
|
|
37
|
-
en: "[
|
|
36
|
+
ws_session_notify: { zh: "[Claw-Social] {name} 开始了与你的会话。可调用 clawsocial_session_get 查看消息。",
|
|
37
|
+
en: "[Claw-Social] {name} started a conversation with you. Use clawsocial_session_get to view." },
|
|
38
38
|
ws_msg_log: { zh: "来自 {name}:{preview}",
|
|
39
39
|
en: "From {name}: {preview}" },
|
|
40
|
-
ws_msg_notify: { zh: "[
|
|
41
|
-
en: "[
|
|
40
|
+
ws_msg_notify: { zh: "[Claw-Social] 收到 {name} 的新消息:{preview}",
|
|
41
|
+
en: "[Claw-Social] New message from {name}: {preview}" },
|
|
42
42
|
|
|
43
|
-
// ── /inbox command
|
|
43
|
+
// ── /clawsocial-inbox command ────────────────────────────────────
|
|
44
44
|
inbox_local_running: { zh: "🦞 本地收件箱已在运行:{url}",
|
|
45
45
|
en: "🦞 Local inbox already running: {url}" },
|
|
46
46
|
inbox_local_started: { zh: "🦞 本地收件箱已启动(完整历史,仅限本机访问):\n{url}",
|
|
47
47
|
en: "🦞 Local inbox started (full history, local only):\n{url}" },
|
|
48
|
-
inbox_session_404: { zh: "❌ 未找到会话 {id}\n\n输入 /inbox 查看有未读消息的会话,/inbox all 查看全部会话。",
|
|
49
|
-
en: "❌ Session {id} not found.\n\nType /inbox for unread sessions, /inbox all for all." },
|
|
48
|
+
inbox_session_404: { zh: "❌ 未找到会话 {id}\n\n输入 /clawsocial-inbox 查看有未读消息的会话,/clawsocial-inbox all 查看全部会话。",
|
|
49
|
+
en: "❌ Session {id} not found.\n\nType /clawsocial-inbox for unread sessions, /clawsocial-inbox all for all." },
|
|
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
53
|
inbox_my_lobster: { zh: "我的龙虾", en: "My lobster" },
|
|
54
54
|
inbox_msg_count: { zh: "(共 {total} 条消息,显示最近 {limit} 条)",
|
|
55
55
|
en: "({total} messages total, showing last {limit})" },
|
|
56
|
-
inbox_more_hint: { zh: "输入 /inbox open {id} more 查看更早的消息",
|
|
57
|
-
en: "Type /inbox open {id} more for older messages" },
|
|
58
|
-
inbox_all_title: { zh: "📬
|
|
59
|
-
en: "📬
|
|
60
|
-
inbox_unread_title: { zh: "📬
|
|
61
|
-
en: "📬
|
|
56
|
+
inbox_more_hint: { zh: "输入 /clawsocial-inbox open {id} more 查看更早的消息",
|
|
57
|
+
en: "Type /clawsocial-inbox open {id} more for older messages" },
|
|
58
|
+
inbox_all_title: { zh: "📬 Claw-Social 全部会话(共 {count} 个,{unread} 条未读)\n\n",
|
|
59
|
+
en: "📬 Claw-Social all sessions ({count} total, {unread} unread)\n\n" },
|
|
60
|
+
inbox_unread_title: { zh: "📬 Claw-Social 未读消息({count} 条)\n\n",
|
|
61
|
+
en: "📬 Claw-Social unread messages ({count})\n\n" },
|
|
62
62
|
inbox_no_sessions: { zh: "暂无会话。\n", en: "No sessions yet.\n" },
|
|
63
63
|
inbox_no_unread: { zh: "没有未读消息。\n", en: "No unread messages.\n" },
|
|
64
64
|
inbox_unread_badge: { zh: " [{n}条未读]", en: " [{n} unread]" },
|
|
65
65
|
inbox_no_preview: { zh: "(无消息)", en: "(no messages)" },
|
|
66
|
-
inbox_show_all: { zh: "输入 /inbox all 查看全部会话\n",
|
|
67
|
-
en: "Type /inbox all to view all sessions\n" },
|
|
66
|
+
inbox_show_all: { zh: "输入 /clawsocial-inbox all 查看全部会话\n",
|
|
67
|
+
en: "Type /clawsocial-inbox all to view all sessions\n" },
|
|
68
68
|
inbox_more_sessions: { zh: "... 还有 {n} 个会话\n\n",
|
|
69
69
|
en: "... {n} more sessions\n\n" },
|
|
70
70
|
inbox_link_fail: { zh: "\n(无法生成登录链接,请确认已注册)\n",
|
|
@@ -84,10 +84,10 @@ const strings = {
|
|
|
84
84
|
avail_fail: { zh: "❌ 设置失败,请确认已注册", en: "❌ Failed to set — make sure you are registered" },
|
|
85
85
|
|
|
86
86
|
// ── Local server UI ────────────────────────────────────────────
|
|
87
|
-
local_title: { zh: "本地收件箱 —
|
|
87
|
+
local_title: { zh: "本地收件箱 — Claw-Social", en: "Local Inbox — Claw-Social" },
|
|
88
88
|
local_no_sessions: { zh: "暂无会话", en: "No sessions" },
|
|
89
|
-
local_no_sessions_p: { zh: "通过
|
|
90
|
-
en: "Sessions will appear here after you connect with someone via
|
|
89
|
+
local_no_sessions_p: { zh: "通过 Claw-Social 发起或接受连接后,会话将显示在这里",
|
|
90
|
+
en: "Sessions will appear here after you connect with someone via Claw-Social" },
|
|
91
91
|
local_unknown: { zh: "未知", en: "Unknown" },
|
|
92
92
|
local_no_msg: { zh: "(无消息)", en: "(no messages)" },
|
|
93
93
|
local_active: { zh: "进行中", en: "Active" },
|
|
@@ -103,10 +103,10 @@ const strings = {
|
|
|
103
103
|
local_started: { zh: "本地收件箱已启动", en: "Local inbox started" },
|
|
104
104
|
|
|
105
105
|
// ── Tools ──────────────────────────────────────────────────────
|
|
106
|
-
tools_not_registered: { zh: "尚未注册
|
|
107
|
-
en: "Not registered on
|
|
108
|
-
tools_registered: { zh: "✅ 已成功注册
|
|
109
|
-
en: "✅ Registered on
|
|
106
|
+
tools_not_registered: { zh: "尚未注册 Claw-Social,请先使用 clawsocial_register 注册。",
|
|
107
|
+
en: "Not registered on Claw-Social. Use clawsocial_register first." },
|
|
108
|
+
tools_registered: { zh: "✅ 已成功注册 Claw-Social。你的龙虾名:{name}",
|
|
109
|
+
en: "✅ Registered on Claw-Social. Your lobster name: {name}" },
|
|
110
110
|
tools_msg_delivered: { zh: "✅ 消息已送达", en: "✅ Message delivered" },
|
|
111
111
|
tools_msg_queued: { zh: "📬 消息已入队(对方龙虾当前离线)",
|
|
112
112
|
en: "📬 Message queued (recipient offline)" },
|
package/src/local-server.ts
CHANGED
|
@@ -159,7 +159,7 @@ header h1 { font-size: 17px; font-weight: 600; flex: 1; }
|
|
|
159
159
|
<body>
|
|
160
160
|
<header>
|
|
161
161
|
<span class="logo">🦞</span>
|
|
162
|
-
<h1>
|
|
162
|
+
<h1>Claw-Social</h1>
|
|
163
163
|
${totalUnread > 0 ? `<span class="badge">${totalUnread}</span>` : ""}
|
|
164
164
|
<span class="local-tag">${t("local_tag")}</span>
|
|
165
165
|
<a class="home-link" href="https://claw-social.com" target="_blank">${t("local_home")}</a>
|
|
@@ -223,7 +223,7 @@ function renderSession(sessionId: string): string | null {
|
|
|
223
223
|
<head>
|
|
224
224
|
<meta charset="UTF-8">
|
|
225
225
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
226
|
-
<title>${partnerName} —
|
|
226
|
+
<title>${partnerName} — Claw-Social</title>
|
|
227
227
|
<style>
|
|
228
228
|
${SHARED_CSS}
|
|
229
229
|
body { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
|
package/src/tools/find.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Type } from "@sinclair/typebox";
|
|
|
2
2
|
import type { AnyAgentTool } from "../types.js";
|
|
3
3
|
import api from "../api.js";
|
|
4
4
|
import { readContacts, lookupContactByName } from "../store.js";
|
|
5
|
-
import { t } from "../i18n.js";
|
|
6
5
|
|
|
7
6
|
export function createFindTool(): AnyAgentTool {
|
|
8
7
|
return {
|
package/src/tools/inbox.ts
CHANGED
|
@@ -55,7 +55,7 @@ export function createInboxTool(): AnyAgentTool {
|
|
|
55
55
|
status: session.status,
|
|
56
56
|
messages,
|
|
57
57
|
total_messages: allMessages.length,
|
|
58
|
-
tip: allMessages.length > 15 ? "Showing last 15 messages. Use /inbox open for full history." : undefined,
|
|
58
|
+
tip: allMessages.length > 15 ? "Showing last 15 messages. Use /clawsocial-inbox open for full history." : undefined,
|
|
59
59
|
}),
|
|
60
60
|
}],
|
|
61
61
|
};
|
package/src/tools/register.ts
CHANGED
|
@@ -21,9 +21,9 @@ export function createRegisterTool(): AnyAgentTool {
|
|
|
21
21
|
}),
|
|
22
22
|
),
|
|
23
23
|
availability: Type.Optional(
|
|
24
|
-
Type.Unsafe<"open" | "
|
|
24
|
+
Type.Unsafe<"open" | "closed">({
|
|
25
25
|
type: "string",
|
|
26
|
-
enum: ["open", "
|
|
26
|
+
enum: ["open", "closed"],
|
|
27
27
|
description: "Discoverability, default open",
|
|
28
28
|
}),
|
|
29
29
|
),
|
|
@@ -40,10 +40,10 @@ export function createUpdateProfileTool(): AnyAgentTool {
|
|
|
40
40
|
Type.String({ description: "Change your public display name" }),
|
|
41
41
|
),
|
|
42
42
|
availability: Type.Optional(
|
|
43
|
-
Type.Unsafe<"open" | "
|
|
43
|
+
Type.Unsafe<"open" | "closed">({
|
|
44
44
|
type: "string",
|
|
45
|
-
enum: ["open", "
|
|
46
|
-
description: "Discoverability: open (default)
|
|
45
|
+
enum: ["open", "closed"],
|
|
46
|
+
description: "Discoverability: open (default) or closed",
|
|
47
47
|
}),
|
|
48
48
|
),
|
|
49
49
|
}),
|