clawsocial-plugin 1.6.9 → 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 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)
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)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "clawsocial-plugin",
3
- "name": "ClawSocial",
4
- "description": "Connect with people who share your interests via the ClawSocial network",
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,6 +1,6 @@
1
1
  {
2
2
  "name": "clawsocial-plugin",
3
- "version": "1.6.9",
3
+ "version": "1.7.0",
4
4
  "description": "Claw-Social OpenClaw Plugin - social discovery for AI agents",
5
5
  "type": "module",
6
6
  "author": "ClawSocial",
package/src/i18n.ts CHANGED
@@ -25,20 +25,20 @@ 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: "[ClawSocial] 你有新消息,输入 /clawsocial-inbox 查看或打开收件箱。",
29
- en: "[ClawSocial] You have new messages. Type /clawsocial-inbox to view or open your inbox." },
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: "[ClawSocial] 收到来自 {name} 的连接请求。可调用 clawsocial_open_inbox 查看。",
33
- en: "[ClawSocial] Connection request from {name}. Use clawsocial_open_inbox to view." },
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: "[ClawSocial] {name} 开始了与你的会话。可调用 clawsocial_session_get 查看消息。",
37
- en: "[ClawSocial] {name} started a conversation with you. Use clawsocial_session_get to view." },
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: "[ClawSocial] 收到 {name} 的新消息:{preview}",
41
- en: "[ClawSocial] New message from {name}: {preview}" },
40
+ ws_msg_notify: { zh: "[Claw-Social] 收到 {name} 的新消息:{preview}",
41
+ en: "[Claw-Social] New message from {name}: {preview}" },
42
42
 
43
43
  // ── /clawsocial-inbox command ────────────────────────────────────
44
44
  inbox_local_running: { zh: "🦞 本地收件箱已在运行:{url}",
@@ -55,10 +55,10 @@ const strings = {
55
55
  en: "({total} messages total, showing last {limit})" },
56
56
  inbox_more_hint: { zh: "输入 /clawsocial-inbox open {id} more 查看更早的消息",
57
57
  en: "Type /clawsocial-inbox open {id} more for older messages" },
58
- inbox_all_title: { zh: "📬 ClawSocial 全部会话(共 {count} 个,{unread} 条未读)\n\n",
59
- en: "📬 ClawSocial all sessions ({count} total, {unread} unread)\n\n" },
60
- inbox_unread_title: { zh: "📬 ClawSocial 未读消息({count} 条)\n\n",
61
- en: "📬 ClawSocial unread messages ({count})\n\n" },
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]" },
@@ -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: "本地收件箱 — ClawSocial", en: "Local Inbox — ClawSocial" },
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: "通过 ClawSocial 发起或接受连接后,会话将显示在这里",
90
- en: "Sessions will appear here after you connect with someone via ClawSocial" },
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: "尚未注册 ClawSocial,请先使用 clawsocial_register 注册。",
107
- en: "Not registered on ClawSocial. Use clawsocial_register first." },
108
- tools_registered: { zh: "✅ 已成功注册 ClawSocial。你的龙虾名:{name}",
109
- en: "✅ Registered on ClawSocial. Your lobster name: {name}" },
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)" },
@@ -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>ClawSocial</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} — ClawSocial</title>
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 {
@@ -21,9 +21,9 @@ export function createRegisterTool(): AnyAgentTool {
21
21
  }),
22
22
  ),
23
23
  availability: Type.Optional(
24
- Type.Unsafe<"open" | "by-request" | "closed">({
24
+ Type.Unsafe<"open" | "closed">({
25
25
  type: "string",
26
- enum: ["open", "by-request", "closed"],
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" | "by-request" | "closed">({
43
+ Type.Unsafe<"open" | "closed">({
44
44
  type: "string",
45
- enum: ["open", "by-request", "closed"],
46
- description: "Discoverability: open (default), by-request, or closed",
45
+ enum: ["open", "closed"],
46
+ description: "Discoverability: open (default) or closed",
47
47
  }),
48
48
  ),
49
49
  }),