@lansenger-pm/openclaw-lansenger-channel 3.0.0 → 3.0.2

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/README.fr.md CHANGED
@@ -372,7 +372,10 @@ Les mises à jour de statut d'approbation utilisent le format DynamicMsg appCard
372
372
 
373
373
  ## Journal des modifications
374
374
 
375
- - **v2.9.11** — Adaptateur de statut (probeAccount / buildChannelSummary / buildAccountSnapshot) ; `channels status --probe` affiche « configured » et « works » ; repli sur variables d'environnement pour les identifiants (LANSENGER_APP_ID / LANSENGER_APP_SECRET / LANSENGER_API_GATEWAY_URL)
375
+ - **v3.0.0** — Ajout de `lansenger_send_format_text` (Markdown + @mention) ; réécriture SKILL.md (format arbre de décision, correction headStatusInfo description+colour description supporte div-style pour couleur, couleur est la couleur du point) ; suppression du code de debug ; mise à jour manifest contracts
376
+ - **v2.10.0** — Conversion automatique px→pt pour appCard ; classification erreurs sendImageUrl ; journalisation info pour inscription outils
377
+ - **v2.9.12** — Suppression `defaultAccount` ; uiHints (labels chinois) ; nettoyage README (5 langues)
378
+ - **v2.9.11** — Adaptateur de statut ; repli sur variables d'environnement ; `channels status --probe` affiche « configured » et « works »
376
379
  - **v2.8.1** — Correction README : flux d'installation 4 étapes ; SKILL.md frontmatter (spec AgentSkills) ; identifiant de canal en minuscules `lansenger`
377
380
  - **v2.8.0** — Routage multi-agent OpenClaw `bindings[]` ; groupPolicy/groupAllowFrom/groups contrôle d'accès groupe
378
381
  - **v2.7.0** — Enregistrement outils comme objets simples ; état runtime pour client/target
package/README.md CHANGED
@@ -364,7 +364,10 @@ Approval status updates use the DynamicMsg appCard format. The `updateCardStatus
364
364
 
365
365
  ## Changelog
366
366
 
367
- - **v2.9.11** — Add status adapter (probeAccount / buildChannelSummary / buildAccountSnapshot); `channels status --probe` shows "configured" and "works"; env var fallback for credentials (LANSENGER_APP_ID / LANSENGER_APP_SECRET / LANSENGER_API_GATEWAY_URL)
367
+ - **v3.0.0** — Add `lansenger_send_format_text` tool (Markdown + @mention); rewrite SKILL.md (decision tree format, fix headStatusInfo description+colour semantics description supports div-style for color, colour is dot color); remove debug code; update manifest contracts
368
+ - **v2.10.0** — font-size px→pt auto-conversion in appCard; sendImageUrl error classification; tool registration info-level logging
369
+ - **v2.9.12** — Removed `defaultAccount`; uiHints (Chinese labels); README cleanup (5 locales)
370
+ - **v2.9.11** — Add status adapter; env var fallback for credentials; `channels status --probe` shows "configured" and "works"
368
371
  - **v2.8.1** — Fix README: proper 4-step install flow; SKILL.md frontmatter (AgentSkills spec); channel identifier to lowercase `lansenger`
369
372
  - **v2.8.0** — OpenClaw `bindings[]` multi-agent routing; groupPolicy/groupAllowFrom/groups access control
370
373
  - **v2.7.0** — Plain-object tool registration; runtime state for client/target
package/README.zhHans.md CHANGED
@@ -372,7 +372,10 @@ Agent 路由由 OpenClaw 的 `bindings[]` 配置管理——见[多 Agent 路由
372
372
 
373
373
  ## 更新日志
374
374
 
375
- - **v2.9.11** — 新增状态适配器(probeAccount / buildChannelSummary / buildAccountSnapshot);`channels status --probe` 显示"configured"和"works";环境变量回退支持凭证(LANSENGER_APP_ID / LANSENGER_APP_SECRET / LANSENGER_API_GATEWAY_URL)
375
+ - **v3.0.0** — 新增 `lansenger_send_format_text` 工具(Markdown + @提及);重写 SKILL.md(决策树格式,修正 headStatusInfo description+colour 语义——description 支持 div-style 标颜色,colour 是圆点颜色);移除调试代码;更新 manifest contracts
376
+ - **v2.10.0** — appCard font-size px→pt 自动转换;sendImageUrl 错误分类;工具注册 info 级别日志
377
+ - **v2.9.12** — 移除 `defaultAccount`;uiHints(中文标签);README 精简(5 语言)
378
+ - **v2.9.11** — 新增状态适配器;环境变量回退支持凭证;`channels status --probe` 显示"configured"和"works"
376
379
  - **v2.8.1** — 修复 README:4 步安装流程;SKILL.md frontmatter(AgentSkills 规范);频道标识符改为小写 `lansenger`
377
380
  - **v2.8.0** — OpenClaw `bindings[]` 多 Agent 路由;groupPolicy/groupAllowFrom/groups 群聊准入控制
378
381
  - **v2.7.0** — 纯对象工具注册;运行时状态获取 client/target
package/README.zhHant.md CHANGED
@@ -372,7 +372,10 @@ Agent 路由由 OpenClaw 的 `bindings[]` 設定管理——見[多 Agent 路由
372
372
 
373
373
  ## 更新日誌
374
374
 
375
- - **v2.9.11** — 新增狀態適配器(probeAccount / buildChannelSummary / buildAccountSnapshot);`channels status --probe` 顯示「configured」和「works」;環境變數回退支援憑證(LANSENGER_APP_ID / LANSENGER_APP_SECRET / LANSENGER_API_GATEWAY_URL)
375
+ - **v3.0.0** — 新增 `lansenger_send_format_text` 工具(Markdown + @提及);重寫 SKILL.md(決策樹格式,修正 headStatusInfo description+colour 語義——description 支援 div-style 標顏色,colour 是圓點顏色);移除除錯代碼;更新 manifest contracts
376
+ - **v2.10.0** — appCard font-size px→pt 自動轉換;sendImageUrl 錯誤分類;工具註冊 info 級別日誌
377
+ - **v2.9.12** — 移除 `defaultAccount`;uiHints(中文標籤);README 精簡(5 語言)
378
+ - **v2.9.11** — 新增狀態適配器;環境變數回退支援憑證;`channels status --probe` 顯示「configured」和「works」
376
379
  - **v2.8.1** — 修復 README:4 步安裝流程;SKILL.md frontmatter(AgentSkills 規範);頻道識別符改為小寫 `lansenger`
377
380
  - **v2.8.0** — OpenClaw `bindings[]` 多 Agent 路由;groupPolicy/groupAllowFrom/groups 羣聊准入控制
378
381
  - **v2.7.0** — 純物件工具註冊;運行時狀態取得 client/target
@@ -374,7 +374,10 @@ Agent 路由由 OpenClaw 的 `bindings[]` 設定管理——見[多 Agent 路由
374
374
 
375
375
  ## 更新日誌
376
376
 
377
- - **v2.9.11** — 新增狀態適配器(probeAccount / buildChannelSummary / buildAccountSnapshot);`channels status --probe` 顯示「configured」和「works」;環境變數回退支援憑證(LANSENGER_APP_ID / LANSENGER_APP_SECRET / LANSENGER_API_GATEWAY_URL)
377
+ - **v3.0.0** — 新增 `lansenger_send_format_text` 工具(Markdown + @提及);重寫 SKILL.md(決策樹格式,修正 headStatusInfo description+colour 語義——description 支援 div-style 標顏色,colour 是圓點顏色);移除除錯代碼;更新 manifest contracts
378
+ - **v2.10.0** — appCard font-size px→pt 自動轉換;sendImageUrl 錯誤分類;工具註冊 info 級別日誌
379
+ - **v2.9.12** — 移除 `defaultAccount`;uiHints(中文標籤);README 精簡(5 語言)
380
+ - **v2.9.11** — 新增狀態適配器;環境變數回退支援憑證;`channels status --probe` 顯示「configured」和「works」
378
381
  - **v2.8.1** — 修復 README:4 步安裝流程;SKILL.md frontmatter(AgentSkills 規範);頻道識別符改為小寫 `lansenger`
379
382
  - **v2.8.0** — OpenClaw `bindings[]` 多 Agent 路由;groupPolicy/groupAllowFrom/groups 羣聊准入控制
380
383
  - **v2.7.0** — 純物件工具註冊;運行時狀態取得 client/target
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lansenger-pm/openclaw-lansenger-channel",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -1,227 +1,190 @@
1
1
  ---
2
2
  name: lansenger-messaging
3
- description: How to communicate on Lansenger (蓝信) — choose the right tool, when, send rich content, and pitfalls
3
+ description: How to communicate on Lansenger (蓝信) — choose the right tool, when, and send rich content, and approvals, and pitfalls
4
4
  metadata: {"openclaw":{"requires":{"config":["channels.lansenger"]},"primaryEnv":"LANSENGER_APP_ID"}}
5
5
  ---
6
6
 
7
+ ```
8
+
7
9
  # Lansenger (蓝信) Messaging — Agent Quick Reference
8
10
 
9
- You are on Lansenger. This skill tells you **what tool to use, when, and how**.
11
+ You`
10
12
 
11
- > ⚠️ This is reference documentation, NOT a CLI command. `openclaw skill lansenger-messaging` does not exist. Use the agent tools listed below directly.
13
+ a Lansenger session, **just write your reply normally** Markdown renders automatically as formatText. No tool needed for formatted text unless you also need @mentions.
12
14
 
13
- ---
15
+ However, Markdown and file attachments are **mutually exclusive**. If you need both formatting AND a file, send the Markdown reply first, then call `lansenger_send_file` separately.
16
+ Never put raw Markdown in lansenger_send_text — itansenger_send_format_text — it displays shows as ugly source code.
14
17
 
15
- ## Quick Decision: What Tool Do I Use?
16
- ```
17
- Need to send something? Follow this decision tree:
18
+ > ⚠️ This is reference documentation, NOT a CLI command. `openclaw skill lansenger-messaging` does not exist. Use the agent tools directly.
18
19
 
19
- 1. Normal reply with formatting (bold, lists, code, tables) → JUST WRITE IT. Markdown renders automatically. No tool needed.
20
- 2. Need Markdown + @mention someone → lansenger_send_format_text (with reminder)
21
- 3. Need plain text + @mention + file → lansenger_send_text (with reminder + filePath)
22
- 4. Need just a FILE (any local file) → lansenger_send_file
23
- 5. Need image from URL → lansenger_send_image_url
24
- 6. Need a link card → lansenger_send_link_card
25
- 7. Need multi-article card (图文) → lansenger_send_app_articles
26
- 8. Need a rich formatted card → lansenger_send_app_card
27
- 9. Need approval workflow → lansenger_send_app_card (isDynamic=true) → update via lansenger_update_dynamic_card
28
- 10. Need to revoke a message → lansenger_revoke_message
29
- 11. Need group IDs → lansenger_query_groups
30
- ```
31
- > ⚠️ Group chat: appCard/linkCard/appArticles/formatText may be rejected by API. Fall back to lansenger_send_text.
32
- ```
33
- ---
34
-
35
- ## #1 Rule: Markdown Is Automatic
36
- In a Lansenger session, **just write your reply normally** — Markdown is automatically rendered as formatText. You never need to call a tool for formatted text unless you also need @mentions.
37
-
38
- However: Markdown and file attachments are **mutually exclusive**. If you need both formatting AND a file, send the Markdown reply first, then call `lansenger_send_file separately.
39
- Never put raw Markdown in lansenger_send_text — it displays as ugly source code.
20
+ ## Quick Decision: What Tool Do I Use?
40
21
 
41
- ---
22
+ Need to send something? Follow this decision tree:
23
+ 1. Normal reply with formatting → JUST WRITE IT. No tool needed.
24
+ 2. Markdown + @mention → lansenger_send_format_text (with reminder)
25
+ 3. Plain text + @mention + file → lansenger_send_text (with reminder + filePath)
26
+ 4. Send a FILE → lansenger_send_file
27
+ 5. Send image from URL → lansenger_send_image_url
28
+ 6. Link card → lansenger_send_link_card
29
+ 7. Multi-article card (图文) → lansenger_send_app_articles
30
+ 8. Rich formatted card → lansenger_send_app_card
31
+ 9. Approval workflow → lansenger_send_app_card (isDynamic=true), → update via lansenger_update_dynamic_card
32
+ 10. Revoke a message → lansenger_revoke_message
33
+ 11. Find group IDs → lansenger_query_groups
34
+
35
+ > ⚠️ **Group chat**: appCard/linkCard/appArticles/formatText may be rejected by API. Fall back to lansenger_send_text.
42
36
 
43
37
  ## Message Type Capability Matrix
44
- ```
45
- ┌──────────────┬──────────────┬──────────────┬──────────────┐
46
- Type │ Markdown │ @mention │ Attachments
47
- ├──────────────┼──────────────┼──────────────┼──────────────┤
48
- │ formatText │ ✓ (auto) │ ✓ (reminder)│ ✗ │
49
- │ text │ ✗ │ ✓ │ ✓ │
50
- └──────────────┴──────────────┴──────────────┴──────────────┘
51
- ```
52
- - formatText: default outbound type. Markdown renders automatically. Also supports @mentions via `reminder` param (auto-fallback if API rejects). No file attachments.
53
- - text: plain text only. Supports @mentions + file attachments. No Markdown rendering.
38
+ | Type | Markdown | @mention | Attachments |
39
+ |----------|----------|----------|------------|
40
+ | formatText | ✓ (auto) | ✓ (reminder) | ✗ |
41
+ | text | ✗ | ✓ | ✓ |
54
42
 
43
+ - formatText: Markdown renders, supports @mention via reminder param (auto-fallback if API rejects). No file attachments.
44
+ - text: Plain text only. Supports @mention + file attachment. No Markdown rendering.
55
45
  - These two types are **mutually exclusive** — pick one based on what you need.
56
- ```
57
- ---
58
46
 
59
47
  ## Tool Reference
60
- All tools accept optional `to` (chatId). Leave empty to auto-detect current conversation. Only fill for different chat. chatId is case-sensitive.
61
- ```
62
- How to get chatId: Inbound message senderId/conversationId. Never truncate or modify a chatId.
63
-
64
- ```
65
- ---
66
-
48
+ All tools accept optional `to` (chatId). Leave empty to auto-detect current conversation. Only fill for different chat. chatId is case-sensitive — never truncate or modify.
67
49
  ### lansenger_send_file
68
- | Param | Required | Description |
69
- |-------|----------|-------------|
70
- | filePath | ✅ | Absolute local path (workspace, /tmp, Desktop, etc.) |
71
- | caption | ❌ | Plain-text caption (no Markdown) |
72
- | to | ❌ | Target chatId (auto if omitted) |
73
- > Use this instead of MEDIA: tags for non-workspace files. MEDIA: silently fails outside workspace.
50
+ | Param | Type | Required | Description |
51
+ |---------|----------|----------|-------------|
52
+ | filePath | string | Absolute local path (workspace, /tmp, Desktop, etc.) |
53
+ | caption | string | Plain-text caption (no Markdown) |
54
+ | to | string | Target chatId (auto if omitted) |
55
+
56
+ > ⚠️ **MEDIA: tags currently broken** — they silently fail for ALL files, not just workspace ones Use lansenger_send_file for every file attachment.
74
57
 
75
58
  ### lansenger_send_text
76
- | Param | Required | Description |
77
- |-------|----------|-------------|
78
- | content | ✅ | Plain text only (NO Markdown) |
79
- | filePath | ❌ | Optional file to attach (content becomes caption) |
80
- | to | ❌ | Target chatId |
81
- | reminderAll | ❌ | @mention all members (group only) |
82
- | reminderUserIds | | @mention specific users (group only) |
59
+ | Param | Type | Required | Description |
60
+ |---------|----------|----------|-------------|
61
+ | content | string | Plain text only (NO Markdown) |
62
+ | filePath | string | Optional file to attach (content becomes caption) |
63
+ | to | string | Target chatId |
64
+ | reminderAll | boolean | @mention all members (group only) |
65
+ | reminderUserIds | string[] | ❌ | @mention specific users (group only) |
83
66
 
84
67
  ### lansenger_send_format_text
85
- | Param | Required | Description |
86
- |-------|----------|-------------|
87
- | content | ✅ | Markdown text |
88
- | to | ❌ | Target chatId |
89
- | reminderAll | ❌ | @mention all (group only) |
90
- | reminderUserIds | | @mention specific users (group only) |
68
+ | Param | Type | Required | Description |
69
+ |---------|----------|----------|-------------|
70
+ | content | string | Markdown text |
71
+ | to | string | Target chatId |
72
+ | reminderAll | boolean | @mention all (group only) |
73
+ | reminderUserIds | string[] | ❌ | @mention specific users (group only) |
91
74
 
92
75
  > Use when you need Markdown + @mention. No file attachments. Plugin auto-fallback if API rejects reminder.
93
76
 
94
- Always include "@姓名" in text when mentioning someone.
95
-
77
+ > Always include "@姓名" in text when mentioning someone.
96
78
  ### lansenger_send_image_url
97
- | Param | Required | Description |
98
- |-------|----------|-------------|
99
- | imageUrl | ✅ | Directly reachable image URL |
100
- | caption | ❌ | Plain-text caption (no Markdown) |
101
- | to | ❌ | Target chatId |
102
-
103
- > URL must be reachable from gateway host. For local files use lansenger_send_file.
79
+ | Param | Type | Required | Description |
80
+ |---------|----------|----------|-------------|
81
+ | imageUrl | string | Directly reachable image URL |
82
+ | caption | string | Plain-text caption (no Markdown) |
83
+ | to | string | Target chatId |
104
84
 
85
+ > URL must be reachable from the gateway host. For local files, use lansenger_send_file.
105
86
  ### lansenger_send_link_card
106
- | Param | Required | Description |
107
- |-------|----------|-------------|
108
- | title | ✅ | Card title |
109
- | link | ✅ | Click-through URL |
110
- | description | ❌ | Card description (API-required, defaults empty) |
111
- | iconLink | ❌ | Icon URL (defaults empty) |
112
- | fromName | ❌ | Source name (defaults empty) |
113
- | fromIconLink | ❌ | Source icon URL (defaults empty) |
114
- | to | ❌ | Target chatId |
115
-
87
+ | Param | Type | Required | Description |
88
+ |---------|----------|----------|-------------|
89
+ | title | string | Card title |
90
+ | link | string | Click-through URL |
91
+ | description | string | Card description (API-required, defaults empty) |
92
+ | iconLink | string | Icon URL (defaults empty) |
93
+ | pcLink | string | PC client link |
94
+ | fromName | string | Source name (defaults empty) |
95
+ | fromIconLink | string | Source icon URL (defaults empty) |
96
+ | to | string ❌ | Target chatId |
116
97
  ### lansenger_send_app_articles
117
- | Param | Required | Description |
118
- |-------|----------|-------------|
119
- | articles | | Each: { imgUrl, title, url, summary? } |
120
- | to | ❌ | Target chatId |
98
+ | Param | Type | Required | Description |
99
+ |---------|----------|----------|-------------|
100
+ | articles | object[] | ✅ | Each: { imgUrl, title, url, summary?, pcUrl? } |
101
+ | to | string | Target chatId |
121
102
 
122
103
  > ⚠️ Article summary field is `summary`, NOT `description`. `description` is silently ignored.
123
-
124
104
  ### lansenger_send_app_card
125
- | Param | Required | Description |
126
- |-------|----------|-------------|
127
- | bodyTitle | ✅ | Card title (supports div-style) |
128
- | headTitle | ❌ | Header title |
129
- | bodyContent | ❌ | Content (supports div-style) |
130
- | isDynamic | ❌ | Enable approval workflow (default: false) |
131
- | headStatusInfo | ❌ | { description, colour } — description is status TEXT (supports div-style for color, e.g. `<div style="color:#FFB116">待审批</div>`, max 30 bytes), colour is the DOT/圆点 color (hex, e.g. #FFB116). These are TWO different things: text color vs dot color. |
132
- | fields | ❌ | Key-value pairs (max 10) |
133
- | links | ❌ | Links (max 3) |
134
- | to | ❌ | Target chatId |
105
+ | Param | Type | Required | Description |
106
+ |---------|----------|----------|-------------|
107
+ | bodyTitle | string | Card title (supports div-style) |
108
+ | headTitle | string | Header title |
109
+ | bodySubTitle | string | Subtitle (supports div-style) |
110
+ | bodyContent | string | Main content (supports div-style) |
111
+ | signature | string | Footer signature |
112
+ | isDynamic | boolean | Enable approval workflow (default: false) |
113
+ | headStatusInfo | object | { description, colour } — description: status TEXT (supports div-style for color, e.g. `<div style="color:#FFB116">待审批</div>`, max 30 bytes), colour: DOT/圆点 color (hex e.g. #FFB116). They are TWO different things: text color vs dot color. |
114
+ | fields | object[] | ❌ | Key-value pairs (max 10) |
115
+ | links | object[] | ❌ | Links (max 3): { title, url } |
116
+ | cardLink | string ❌ | Card click-through link |
117
+ | staffId | string ❌ | Staff openId for sender avatar |
118
+ | headIconUrl | string ❌ | Header icon URL |
119
+ | to | string ❌ | Target chatId |
135
120
 
136
121
  > ⚠️ **Group chat does NOT support appCard** — falls back to plain text. Approval workflows won't work in group chat.
137
122
 
138
- ```
139
- ---
140
-
141
- div-style formatting rules:
123
+ **div-style rules:**
142
124
  - `color`: hex (e.g. #333, #007BFF)
143
125
  - `font-size`: **MUST use pt** (12pt–36pt). px causes "invalid bodyContent" error.
144
126
  - `text-align`: left, center, right
145
127
  - `text-indent`: **MUST use 0em** — bare 0 causes silent failure
146
- ```
147
128
 
148
129
  Example: `<div style="color:#333;font-size:14pt;text-indent:0em;text-align:left">Content here</div>`
149
- ```
150
- ---
151
-
152
130
  ### lansenger_update_dynamic_card
153
- | Param | Required | Description |
154
- |-------|----------|-------------|
155
- | msgId | ✅ | Message ID from original send_app_card response |
156
- | headStatusInfo | ❌ | { description, colour } — description is text (supports div-style for color; `<div style="color:#198754">已批准</div>`), max 30 bytes. colour is the DOT/圆点 color (hex like #198754). These are TWO different things: text color vs dot color. |
157
- | isLastUpdate | ❌ | True = final state (default: false) |
158
-
159
- > headStatusInfo.description supports div-style for coloring the text. headStatusInfo.colour controls the status dot color. They are independent.
160
-
131
+ | Param | Type | Required | Description |
132
+ |---------|----------|----------|-------------|
133
+ | msgId | string | Message ID from original send_app_card response |
134
+ | headStatusInfo | object | { description, colour } — description: status TEXT (supports div-style for color), colour: DOT/圆点 color (hex). Independent. |
135
+ | links | object[] | ❌ | Updated links (max 3) |
136
+ | isLastUpdate | boolean ❌ | True = final state, card becomes static (default: false) |
137
+
138
+ > Set isLastUpdate=true on final approval decision. Intermediate updates steps: keep isLastUpdate=false.
161
139
  ### lansenger_revoke_message
162
- | Param | Required | Description |
163
- |-------|----------|-------------|
164
- | messageIds | | List of message IDs |
165
- | chatType | ❌ | bot (default) or group |
166
- | senderId | ❌ | Required if chatType=group |
167
-
140
+ | Param | Type | Required | Description |
141
+ |---------|----------|----------|-------------|
142
+ | messageIds | string[] | ✅ | List of message IDs |
143
+ | chatType | string | bot (default) or group |
144
+ | senderId | string | Required if chatType=group |
168
145
  ### lansenger_query_groups
169
- | Param | Required | Description |
170
- |-------|----------|-------------|
171
- | pageOffset | ❌ | Page number (default: 1) |
172
- | pageSize | ❌ | Groups per page (default: 100) |
146
+ | Param | Type | Required | Description |
147
+ |---------|----------|----------|-------------|
148
+ | pageOffset | integer | Page number (default: 1) |
149
+ | pageSize | integer | Groups per page (default: 100) |
173
150
 
174
151
  > ⚠️ May return errCode=10005 "API服务无权限" on enterprise deployments. Ask user for group IDs manually.
175
152
 
176
- ---
177
-
178
153
  ## Approval Workflow Pattern
179
- ```
180
- 1. Send: lansenger_send_app_card(bodyTitle="...", isDynamic=true, headStatusInfo={description: '<div style="color:#FFB116">待审批</div>', colour: "#FFB116"})
154
+ 1. Send: `lansenger_send_app_card(bodyTitle="...", isDynamic=true, headStatusInfo={description: '<div style="color:#FFB116">待审批</div>', colour: "#FFB116"})`
181
155
  2. User approves/denies → OpenClaw processes approval
182
- 3. Update: lansenger_update_dynamic_card(msgId="<from step 1>", headStatusInfo={description: '<div style="color:#198754">已批准</div>', colour: "#198754"}, isLastUpdate=true)
183
- ```
184
- Status colors: #FFB116 (pending), #198754 (approved) #dc3545 (denied)
156
+ 3. Update: `lansenger_update_dynamic_card(msgId="<from step 1>", headStatusInfo={description: '<div style="color:#198754">已批准</div>', colour: "#198754"}, isLastUpdate=true)`
185
157
 
186
- ⚠️ **Approval only works in DM (1:1 chat)** group chat de appCard falls back to plain text.
187
-
188
- ```
189
- ---
158
+ Status colors: #FFB116 (pending), #198754 (approved), #dc3545 (denied)
159
+ > ⚠️ **Approval only works in DM (1:1 chat)** — group chat appCard falls back to plain text.
160
+ > Set `isLastUpdate=true` on final decision. Keep `isLastUpdate=false` for intermediate updates step.
190
161
 
191
162
  ## @Mention Rules
192
- Both formatText and text support @mentions:
193
- - formatText: `reminderAll` + `reminderUserIds` params
194
- - text: `reminderAll` + `reminderUserIds` params
195
-
163
+ Both formatText and text support @mentions via `reminderAll` + `reminderUserIds` params.
196
164
  Two rules:
197
- 1. Always include "@姓名" in message text — reminder sends the push, "@姓名" makes it visible
198
- 2. reminder is optional — use it in group chat when replying to someone so they notice your message
199
-
200
- ---
201
-
165
+ 1. Always include "@姓名" in message text — reminder sends the push notification, "@姓名" makes it visible in message
166
+ 2. reminder is optional — recommended in group chat when replying to someone
202
167
  ## Inbound Messages
203
- | Type | What you see |
168
+ | Type | What you see |
204
169
  |------|-------------|
205
170
  | text | Plain text |
206
171
  | formatText | Markdown text |
207
172
  | image | [Image] + local file paths |
208
- | video | [Video] + local file paths |
209
- | file | [File] + local file paths |
173
+ | video | [Video] + local file path |
174
+ | file | [File] + local file path |
210
175
  | voice | [Voice] + local file path |
211
176
  | position | [Location] name address lat,long |
212
177
  | card | [Contact Card] staffId |
213
-
214
- ---
215
-
178
+ | sticker | [Sticker] stickerId |
216
179
  ## Common Pitfalls
217
180
  | Pitfall | Fix |
218
181
  |---------|-----|
219
182
  | Raw Markdown in text tool | Never do this — shows as ugly source code. Write normally for Markdown. |
220
- | MEDIA: tag for non-workspace file | Use lansenger_send_file. MEDIA: silently fails outside workspace. |
183
+ | MEDIA: tag for file delivery | ⚠️ Currently broken for ALL files. Use lansenger_send_file for every file attachment. |
221
184
  | AppArticles `description` field | Use `summary`, not `description`. `description` is ignored. |
222
- | AppCard `font-size: 14px` | Use `font-size: 14pt`. px causes "invalid bodyContent". Range: 12pt–36pt. |
223
- | AppCard `text-indent: 0` | Use `text-indent: 0em`. Bare 0 causes silent failure. |
224
- | Dynamic card headStatusInfo div wrapping description SUPPORTS div-style for color. colour is for the dot/圆点 only. They are separate. |
185
+ | AppCard `font-size: px` | Use `pt` units (12pt–36pt). px causes API error. |
186
+ | AppCard `text-indent: 0` | Use `0em` with unit. Bare 0 causes silent failure. |
187
+ | headStatusInfo div wrapping | description supports div-style for color. colour is the DOT/圆点 color only. They are separate. |
225
188
  | Group chat appCard | Falls back to plain text. Approval workflows won't work. Use text + /approve. |
226
- | Message too long | ~4000 character limit. Split long content into multiple messages. |
189
+ | Message too long | ~4000 character limit. Split into multiple messages. |
227
190
  | `openclaw skill` command | Does NOT exist. Use agent tools directly. |