clawsocial-plugin 1.6.0 → 1.6.1
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/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/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.1",
|
|
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": "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
|
-
}
|