@coremail/lunkr-openclaw 1.0.9 → 1.1.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/bin/lunkr-cli.js +30 -22
- package/i18n/locales/en-US.json +60 -1
- package/i18n/locales/zh-CN.json +60 -1
- package/index.js +90 -43
- package/openclaw.plugin.json +23 -6
- package/package.json +2 -2
- package/skills/lunkr/SKILL.md +21 -5
package/openclaw.plugin.json
CHANGED
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dmPolicy": {
|
|
19
19
|
"type": "string",
|
|
20
|
-
"enum": ["
|
|
21
|
-
"default": "
|
|
20
|
+
"enum": ["open", "allowlist", "disabled"],
|
|
21
|
+
"default": "open"
|
|
22
22
|
},
|
|
23
23
|
"allowFrom": {
|
|
24
24
|
"type": "array",
|
|
@@ -27,19 +27,36 @@
|
|
|
27
27
|
},
|
|
28
28
|
"groupPolicy": {
|
|
29
29
|
"type": "string",
|
|
30
|
-
"enum": ["allowlist", "
|
|
31
|
-
"default": "
|
|
30
|
+
"enum": ["open", "allowlist", "disabled"],
|
|
31
|
+
"default": "open"
|
|
32
32
|
},
|
|
33
33
|
"groups": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": { "type": "string" },
|
|
36
|
+
"default": []
|
|
37
|
+
},
|
|
38
|
+
"discussions": {
|
|
34
39
|
"type": "object",
|
|
35
40
|
"additionalProperties": {
|
|
36
41
|
"type": "object",
|
|
37
42
|
"properties": {
|
|
38
|
-
"
|
|
39
|
-
"
|
|
43
|
+
"enabled": { "type": "boolean" },
|
|
44
|
+
"policy": { "type": "string", "enum": ["open", "allowlist", "disabled"] },
|
|
45
|
+
"allowFrom": { "type": "array", "items": { "type": "string" } },
|
|
46
|
+
"requireMention": { "type": "boolean" }
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
49
|
},
|
|
50
|
+
"groupTypeRules": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"policy": { "type": "string", "enum": ["disabled", "mentionOnly", "open"] }
|
|
56
|
+
},
|
|
57
|
+
"required": ["policy"]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
43
60
|
"botDiscussions": {
|
|
44
61
|
"type": "object",
|
|
45
62
|
"additionalProperties": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coremail/lunkr-openclaw",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "OpenClaw Lunkr/Coremail channel plugin",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"commander": "^12.0.0",
|
|
22
22
|
"fast-xml-parser": "^5.0.0",
|
|
23
23
|
"https-proxy-agent": "^7.0.6",
|
|
24
|
-
"qrcode
|
|
24
|
+
"qrcode": "^1.5.0",
|
|
25
25
|
"uuid": "^11.0.0",
|
|
26
26
|
"ws": "^8.18.0"
|
|
27
27
|
},
|
package/skills/lunkr/SKILL.md
CHANGED
|
@@ -61,14 +61,15 @@ The `lunkr_send_message` tool automatically resolves recipient names to UIDs:
|
|
|
61
61
|
|
|
62
62
|
Other available tools:
|
|
63
63
|
|
|
64
|
+
- `lunkr_list_messages` - List chat history for a conversation (includes attachments)
|
|
65
|
+
- `lunkr_get_message` - Get specific message details (includes attachments)
|
|
64
66
|
- `lunkr_send_file` - Send files to a user or group (see below)
|
|
67
|
+
- `lunkr_download_file` - Download files from messages (see below)
|
|
65
68
|
- `lunkr_search_groups` - Search for discussion groups
|
|
66
69
|
- `lunkr_search_contacts` - Search for contacts
|
|
67
70
|
- `lunkr_get_group_info` - Get group details
|
|
68
71
|
- `lunkr_get_user_info` - Get user details
|
|
69
72
|
- `lunkr_list_recent_chats` - List recent conversations
|
|
70
|
-
- `lunkr_download_file` - Download files from messages (see below)
|
|
71
|
-
- `lunkr_get_message` - Get specific message details
|
|
72
73
|
|
|
73
74
|
## Sending Files
|
|
74
75
|
|
|
@@ -90,17 +91,32 @@ When a user sends a file in a Lunkr message, the inbound message context include
|
|
|
90
91
|
1. Get the attachment metadata from the inbound message's `Attachments` field
|
|
91
92
|
2. Call `lunkr_download_file` with parameters extracted from the attachment:
|
|
92
93
|
- `file_id`: the attachment's `fileId` field
|
|
93
|
-
- `uid`: the attachment's `uid` field (e.g. `#
|
|
94
|
+
- `uid`: the attachment's `uid` field (e.g. `#835#U` for DM, group UID for groups)
|
|
94
95
|
- `file_name`: the attachment's `title` field (REQUIRED for correct Chinese filename encoding)
|
|
95
96
|
- `save_path`: (optional) where to save the file, defaults to temp directory
|
|
96
97
|
|
|
97
|
-
**Example:** Given an attachment `{ "fileId": "abc123", "uid": "#
|
|
98
|
+
**Example:** Given an attachment `{ "fileId": "abc123", "uid": "#835#U", "title": "报告.docx" }`:
|
|
98
99
|
```
|
|
99
|
-
lunkr_download_file(file_id="abc123", uid="#
|
|
100
|
+
lunkr_download_file(file_id="abc123", uid="#835#U", file_name="报告.docx")
|
|
100
101
|
```
|
|
101
102
|
|
|
102
103
|
**Do NOT guess these parameters.** Always extract them from the message attachment metadata.
|
|
103
104
|
|
|
105
|
+
## Listing Chat History
|
|
106
|
+
|
|
107
|
+
Use `lunkr_list_messages` to retrieve conversation history, including messages with attachments:
|
|
108
|
+
|
|
109
|
+
- `to`: recipient (name, email, UID, or group ID — auto-resolved)
|
|
110
|
+
- `limit`: max messages to return (default: 20)
|
|
111
|
+
|
|
112
|
+
In **agent-role DM** context (when the channel invokes tools), `to` is automatically set to the current conversation partner — you do not need to provide it.
|
|
113
|
+
|
|
114
|
+
Returned messages include an `attachments` array. Each attachment has:
|
|
115
|
+
- `file_id`: use with `lunkr_download_file`
|
|
116
|
+
- `uid`: storage owner UID (e.g. `#835#U`)
|
|
117
|
+
- `title`: filename
|
|
118
|
+
- `content_type`, `file_size`
|
|
119
|
+
|
|
104
120
|
## Recipient Formats
|
|
105
121
|
|
|
106
122
|
The `to` parameter in `/lunkr-send` accepts:
|