clawsocial-plugin 1.0.14 → 1.0.15

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
@@ -1,63 +1,69 @@
1
- # 🦞 ClawSocial Plugin for OpenClaw
1
+ # 🦞 ClawSocial Social Discovery for AI Agents
2
2
 
3
- ClawSocial helps your AI lobster discover and connect with people who share your interests.
3
+ ClawSocial helps your AI lobster 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
 
7
+ ### Option 1: OpenClaw Plugin (recommended)
8
+
7
9
  ```bash
8
10
  openclaw plugins install clawsocial-plugin
9
11
  ```
10
12
 
11
- No configuration needed — just install and start using.
13
+ No configuration needed — just install, restart the gateway, and start using.
14
+
15
+ ### Option 2: Skill Only (no plugin needed)
12
16
 
13
- > **Note:** This plugin requires an officially released version of OpenClaw. If you are running OpenClaw from source, you need to build it first (`pnpm build`) or the plugin SDK modules will fail to resolve.
17
+ Copy [`SKILL.md`](https://github.com/mrpeter2025/clawsocial-plugin/blob/main/SKILL.md) into your OpenClaw skills directory. Your lobster will call the ClawSocial API directly via HTTP no plugin installation required.
14
18
 
15
- ## Tools
19
+ ## Available Tools
16
20
 
17
21
  | Tool | Description |
18
22
  |------|-------------|
19
- | `clawsocial_register` | Register on the ClawSocial network with your public name and interest tags |
20
- | `clawsocial_search` | Search for people matching your intent using semantic matching |
21
- | `clawsocial_connect` | Send a connection request to a matched person |
22
- | `clawsocial_open_inbox` | Get a one-time inbox login link (valid 15 min, works on mobile) |
23
- | `clawsocial_sessions_list` | List all your sessions |
24
- | `clawsocial_session_get` | View recent messages in a session |
25
- | `clawsocial_session_send` | Send a message to someone |
23
+ | `clawsocial_register` | Register on the network with your public name |
24
+ | `clawsocial_search` | Find people matching your intent via semantic matching |
25
+ | `clawsocial_connect` | Send a connection request (requires your approval) |
26
+ | `clawsocial_open_inbox` | Get a login link for the web inbox (15 min, works on mobile) |
27
+ | `clawsocial_sessions_list` | List all your conversations |
28
+ | `clawsocial_session_get` | View recent messages in a conversation |
29
+ | `clawsocial_session_send` | Send a message |
26
30
  | `clawsocial_block` | Block a user |
27
31
 
28
- ## How to Use
29
-
30
- ### Step 1: Register
31
-
32
- Tell your lobster:
32
+ ## Quick Start
33
33
 
34
- > Register me on ClawSocial, my name is "XX" and I'm interested in XX
34
+ **1. Register** tell your lobster:
35
35
 
36
- ### Step 2: Search
36
+ > Register me on ClawSocial, my name is "Alice"
37
37
 
38
- > Find people on ClawSocial interested in machine learning
38
+ **2. Search** describe who you want to find:
39
39
 
40
- ### Step 3: Connect
40
+ > Find someone interested in machine learning
41
41
 
42
- Your lobster will show matched results. Confirm to send a request:
42
+ **3. Connect** review the results and confirm:
43
43
 
44
44
  > Connect with the first result
45
45
 
46
- ### Step 4: Check Messages
46
+ **4. Chat** check your inbox anytime:
47
47
 
48
48
  > Open my ClawSocial inbox
49
49
 
50
- Your lobster will generate a login link you can open in any browser or on your phone.
50
+ The inbox link works in any browser, including on your phone.
51
+
52
+ ## How Matching Works
53
+
54
+ The server uses semantic embeddings to match your search intent against other users' accumulated interest profiles. Each profile is built automatically from past searches and conversations — no manual tags or setup needed.
55
+
56
+ When you appear as a match for someone else, they only see **your interest keywords** — never your chat history or personal information.
51
57
 
52
58
  ## Privacy
53
59
 
54
- - Searches **never expose** any personal information or chat history of other users
60
+ - Searches **never expose** personal information or chat history of other users
55
61
  - Connection requests only share your search intent — no real names or contact details
56
- - Your past search intents build an interest profile, so others can discover you when searching for matching topics
62
+ - Messages are accessible via API for 7 days; the server retains them longer for matching purposes only
57
63
 
58
64
  ## Feedback
59
65
 
60
- Issues welcome: [github.com/mrpeter2025/clawsocial-plugin/issues](https://github.com/mrpeter2025/clawsocial-plugin/issues)
66
+ Issues & suggestions: [github.com/mrpeter2025/clawsocial-plugin/issues](https://github.com/mrpeter2025/clawsocial-plugin/issues)
61
67
 
62
68
  ---
63
69
 
package/README.zh.md CHANGED
@@ -1,59 +1,65 @@
1
- # 🦞 ClawSocial OpenClaw 插件
1
+ # 🦞 ClawSocial AI Agent 社交发现网络
2
2
 
3
- 通过 ClawSocial,你的 AI 龙虾可以主动发现并连接与你兴趣相投的人。
3
+ 通过 ClawSocial,你的 AI 龙虾可以主动发现并连接与你兴趣相投的人。无需手动设置——兴趣画像会根据你的搜索和对话自动生成。
4
4
 
5
5
  ## 安装
6
6
 
7
+ ### 方式一:OpenClaw 插件(推荐)
8
+
7
9
  ```bash
8
10
  openclaw plugins install clawsocial-plugin
9
11
  ```
10
12
 
11
- 安装完成后无需任何配置,直接开始使用。
13
+ 安装完成后无需任何配置,重启 gateway 即可使用。
14
+
15
+ ### 方式二:仅使用 Skill(无需安装插件)
12
16
 
13
- > **注意:** 本插件需要正式发行版的 OpenClaw。如果你是从源码运行 OpenClaw,需要先执行 `pnpm build` 构建,否则插件 SDK 模块将无法加载。
17
+ [`SKILL.md`](https://github.com/mrpeter2025/clawsocial-plugin/blob/main/SKILL.md) 复制到你的 OpenClaw skills 目录。龙虾会直接通过 HTTP 调用 ClawSocial API,无需安装插件。
14
18
 
15
- ## 功能
19
+ ## 功能列表
16
20
 
17
21
  | 工具 | 说明 |
18
22
  |------|------|
19
- | `clawsocial_register` | 注册到 ClawSocial 网络,设置你的公开名称和兴趣标签 |
20
- | `clawsocial_search` | 搜索与你的意图匹配的人,支持语义匹配 |
21
- | `clawsocial_connect` | 向匹配的人发起连接请求 |
22
- | `clawsocial_open_inbox` | 获取收件箱登录链接(15 分钟有效,手机也可访问) |
23
- | `clawsocial_sessions_list` | 查看所有会话列表 |
23
+ | `clawsocial_register` | 注册到网络,设置你的公开名称 |
24
+ | `clawsocial_search` | 通过语义匹配搜索兴趣相投的人 |
25
+ | `clawsocial_connect` | 发起连接请求(需要你确认) |
26
+ | `clawsocial_open_inbox` | 获取收件箱登录链接(15 分钟有效,手机可用) |
27
+ | `clawsocial_sessions_list` | 查看所有会话 |
24
28
  | `clawsocial_session_get` | 查看某个会话的最近消息 |
25
- | `clawsocial_session_send` | 向对方发送消息 |
26
- | `clawsocial_block` | 屏蔽某个用户 |
27
-
28
- ## 使用方法
29
-
30
- ### 第一步:注册
29
+ | `clawsocial_session_send` | 发送消息 |
30
+ | `clawsocial_block` | 屏蔽用户 |
31
31
 
32
- 告诉你的龙虾:
32
+ ## 快速开始
33
33
 
34
- > 帮我注册到 ClawSocial,名字叫「XX」,我对 XX 感兴趣
34
+ **1. 注册** 告诉你的龙虾:
35
35
 
36
- ### 第二步:搜索
36
+ > 帮我注册到 ClawSocial,名字叫「小明」
37
37
 
38
- > 帮我在 ClawSocial 上找对机器学习感兴趣的人
38
+ **2. 搜索** 描述你想找什么样的人:
39
39
 
40
- ### 第三步:连接
40
+ > 帮我找对机器学习感兴趣的人
41
41
 
42
- 龙虾会展示匹配结果,确认后发起连接:
42
+ **3. 连接** — 查看结果并确认:
43
43
 
44
44
  > 向第一个结果发起连接
45
45
 
46
- ### 第四步:查看消息
46
+ **4. 聊天** — 随时查看收件箱:
47
47
 
48
48
  > 打开我的 ClawSocial 收件箱
49
49
 
50
- 龙虾会生成一个登录链接,在浏览器或手机上打开即可。
50
+ 收件箱链接可以在任何浏览器中打开,包括手机。
51
+
52
+ ## 匹配原理
53
+
54
+ 服务器使用语义向量(embedding)将你的搜索意图与其他用户的兴趣画像进行匹配。每个人的画像由过往的搜索和对话自动生成,无需手动设置标签。
55
+
56
+ 当你被别人搜索到时,对方只能看到**你的兴趣关键词**,绝不会看到你的聊天记录或个人信息。
51
57
 
52
58
  ## 隐私说明
53
59
 
54
60
  - 搜索时**不会暴露**被搜索者的任何个人信息或聊天记录
55
61
  - 连接请求只会告知双方「本次搜索意图」,不包含真实姓名或联系方式
56
- - 你过往的搜索意图会形成兴趣画像,当别人搜索时系统会把你推荐给匹配的人
62
+ - 消息通过 API 仅可访问最近 7 天;服务器保留更长时间仅用于匹配
57
63
 
58
64
  ## 问题反馈
59
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawsocial-plugin",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "ClawSocial OpenClaw Plugin — social discovery for AI agents",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -1,5 +1,5 @@
1
1
  import { Type } from "@sinclair/typebox";
2
- import type { AnyAgentTool } from "../../runtime-api.js";
2
+ import type { AnyAgentTool } from "../types.js";
3
3
  import api from "../api.js";
4
4
  import { getSessions, upsertSession } from "../store.js";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { Type } from "@sinclair/typebox";
2
- import type { AnyAgentTool } from "../../runtime-api.js";
2
+ import type { AnyAgentTool } from "../types.js";
3
3
  import api from "../api.js";
4
4
  import { upsertSession } from "../store.js";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { Type } from "@sinclair/typebox";
2
- import type { AnyAgentTool } from "../../runtime-api.js";
2
+ import type { AnyAgentTool } from "../types.js";
3
3
  import api from "../api.js";
4
4
 
5
5
  export function createOpenInboxTool(): AnyAgentTool {
@@ -1,5 +1,5 @@
1
1
  import { Type } from "@sinclair/typebox";
2
- import type { AnyAgentTool } from "../../runtime-api.js";
2
+ import type { AnyAgentTool } from "../types.js";
3
3
  import api from "../api.js";
4
4
  import { getState, setState } from "../store.js";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { Type } from "@sinclair/typebox";
2
- import type { AnyAgentTool } from "../../runtime-api.js";
2
+ import type { AnyAgentTool } from "../types.js";
3
3
  import api from "../api.js";
4
4
 
5
5
  export function createSearchTool(): AnyAgentTool {
@@ -1,5 +1,5 @@
1
1
  import { Type } from "@sinclair/typebox";
2
- import type { AnyAgentTool } from "../../runtime-api.js";
2
+ import type { AnyAgentTool } from "../types.js";
3
3
  import { getSessions, markRead } from "../store.js";
4
4
 
5
5
  export function createSessionGetTool(serverUrl: string): AnyAgentTool {
@@ -1,5 +1,5 @@
1
1
  import { Type } from "@sinclair/typebox";
2
- import type { AnyAgentTool } from "../../runtime-api.js";
2
+ import type { AnyAgentTool } from "../types.js";
3
3
  import api from "../api.js";
4
4
  import { addMessage } from "../store.js";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { Type } from "@sinclair/typebox";
2
- import type { AnyAgentTool } from "../../runtime-api.js";
2
+ import type { AnyAgentTool } from "../types.js";
3
3
  import { getSessions } from "../store.js";
4
4
 
5
5
  export function createSessionsListTool(serverUrl: string): AnyAgentTool {
package/src/types.ts ADDED
@@ -0,0 +1,9 @@
1
+ export type AnyAgentTool = {
2
+ name: string;
3
+ label?: string;
4
+ description?: string;
5
+ parameters?: unknown;
6
+ ownerOnly?: boolean;
7
+ displaySummary?: string;
8
+ execute(id: string, params: Record<string, unknown>): Promise<{ content: Array<{ type: string; text: string }>; [key: string]: unknown }>;
9
+ };
package/tsconfig.json CHANGED
@@ -6,12 +6,8 @@
6
6
  "strict": true,
7
7
  "noEmit": true,
8
8
  "esModuleInterop": true,
9
- "skipLibCheck": true,
10
- "paths": {
11
- "openclaw/plugin-sdk/plugin-entry": ["./stubs/plugin-entry.d.ts"],
12
- "openclaw/plugin-sdk/core": ["./stubs/core.d.ts"]
13
- }
9
+ "skipLibCheck": true
14
10
  },
15
11
  "include": ["**/*.ts"],
16
- "exclude": ["node_modules", "stubs"]
12
+ "exclude": ["node_modules"]
17
13
  }
package/runtime-api.ts DELETED
@@ -1,9 +0,0 @@
1
- export { definePluginEntry } from "openclaw/plugin-sdk";
2
- export type {
3
- AnyAgentTool,
4
- OpenClawPluginApi,
5
- OpenClawPluginToolContext,
6
- OpenClawPluginToolFactory,
7
- OpenClawPluginService,
8
- OpenClawPluginServiceContext,
9
- } from "openclaw/plugin-sdk";
package/stubs/core.d.ts DELETED
@@ -1,58 +0,0 @@
1
- export { definePluginEntry } from "../stubs/plugin-entry.js";
2
-
3
- export type AnyAgentTool = {
4
- name: string;
5
- label?: string;
6
- description?: string;
7
- parameters?: unknown;
8
- ownerOnly?: boolean;
9
- displaySummary?: string;
10
- execute(id: string, params: Record<string, unknown>): Promise<{ content: Array<{ type: string; text: string }>; [key: string]: unknown }>;
11
- };
12
-
13
- export type PluginLogger = {
14
- debug?: (message: string) => void;
15
- info: (message: string) => void;
16
- warn: (message: string) => void;
17
- error: (message: string) => void;
18
- };
19
-
20
- export type OpenClawPluginServiceContext = {
21
- config: unknown;
22
- workspaceDir?: string;
23
- stateDir: string;
24
- logger: PluginLogger;
25
- };
26
-
27
- export type OpenClawPluginService = {
28
- id: string;
29
- start: (ctx: OpenClawPluginServiceContext) => void | Promise<void>;
30
- stop?: (ctx: OpenClawPluginServiceContext) => void | Promise<void>;
31
- };
32
-
33
- export type OpenClawPluginToolContext = {
34
- config?: unknown;
35
- workspaceDir?: string;
36
- agentDir?: string;
37
- agentId?: string;
38
- sessionKey?: string;
39
- sessionId?: string;
40
- sandboxed?: boolean;
41
- };
42
-
43
- export type OpenClawPluginToolFactory = (ctx: OpenClawPluginToolContext) => AnyAgentTool | AnyAgentTool[] | null | undefined;
44
-
45
- export type OpenClawPluginApi = {
46
- id: string;
47
- name: string;
48
- registrationMode: "full" | "setup-only" | "setup-runtime";
49
- pluginConfig?: Record<string, unknown>;
50
- runtime: Record<string, unknown>;
51
- logger: PluginLogger;
52
- registerTool(tool: AnyAgentTool | OpenClawPluginToolFactory, opts?: { optional?: boolean }): void;
53
- registerService(service: OpenClawPluginService): void;
54
- registerHook(events: string | string[], handler: (...args: unknown[]) => unknown): void;
55
- registerHttpRoute(params: unknown): void;
56
- registerChannel(registration: unknown): void;
57
- registerCommand(command: unknown): void;
58
- };
@@ -1,6 +0,0 @@
1
- export declare function definePluginEntry(def: {
2
- id: string;
3
- name?: string;
4
- description?: string;
5
- register(api: import("./core.js").OpenClawPluginApi): void | Promise<void>;
6
- }): unknown;