@lansenger-pm/openclaw-lansenger-channel 2.3.1 → 2.3.3

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": "@lansenger-pm/openclaw-lansenger-channel",
3
- "version": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -41,7 +41,7 @@ Lansenger has two outbound text types that cannot be combined:
41
41
 
42
42
  - **Normal replies** → just write Markdown. It's automatically sent as formatText.
43
43
  - **Need @mention** → Markdown won't work. You must use plain text only. If you need both formatting AND @mention, send the formatted content first, then use `lansenger_send_text` for the @mention.
44
- - **Need to attach a file/image/video** → Markdown won't work. Use `lansenger_send_file`. If you need both formatting AND a file, send the Markdown reply first, then call `lansenger_send_file` separately.
44
+ - **Need to attach a file/image/video** → For workspace files, MEDIA: tags work. For external paths, use `lansenger_send_file`. If you need both formatting AND a file, send the Markdown reply first, then call `lansenger_send_file` separately.
45
45
  - **Never put raw Markdown in a plain-text message** — it displays as ugly source code to the user.
46
46
 
47
47
  ## Available Tools
@@ -69,9 +69,13 @@ The plugin auto-routes via `msgTarget(chatId)` — you never need to specify whi
69
69
 
70
70
  **Group API limitation**: The Lansenger group endpoint (4.6.2) officially only supports `text` and `oacard` msgTypes. The plugin routes all msgTypes via msgTarget, but `appCard`, `linkCard`, `appArticles`, `formatText` may be rejected by the API in group context. If a group send fails, try falling back to plain text.
71
71
 
72
- ## Sending Files (CRITICAL)
72
+ ## Sending Files
73
73
 
74
- When you need to send a file to the user, **use `lansenger_send_file`**. Do NOT use `MEDIA:` tags — they only work for workspace files and are silently dropped for any other path.
74
+ Two ways to send files, depending on location:
75
+
76
+ 1. **Workspace files** → MEDIA: tags work fine. The plugin's `delivery.deliver` processes `payload.mediaUrls` and sends them via `client.sendFile`. Just write normally and reference files with MEDIA: syntax.
77
+
78
+ 2. **Non-workspace files** (Documents, Desktop, /tmp, external paths) → MEDIA: tags are silently dropped by `mediaLocalRoots` restrictions. Use `lansenger_send_file` instead:
75
79
 
76
80
  ```
77
81
  lansenger_send_file(filePath=<absolute local path>, caption=<optional plain-text>, to=<optional chatId>)
@@ -80,7 +84,6 @@ lansenger_send_file(filePath=<absolute local path>, caption=<optional plain-text
80
84
  - Any local path works — workspace, Documents, Desktop, /tmp, etc.
81
85
  - `caption` is plain text only (Markdown will NOT render)
82
86
  - If you need both formatted explanation AND a file, send the Markdown reply first, then call `lansenger_send_file` separately
83
- - **NEVER use `MEDIA:` tags** — always use `lansenger_send_file`
84
87
 
85
88
  ## Sending Text with Attachments or @Mentions
86
89
 
@@ -192,10 +195,11 @@ openclaw pairing approve lansenger <code>
192
195
  - **Markdown is default** — write normally, it renders automatically
193
196
  - **Never put Markdown in a plain-text message** — displays as raw source code
194
197
  - **Never put @mentions in a Markdown message** — silently ignored
198
+ - **MEDIA: tags work for workspace files** — for non-workspace paths (Documents, /tmp, etc.), use `lansenger_send_file` instead
195
199
  - **AppArticles uses `description` not `summary`** — the article description field is called `description`, not `summary`
196
200
  - **`text-indent` MUST have units** — bare `0` causes empty API response; use `0em`
197
201
  - **Dynamic cards require `headStatusInfo`** — auto-filled if omitted, but explicit is better
198
- - **Personal bots only** — organization/enterprise bots are NOT supported
202
+ - **Gateway URL is per-environment** — the plugin uses whatever `apiGatewayUrl` is configured (e.g. `https://apigw.lx.qianxin.com` for 奇安信 environments, or `https://open.e.lanxin.cn/open/apigw` for standard Lansenger). All API endpoints are appended to this base URL. Do NOT assume the default gateway — always use the configured value.
199
203
  - **Message length limit** ~4000 characters
200
204
  - **File size limits** depend on organization's Lansenger configuration
201
205
  - **Credentials** in Lansenger Desktop → Contacts → Bots → Personal Bot → ℹ️ icon