@coremail/lunkr-openclaw 1.0.3 → 1.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coremail/lunkr-openclaw",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "OpenClaw Lunkr/Coremail channel plugin",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -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: