@lansenger-pm/openclaw-lansenger-channel 2.8.1 → 2.8.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
@@ -47,23 +47,53 @@ Connecte OpenClaw à Lansenger — une plateforme de messagerie d'entreprise —
47
47
  | `lansenger_revoke_message` | Révoquer un message précédemment envoyé |
48
48
  | `lansenger_query_groups` | Interroger les groupes disponibles |
49
49
 
50
- ## Installation rapide
50
+ ## Installation et Configuration
51
51
 
52
- ### Via OpenClaw CLI (recommandé)
52
+ ### Flux recommandé en 4 étapes
53
53
 
54
54
  ```bash
55
- # 1. Install the plugin
55
+ # 1. Installer le plugin
56
56
  openclaw plugins install @lansenger-pm/openclaw-lansenger-channel
57
57
 
58
- # 2. Copy to extensions directory (required due to OpenClaw CLI discovery bug)
59
- mkdir -p ~/.openclaw/extensions/lansenger
60
- cp -r ~/.openclaw/npm/node_modules/@lansenger-pm/openclaw-lansenger-channel/* \
61
- ~/.openclaw/extensions/lansenger/
58
+ # 2. Activer le plugin (si non auto-activé)
59
+ openclaw config set plugins.entries.Lansenger.enabled true
62
60
 
63
- # 3. Restart gateway
61
+ # 3. Configurer le canal (assistant interactif)
62
+ openclaw channels add --channel Lansenger
63
+ # OU non-interactif :
64
+ openclaw channels add --channel Lansenger --token "appId:appSecret"
65
+
66
+ # 4. Redémarrer la passerelle
67
+ openclaw gateway restart
68
+ ```
69
+
70
+ Les métadonnées `openclaw.install` dans `package.json` (`npmSpec`, `localPath`, `defaultChoice`) permettent l'**installation à la demande** : si un utilisateur exécute `openclaw channels add --channel Lansenger` avant que le plugin soit installé, OpenClaw peut l'installer automatiquement.
71
+
72
+ > **Passerelle personnalisée** : pour les déploiements entreprise (ex. 奇安信), configurez `apiGatewayUrl` dans `openclaw.json` ou via les variables d'environnement après la configuration — voir [Configuration optionnelle](#configuration-optionnelle).
73
+
74
+ ### Installation de développement (lien local)
75
+
76
+ ```bash
77
+ cd /path/to/openclaw-lansenger-channel
78
+ npm install
79
+ openclaw plugins install --link
64
80
  openclaw gateway restart
65
81
  ```
66
82
 
83
+ ### Obtenir les identifiants
84
+
85
+ **Lansenger Desktop** → **Contacts** → **Bots** → **Personal Bots** → cliquer sur l'icône **ℹ️**
86
+
87
+ > ⚠️ **Le client mobile ne permet PAS de voir les identifiants.** Utilisez uniquement le client desktop.
88
+
89
+ ### Premier message
90
+
91
+ Après le redémarrage, le bot se connecte automatiquement via WebSocket. Envoyez un DM au bot — vous recevrez un code de pairage. Approuvez-le :
92
+
93
+ ```bash
94
+ openclaw pairing approve Lansenger <code>
95
+ ```
96
+
67
97
  > ⚠️ Step 2 is required because `openclaw channels add` only discovers plugins in the `extensions/` directory, not from npm-installed packages. This is an [OpenClaw upstream bug](https://docs.openclaw.ai), not a plugin issue.
68
98
 
69
99
  ### Via npm
@@ -112,7 +142,7 @@ Obtenir les identifiants : **Lansenger Desktop** → **Contacts** → **Bots**
112
142
  Après le redémarrage, le bot se connecte automatiquement via WebSocket. Envoyez un DM au bot — vous recevrez un code de pairage. Approuvez-le :
113
143
 
114
144
  ```bash
115
- openclaw pairing approve lansenger <code>
145
+ openclaw pairing approve Lansenger <code>
116
146
  ```
117
147
 
118
148
  ## Configuration
@@ -138,11 +168,11 @@ Ajoutez ces variables à `~/.openclaw/.env` ou à votre environnement :
138
168
  ```json
139
169
  {
140
170
  "channels": {
141
- "lansenger": {
171
+ "Lansenger": {
142
172
  "appId": "your-appid",
143
173
  "appSecret": "your-secret",
144
174
  "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
145
- "homeChannel": "lansenger",
175
+ "homeChannel": "Lansenger",
146
176
  "enabled": true,
147
177
  "allowFrom": ["your-appid"],
148
178
  "dmSecurity": "paired",
@@ -174,15 +204,13 @@ Ajoutez ces variables à `~/.openclaw/.env` ou à votre environnement :
174
204
 
175
205
  ### Configuration multi-bot
176
206
 
177
- > ⚠️ `openclaw channels add` ne supporte qu'un seul compte et **remplace** le précédent à chaque exécution. Pour ajouter plusieurs bots, utilisez `openclaw config set` avec la structure `accounts`.
178
-
179
- Après avoir ajouté le premier compte via `channels add`, ajoutez des bots supplémentaires avec `openclaw config set` :
207
+ Pour ajouter plusieurs bots, utilisez `openclaw config set` avec la structure `accounts` :
180
208
 
181
209
  ```bash
182
210
  # Ajouter un deuxième bot (remplacez appid/appsecret/gateway par vos valeurs)
183
- openclaw config set channels.lansenger.accounts.your-appid-2.appId "your-appid-2"
184
- openclaw config set channels.lansenger.accounts.your-appid-2.appSecret "your-appsecret"
185
- openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
211
+ openclaw config set channels.Lansenger.accounts.your-appid-2.appId "your-appid-2"
212
+ openclaw config set channels.Lansenger.accounts.your-appid-2.appSecret "your-appsecret"
213
+ openclaw config set channels.Lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
186
214
 
187
215
  # Redémarrer pour appliquer
188
216
  openclaw gateway restart
@@ -193,7 +221,7 @@ Structure de configuration résultante :
193
221
  ```json
194
222
  {
195
223
  "channels": {
196
- "lansenger": {
224
+ "Lansenger": {
197
225
  "appId": "your-appid-2",
198
226
  "appSecret": "...",
199
227
  "dmSecurity": "paired",
@@ -254,14 +282,14 @@ Utilisez `bindings` pour router les DM Lansenger ou les conversations de groupe
254
282
  {
255
283
  agentId: "agent-a",
256
284
  match: {
257
- channel: "lansenger",
285
+ channel: "Lansenger",
258
286
  peer: { kind: "direct", id: "2285568-xxx" },
259
287
  },
260
288
  },
261
289
  {
262
290
  agentId: "agent-a",
263
291
  match: {
264
- channel: "lansenger",
292
+ channel: "Lansenger",
265
293
  peer: { kind: "group", id: "group-chat-id" },
266
294
  },
267
295
  },
@@ -270,7 +298,7 @@ Utilisez `bindings` pour router les DM Lansenger ou les conversations de groupe
270
298
  ```
271
299
 
272
300
  Champs de routage :
273
- * `match.channel`: `"lansenger"`
301
+ * `match.channel`: `"Lansenger"`
274
302
  * `match.peer.kind`: `"direct"` (DM) ou `"group"` (chat de groupe)
275
303
  * `match.peer.id`: ID utilisateur (`2285568-xxx`) ou ID de chat de groupe
276
304
 
@@ -393,6 +421,7 @@ Les mises à jour de statut d'approbation utilisent le format DynamicMsg appCard
393
421
 
394
422
  ## Journal des modifications
395
423
 
424
+ - **v2.8.1** — Correction README : flux d'installation en 4 étapes (installer → activer → configurer → redémarrer), suppression du hack de copie manuelle ; correction SKILL.md frontmatter (conformité AgentSkills : suppression version/category/trigger, ajout metadata.openclaw gating) ; identifiant de canal renommé en Lansenger
396
425
  - **v2.8.0** — Routage multi-agent via OpenClaw `bindings[]` (remplace `agentId` par compte) ; ajout groupPolicy/groupAllowFrom/groups pour contrôle d'accès groupe ; utilisation de `resolveAgentRoute` SDK pour routage inbound
397
426
  - **v2.7.2** — Ajout fichier VERSION ; complétion changelog dans 5 READMEs ; régénération package-lock.json
398
427
  - **v2.7.0** — Enregistrement des outils comme objets simples (pas fonctions factory) ; utilisation de l'état runtime pour client/target — correction de l'enregistrement des outils de plugin externe
package/README.md CHANGED
@@ -31,7 +31,7 @@ Lansenger (蓝信) channel plugin for OpenClaw — WebSocket inbound, HTTP API o
31
31
 
32
32
  **Default strategy**: Use `formatText` first for Markdown replies. Fall back to `text` for attachments. Both `formatText` and `text` support @mention via `reminder` param — include "@姓名" in text content when mentioning.
33
33
 
34
- ## Agent Tools (v2.5.1)
34
+ ## Agent Tools
35
35
 
36
36
  | Tool | Description |
37
37
  |------|-------------|
@@ -45,32 +45,29 @@ Lansenger (蓝信) channel plugin for OpenClaw — WebSocket inbound, HTTP API o
45
45
  | `lansenger_revoke_message` | Revoke a previously sent message |
46
46
  | `lansenger_query_groups` | Query available groups |
47
47
 
48
- ## Quick Install
48
+ ## Installation & Configuration
49
49
 
50
- ### Via OpenClaw CLI (recommended)
50
+ ### Recommended 4-step flow
51
51
 
52
52
  ```bash
53
53
  # 1. Install the plugin
54
54
  openclaw plugins install @lansenger-pm/openclaw-lansenger-channel
55
55
 
56
- # 2. Copy to extensions directory (required due to OpenClaw CLI discovery bug)
57
- mkdir -p ~/.openclaw/extensions/lansenger
58
- cp -r ~/.openclaw/npm/node_modules/@lansenger-pm/openclaw-lansenger-channel/* \
59
- ~/.openclaw/extensions/lansenger/
56
+ # 2. Enable the plugin (if not auto-enabled)
57
+ openclaw config set plugins.entries.Lansenger.enabled true
60
58
 
61
- # 3. Restart gateway
59
+ # 3. Configure the channel (interactive wizard)
60
+ openclaw channels add --channel Lansenger
61
+ # OR non-interactive:
62
+ openclaw channels add --channel Lansenger --token "appId:appSecret"
63
+
64
+ # 4. Restart the gateway
62
65
  openclaw gateway restart
63
66
  ```
64
67
 
65
- > ⚠️ Step 2 is required because `openclaw channels add` only discovers plugins in the `extensions/` directory, not from npm-installed packages. This is an [OpenClaw upstream bug](https://docs.openclaw.ai), not a plugin issue.
66
-
67
- ### Via npm
68
+ The `openclaw.install` metadata in `package.json` (`npmSpec`, `localPath`, `defaultChoice`) enables **install-on-demand**: if a user runs `openclaw channels add --channel Lansenger` before the plugin is installed, OpenClaw can automatically install it using this metadata.
68
69
 
69
- ```bash
70
- # First install the npm package manually, then configure via CLI
71
- npm install -g @lansenger-pm/openclaw-lansenger-channel
72
- openclaw channels add --channel lansenger
73
- ```
70
+ > **Custom gateway**: For enterprise deployments (e.g. 奇安信), set `apiGatewayUrl` in `openclaw.json` or environment after configuration — see [Optional Configuration](#optional-configuration).
74
71
 
75
72
  ### Development install (linked)
76
73
 
@@ -81,36 +78,18 @@ openclaw plugins install --link
81
78
  openclaw gateway restart
82
79
  ```
83
80
 
84
- ## Quick Start
85
-
86
- After installing, configure credentials:
87
-
88
- > **Single account**: `channels add` creates one account. For multiple bots, see [Multi-Bot Configuration](#multi-bot-configuration) below.
81
+ ### Get Credentials
89
82
 
90
- ```bash
91
- # Standard (uses default gateway https://open.e.lanxin.cn/open/apigw)
92
- openclaw channels add --channel Lansenger \
93
- --app-token "your-appid" \
94
- --secret "your-appsecret"
95
-
96
- # Enterprise deployment (custom gateway URL)
97
- openclaw channels add --channel Lansenger \
98
- --app-token "your-appid" \
99
- --secret "your-appsecret" \
100
- --base-url "https://apigw.lx.qianxin.com"
101
- ```
83
+ **Lansenger Desktop** → **Contacts** → **Bots** → **Personal Bots** → click **ℹ️** icon
102
84
 
103
- Then restart:
104
- ```bash
105
- openclaw gateway restart
106
- ```
85
+ > ⚠️ **Mobile client does NOT support viewing credentials.** Use the desktop client only.
107
86
 
108
- Get credentials from **Lansenger Desktop** → **Contacts** → **Bots** → **Personal Bots** → click **ℹ️** icon (mobile client cannot view credentials).
87
+ ### First message
109
88
 
110
- The bot will auto-connect via WebSocket on gateway restart. Send a DM to the bot — you'll receive a pairing code. Approve it:
89
+ The bot auto-connects via WebSocket on gateway restart. Send a DM to the bot — you'll receive a pairing code. Approve it:
111
90
 
112
91
  ```bash
113
- openclaw pairing approve lansenger <code>
92
+ openclaw pairing approve Lansenger <code>
114
93
  ```
115
94
 
116
95
  ## Configuration
@@ -136,11 +115,11 @@ Add these to `~/.openclaw/.env` or your environment:
136
115
  ```json
137
116
  {
138
117
  "channels": {
139
- "lansenger": {
118
+ "Lansenger": {
140
119
  "appId": "your-appid",
141
120
  "appSecret": "your-secret",
142
121
  "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
143
- "homeChannel": "lansenger",
122
+ "homeChannel": "Lansenger",
144
123
  "enabled": true,
145
124
  "allowFrom": ["your-appid"],
146
125
  "dmSecurity": "paired",
@@ -172,15 +151,13 @@ Add these to `~/.openclaw/.env` or your environment:
172
151
 
173
152
  ### Multi-Bot Configuration
174
153
 
175
- > ⚠️ `openclaw channels add` only supports a single account and **overwrites** the previous one each time. For multiple bots, use `openclaw config set` with the `accounts` structure below.
176
-
177
- After adding the first account via `channels add`, add additional bots using `openclaw config set`:
154
+ For multiple bots, add additional accounts using `openclaw config set`:
178
155
 
179
156
  ```bash
180
157
  # Add a second bot (replace appid/appsecret/gateway with your values)
181
- openclaw config set channels.lansenger.accounts.your-appid-2.appId "your-appid-2"
182
- openclaw config set channels.lansenger.accounts.your-appid-2.appSecret "your-appsecret"
183
- openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
158
+ openclaw config set channels.Lansenger.accounts.your-appid-2.appId "your-appid-2"
159
+ openclaw config set channels.Lansenger.accounts.your-appid-2.appSecret "your-appsecret"
160
+ openclaw config set channels.Lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
184
161
 
185
162
  # Restart to apply
186
163
  openclaw gateway restart
@@ -191,7 +168,7 @@ The resulting config structure:
191
168
  ```json
192
169
  {
193
170
  "channels": {
194
- "lansenger": {
171
+ "Lansenger": {
195
172
  "appId": "your-appid-2",
196
173
  "appSecret": "...",
197
174
  "dmSecurity": "paired",
@@ -252,14 +229,14 @@ Use `bindings` to route Lansenger DMs or groups to different agents (same patter
252
229
  {
253
230
  agentId: "agent-a",
254
231
  match: {
255
- channel: "lansenger",
232
+ channel: "Lansenger",
256
233
  peer: { kind: "direct", id: "2285568-xxx" },
257
234
  },
258
235
  },
259
236
  {
260
237
  agentId: "agent-a",
261
238
  match: {
262
- channel: "lansenger",
239
+ channel: "Lansenger",
263
240
  peer: { kind: "group", id: "group-chat-id" },
264
241
  },
265
242
  },
@@ -268,7 +245,7 @@ Use `bindings` to route Lansenger DMs or groups to different agents (same patter
268
245
  ```
269
246
 
270
247
  Routing fields:
271
- * `match.channel`: `"lansenger"`
248
+ * `match.channel`: `"Lansenger"`
272
249
  * `match.peer.kind`: `"direct"` (DM) or `"group"` (group chat)
273
250
  * `match.peer.id`: user ID (`2285568-xxx`) or group chat ID
274
251
 
@@ -391,6 +368,7 @@ Approval status updates use the DynamicMsg appCard format. The `updateCardStatus
391
368
 
392
369
  ## Changelog
393
370
 
371
+ - **v2.8.1** — Fix README: proper 4-step install flow (install → enable → configure → restart), remove manual-copy hack; fix SKILL.md frontmatter (AgentSkills spec compliance: remove version/category/trigger, add metadata.openclaw gating); rename channel identifier to Lansenger
394
372
  - **v2.8.0** — Use OpenClaw `bindings[]` for multi-agent routing (replaces per-account `agentId`); add groupPolicy/groupAllowFrom/groups for group chat access control; use `resolveAgentRoute` SDK for inbound routing
395
373
  - **v2.7.2** — Add VERSION file; complete changelog in all 5 READMEs; regenerate package-lock.json
396
374
  - **v2.7.0** — Register tools as plain objects (not factory functions); use runtime state for client/target — fixes external plugin tool registration
package/README.zhHans.md CHANGED
@@ -33,7 +33,7 @@
33
33
 
34
34
  **默认策略**:优先使用 `formatText` 发送 Markdown 回复。附件使用 `text` 回退。两种类型均支持 @mention(通过 `reminder` 参数)—提及用户时在文本中包含"@姓名"。
35
35
 
36
- ## 代理工具(v2.5.1)
36
+ ## 代理工具
37
37
 
38
38
  | 工具 | 说明 |
39
39
  |------|------|
@@ -47,31 +47,29 @@
47
47
  | `lansenger_revoke_message` | 撤回已发送的消息 |
48
48
  | `lansenger_query_groups` | 查询可用群组 |
49
49
 
50
- ## 快速安装
50
+ ## 安装与配置
51
51
 
52
- ### 通过 OpenClaw CLI(推荐)
52
+ ### 推荐 4 步流程
53
53
 
54
54
  ```bash
55
55
  # 1. 安装插件
56
56
  openclaw plugins install @lansenger-pm/openclaw-lansenger-channel
57
57
 
58
- # 2. 复制到 extensions 目录(因 OpenClaw CLI 发现机制 bug,必须手动复制)
59
- mkdir -p ~/.openclaw/extensions/lansenger
60
- cp -r ~/.openclaw/npm/node_modules/@lansenger-pm/openclaw-lansenger-channel/* \
61
- ~/.openclaw/extensions/lansenger/
58
+ # 2. 启用插件(如未自动启用)
59
+ openclaw config set plugins.entries.Lansenger.enabled true
62
60
 
63
- # 3. 重启网关
61
+ # 3. 配置频道(交互式向导)
62
+ openclaw channels add --channel Lansenger
63
+ # 或非交互式:
64
+ openclaw channels add --channel Lansenger --token "appId:appSecret"
65
+
66
+ # 4. 重启网关
64
67
  openclaw gateway restart
65
68
  ```
66
69
 
67
- > ⚠️ 第2步是必需的,因为 `openclaw channels add` 只发现 `extensions/` 目录下的插件,不会扫描 npm 安装的包。这是 [OpenClaw 上游 bug](https://docs.openclaw.ai),不是插件本身的问题。
68
-
69
- ### 通过 npm
70
+ `package.json` 中的 `openclaw.install` 元数据(`npmSpec`、`localPath`、`defaultChoice`)支持**按需安装**:如果用户在插件安装前运行 `openclaw channels add --channel Lansenger`,OpenClaw 可自动安装该插件。
70
71
 
71
- ```bash
72
- npm install -g @lansenger-pm/openclaw-lansenger-channel
73
- openclaw channels add --channel lansenger
74
- ```
72
+ > **自定义网关**:企业私有化部署(如奇安信)需在配置后通过 `openclaw.json` 或环境变量设置 `apiGatewayUrl` — 见[可选配置](#可选配置)。
75
73
 
76
74
  ### 开发安装(本地链接)
77
75
 
@@ -82,36 +80,18 @@ openclaw plugins install --link
82
80
  openclaw gateway restart
83
81
  ```
84
82
 
85
- ## 快速配置
86
-
87
- 安装后,配置凭证:
88
-
89
- > **单账号**:`channels add` 仅创建一个账号。如需多个机器人,见下方[多机器人配置](#多机器人配置)。
83
+ ### 获取凭证
90
84
 
91
- ```bash
92
- # 标准安装(使用默认网关 https://open.e.lanxin.cn/open/apigw)
93
- openclaw channels add --channel Lansenger \
94
- --app-token "你的-appid" \
95
- --secret "你的-appsecret"
96
-
97
- # 企业私有化部署(自定义网关地址)
98
- openclaw channels add --channel Lansenger \
99
- --app-token "你的-appid" \
100
- --secret "你的-appsecret" \
101
- --base-url "https://apigw.lx.qianxin.com"
102
- ```
85
+ **蓝信桌面端** → **通讯录** → **智能机器人** → **个人机器人** → 点击 **ℹ️** 图标
103
86
 
104
- 然后重启:
105
- ```bash
106
- openclaw gateway restart
107
- ```
87
+ > ⚠️ **移动端不支持查看凭证。** 请仅使用桌面端。
108
88
 
109
- 获取凭证:**蓝信桌面端** → **通讯录** → **智能机器人** → **个人机器人** → 点击右侧 **ℹ️** 图标(移动端不支持查看凭证)。
89
+ ### 首次消息
110
90
 
111
91
  重启后机器人自动通过 WebSocket 连接。给机器人发私聊消息,会收到配对码,审批配对:
112
92
 
113
93
  ```bash
114
- openclaw pairing approve lansenger <配对码>
94
+ openclaw pairing approve Lansenger <配对码>
115
95
  ```
116
96
 
117
97
  ## 配置
@@ -137,11 +117,11 @@ openclaw pairing approve lansenger <配对码>
137
117
  ```json
138
118
  {
139
119
  "channels": {
140
- "lansenger": {
120
+ "Lansenger": {
141
121
  "appId": "your-appid",
142
122
  "appSecret": "your-secret",
143
123
  "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
144
- "homeChannel": "lansenger",
124
+ "homeChannel": "Lansenger",
145
125
  "enabled": true,
146
126
  "allowFrom": ["your-appid"],
147
127
  "dmSecurity": "paired",
@@ -173,15 +153,13 @@ openclaw pairing approve lansenger <配对码>
173
153
 
174
154
  ### 多机器人配置
175
155
 
176
- > ⚠️ `openclaw channels add` 仅支持单账号,每次执行会**覆盖**之前的账号。添加多个机器人需使用 `openclaw config set` 配置 `accounts` 结构。
177
-
178
- 通过 `channels add` 添加第一个账号后,用 `openclaw config set` 添加更多机器人:
156
+ 添加多个机器人时,使用 `openclaw config set` 配置 `accounts` 结构:
179
157
 
180
158
  ```bash
181
159
  # 添加第二个机器人(替换 appid/appsecret/gateway 为你的值)
182
- openclaw config set channels.lansenger.accounts.your-appid-2.appId "your-appid-2"
183
- openclaw config set channels.lansenger.accounts.your-appid-2.appSecret "your-appsecret"
184
- openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
160
+ openclaw config set channels.Lansenger.accounts.your-appid-2.appId "your-appid-2"
161
+ openclaw config set channels.Lansenger.accounts.your-appid-2.appSecret "your-appsecret"
162
+ openclaw config set channels.Lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
185
163
 
186
164
  # 重启生效
187
165
  openclaw gateway restart
@@ -192,7 +170,7 @@ openclaw gateway restart
192
170
  ```json
193
171
  {
194
172
  "channels": {
195
- "lansenger": {
173
+ "Lansenger": {
196
174
  "appId": "your-appid-2",
197
175
  "appSecret": "...",
198
176
  "dmSecurity": "paired",
@@ -253,14 +231,14 @@ openclaw gateway call lansenger.status
253
231
  {
254
232
  agentId: "agent-a",
255
233
  match: {
256
- channel: "lansenger",
234
+ channel: "Lansenger",
257
235
  peer: { kind: "direct", id: "2285568-xxx" },
258
236
  },
259
237
  },
260
238
  {
261
239
  agentId: "agent-a",
262
240
  match: {
263
- channel: "lansenger",
241
+ channel: "Lansenger",
264
242
  peer: { kind: "group", id: "group-chat-id" },
265
243
  },
266
244
  },
@@ -269,7 +247,7 @@ openclaw gateway call lansenger.status
269
247
  ```
270
248
 
271
249
  路由字段:
272
- * `match.channel`: `"lansenger"`
250
+ * `match.channel`: `"Lansenger"`
273
251
  * `match.peer.kind`: `"direct"`(私聊)或 `"group"`(群聊)
274
252
  * `match.peer.id`: 用户 ID(`2285568-xxx`)或群聊 ID
275
253
 
@@ -392,6 +370,7 @@ Agent 路由由 OpenClaw 的 `bindings[]` 配置管理——见[多 Agent 路由
392
370
 
393
371
  ## 更新日志
394
372
 
373
+ - **v2.8.1** — 修复 README:正确的 4 步安装流程(安装 → 启用 → 配置 → 重启),移除手动复制 hack;修复 SKILL.md frontmatter(AgentSkills 规范合规:移除 version/category/trigger,添加 metadata.openclaw gating);channel identifier 改为 Lansenger
395
374
  - **v2.8.0** — 多 Agent 路由改用 OpenClaw `bindings[]`(替代 per-account `agentId`);新增 groupPolicy/groupAllowFrom/groups 群聊准入控制;使用 `resolveAgentRoute` SDK 处理 inbound 路由
396
375
  - **v2.7.2** — 新增 VERSION 文件;补全 5 个 README changelog;重新生成 package-lock.json
397
376
  - **v2.7.0** — 工具注册改为纯对象(非工厂函数);使用运行时状态获取 client/target — 修复外部插件工具注册
package/README.zhHant.md CHANGED
@@ -33,7 +33,7 @@
33
33
 
34
34
  **預設策略**:優先使用 `formatText` 傳送 Markdown 回覆。附件使用 `text` 回退。兩種類型均支援 @mention(透過 `reminder` 參數)—提及使用者時在文字中包含「@姓名」。
35
35
 
36
- ## 代理工具(v2.5.1)
36
+ ## 代理工具
37
37
 
38
38
  | 工具 | 說明 |
39
39
  |------|------|
@@ -47,32 +47,29 @@
47
47
  | `lansenger_revoke_message` | 撤回已傳送的訊息 |
48
48
  | `lansenger_query_groups` | 查詢可用群組 |
49
49
 
50
- ## 快速安裝
50
+ ## 安裝與設定
51
51
 
52
- ### 透過 OpenClaw CLI(建議)
52
+ ### 建議 4 步流程
53
53
 
54
54
  ```bash
55
55
  # 1. 安裝插件
56
56
  openclaw plugins install @lansenger-pm/openclaw-lansenger-channel
57
57
 
58
- # 2. 複製到 extensions 目錄(因 OpenClaw CLI 發現機制 bug)
59
- mkdir -p ~/.openclaw/extensions/lansenger
60
- cp -r ~/.openclaw/npm/node_modules/@lansenger-pm/openclaw-lansenger-channel/* \
61
- ~/.openclaw/extensions/lansenger/
58
+ # 2. 啟用插件(如未自動啟用)
59
+ openclaw config set plugins.entries.Lansenger.enabled true
62
60
 
63
- # 3. 重啟閘道
61
+ # 3. 配置頻道(互動式向導)
62
+ openclaw channels add --channel Lansenger
63
+ # 或非互動式:
64
+ openclaw channels add --channel Lansenger --token "appId:appSecret"
65
+
66
+ # 4. 重啟閘道
64
67
  openclaw gateway restart
65
68
  ```
66
69
 
67
- > ⚠️ 第2步是必需的,因為 `openclaw channels add` 只發現 `extensions/` 目錄下的插件。這是 [OpenClaw 上游 bug](https://docs.openclaw.ai)。
68
-
69
- ### 透過 npm
70
+ `package.json` 中的 `openclaw.install` 元資料(`npmSpec`、`localPath`、`defaultChoice`)支援**按需安裝**:如果使用者在插件安裝前執行 `openclaw channels add --channel Lansenger`,OpenClaw 可自動安裝該插件。
70
71
 
71
- ```bash
72
- # First install the npm package manually, then configure via CLI
73
- npm install -g @lansenger-pm/openclaw-lansenger-channel
74
- openclaw channels add --channel Lansenger --app-token "your-appid" --secret "your-appsecret"
75
- ```
72
+ > **自訂閘道**:企業私有化部署(如奇安信)需在設定後透過 `openclaw.json` 或環境變數設定 `apiGatewayUrl` — 見[可選設定](#可選設定)。
76
73
 
77
74
  ### 開發安裝(本地連結)
78
75
 
@@ -83,36 +80,18 @@ openclaw plugins install --link
83
80
  openclaw gateway restart
84
81
  ```
85
82
 
86
- ## 快速配置
87
-
88
- 安裝後,配置憑證:
89
-
90
- > **單帳號**:`channels add` 仅建立一個帳號。如需多個機器人,見下方[多機器人設定](#多機器人設定)。
83
+ ### 取得憑證
91
84
 
92
- ```bash
93
- # 標準安裝(使用預設閘道 https://open.e.lanxin.cn/open/apigw)
94
- openclaw channels add --channel Lansenger \
95
- --app-token "你的-appid" \
96
- --secret "你的-appsecret"
97
-
98
- # 企業私有化部署(自訂閘道地址)
99
- openclaw channels add --channel Lansenger \
100
- --app-token "你的-appid" \
101
- --secret "你的-appsecret" \
102
- --base-url "https://apigw.lx.qianxin.com"
103
- ```
85
+ **藍信桌面端** → **通訊錄** → **智慧機器人** → **個人機器人** → 點擊 **ℹ️** 圖標
104
86
 
105
- 然後重啟:
106
- ```bash
107
- openclaw gateway restart
108
- ```
87
+ > ⚠️ **行動端不支援查看憑證。** 請僅使用桌面端。
109
88
 
110
- 取得憑證:**藍信桌面端** → **通訊錄** → **智慧機器人** → **個人機器人** → 點擊右側 **ℹ️** 圖標(行動端不支援查看憑證)。
89
+ ### 首次訊息
111
90
 
112
91
  重啟後機器人自動透過 WebSocket 連線。給機器人發私聊訊息,會收到配對碼,核准配對:
113
92
 
114
93
  ```bash
115
- openclaw pairing approve lansenger <配對碼>
94
+ openclaw pairing approve Lansenger <配對碼>
116
95
  ```
117
96
 
118
97
  ## 設定
@@ -138,11 +117,11 @@ openclaw pairing approve lansenger <配對碼>
138
117
  ```json
139
118
  {
140
119
  "channels": {
141
- "lansenger": {
120
+ "Lansenger": {
142
121
  "appId": "your-appid",
143
122
  "appSecret": "your-secret",
144
123
  "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
145
- "homeChannel": "lansenger",
124
+ "homeChannel": "Lansenger",
146
125
  "enabled": true,
147
126
  "allowFrom": ["your-appid"],
148
127
  "dmSecurity": "paired",
@@ -174,15 +153,13 @@ openclaw pairing approve lansenger <配對碼>
174
153
 
175
154
  ### 多機器人設定
176
155
 
177
- > ⚠️ `openclaw channels add` 僅支援單帳號,每次執行會**覆蓋**之前的帳號。新增多個機器人需使用 `openclaw config set` 配置 `accounts` 結構。
178
-
179
- 透過 `channels add` 新增第一個帳號後,用 `openclaw config set` 新增更多機器人:
156
+ 新增多個機器人時,使用 `openclaw config set` 配置 `accounts` 結構:
180
157
 
181
158
  ```bash
182
159
  # 新增第二個機器人(替換 appid/appsecret/gateway 為你的值)
183
- openclaw config set channels.lansenger.accounts.your-appid-2.appId "your-appid-2"
184
- openclaw config set channels.lansenger.accounts.your-appid-2.appSecret "your-appsecret"
185
- openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
160
+ openclaw config set channels.Lansenger.accounts.your-appid-2.appId "your-appid-2"
161
+ openclaw config set channels.Lansenger.accounts.your-appid-2.appSecret "your-appsecret"
162
+ openclaw config set channels.Lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
186
163
 
187
164
  # 重啟生效
188
165
  openclaw gateway restart
@@ -193,7 +170,7 @@ openclaw gateway restart
193
170
  ```json
194
171
  {
195
172
  "channels": {
196
- "lansenger": {
173
+ "Lansenger": {
197
174
  "appId": "your-appid-2",
198
175
  "appSecret": "...",
199
176
  "dmSecurity": "paired",
@@ -254,14 +231,14 @@ openclaw gateway call lansenger.status
254
231
  {
255
232
  agentId: "agent-a",
256
233
  match: {
257
- channel: "lansenger",
234
+ channel: "Lansenger",
258
235
  peer: { kind: "direct", id: "2285568-xxx" },
259
236
  },
260
237
  },
261
238
  {
262
239
  agentId: "agent-a",
263
240
  match: {
264
- channel: "lansenger",
241
+ channel: "Lansenger",
265
242
  peer: { kind: "group", id: "group-chat-id" },
266
243
  },
267
244
  },
@@ -270,7 +247,7 @@ openclaw gateway call lansenger.status
270
247
  ```
271
248
 
272
249
  路由欄位:
273
- * `match.channel`: `"lansenger"`
250
+ * `match.channel`: `"Lansenger"`
274
251
  * `match.peer.kind`: `"direct"`(私聊)或 `"group"`(群組聊天)
275
252
  * `match.peer.id`: 使用者 ID(`2285568-xxx`)或群組聊天 ID
276
253
 
@@ -393,6 +370,7 @@ Agent 路由由 OpenClaw 的 `bindings[]` 設定管理——見[多 Agent 路由
393
370
 
394
371
  ## 更新日誌
395
372
 
373
+ - **v2.8.1** — 修復 README:正確的 4 步安裝流程(安裝 → 啟用 → 配置 → 重啟),移除手動複製 hack;修復 SKILL.md frontmatter(AgentSkills 規範合規:移除 version/category/trigger,新增 metadata.openclaw gating);channel identifier 改為 Lansenger
396
374
  - **v2.8.0** — 多 Agent 路由改用 OpenClaw `bindings[]`(替代 per-account `agentId`);新增 groupPolicy/groupAllowFrom/groups 羣聊准入控制;使用 `resolveAgentRoute` SDK 处理 inbound 路由
397
375
  - **v2.7.2** — 新增 VERSION 檔案;補全 5 個 README changelog;重新生成 package-lock.json
398
376
  - **v2.7.0** — 工具註冊改為純物件(非工廠函數);使用運行時狀態取得 client/target — 修復外部插件工具註冊