@coremail/lunkr-openclaw 1.0.2 → 1.0.4
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 +4 -7
- package/i18n/locales/en-US.json +9 -5
- package/i18n/locales/zh-CN.json +9 -5
- package/index.js +20 -23
- package/package.json +1 -1
- package/skills/lunkr/SKILL.md +33 -1
package/package.json
CHANGED
package/skills/lunkr/SKILL.md
CHANGED
|
@@ -61,14 +61,46 @@ The `lunkr_send_message` tool automatically resolves recipient names to UIDs:
|
|
|
61
61
|
|
|
62
62
|
Other available tools:
|
|
63
63
|
|
|
64
|
+
- `lunkr_send_file` - Send files to a user or group (see below)
|
|
64
65
|
- `lunkr_search_groups` - Search for discussion groups
|
|
65
66
|
- `lunkr_search_contacts` - Search for contacts
|
|
66
67
|
- `lunkr_get_group_info` - Get group details
|
|
67
68
|
- `lunkr_get_user_info` - Get user details
|
|
68
69
|
- `lunkr_list_recent_chats` - List recent conversations
|
|
69
|
-
- `lunkr_download_file` - Download files from messages
|
|
70
|
+
- `lunkr_download_file` - Download files from messages (see below)
|
|
70
71
|
- `lunkr_get_message` - Get specific message details
|
|
71
72
|
|
|
73
|
+
## Sending Files
|
|
74
|
+
|
|
75
|
+
Use `lunkr_send_file` to send one or more files to a user or group:
|
|
76
|
+
|
|
77
|
+
- `to`: recipient (name, email, user ID, or group ID — auto-resolved)
|
|
78
|
+
- `file_paths`: array of **absolute** file paths to send
|
|
79
|
+
- `message`: (optional) text message to accompany the files
|
|
80
|
+
|
|
81
|
+
**Example:** Send two files to a group:
|
|
82
|
+
```
|
|
83
|
+
lunkr_send_file(to="项目组", file_paths=["/tmp/report.pdf", "/tmp/data.xlsx"], message="请查收附件")
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Downloading Files
|
|
87
|
+
|
|
88
|
+
When a user sends a file in a Lunkr message, the inbound message context includes an `Attachments` array. To download a file:
|
|
89
|
+
|
|
90
|
+
1. Get the attachment metadata from the inbound message's `Attachments` field
|
|
91
|
+
2. Call `lunkr_download_file` with parameters extracted from the attachment:
|
|
92
|
+
- `file_id`: the attachment's `fileId` field
|
|
93
|
+
- `uid`: the attachment's `uid` field (e.g. `#833#F`)
|
|
94
|
+
- `file_name`: the attachment's `title` field (REQUIRED for correct Chinese filename encoding)
|
|
95
|
+
- `save_path`: (optional) where to save the file, defaults to temp directory
|
|
96
|
+
|
|
97
|
+
**Example:** Given an attachment `{ "fileId": "abc123", "uid": "#833#F", "title": "报告.docx" }`:
|
|
98
|
+
```
|
|
99
|
+
lunkr_download_file(file_id="abc123", uid="#833#F", file_name="报告.docx")
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Do NOT guess these parameters.** Always extract them from the message attachment metadata.
|
|
103
|
+
|
|
72
104
|
## Recipient Formats
|
|
73
105
|
|
|
74
106
|
The `to` parameter in `/lunkr-send` accepts:
|