@lansenger-pm/openclaw-lansenger-channel 3.4.6 → 3.5.1

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
@@ -46,6 +46,21 @@ Les messages peuvent être envoyés via les **outils agent** (intégrés) ou les
46
46
 
47
47
  > **Les outils agent sont toujours disponibles** lorsque le canal est configuré et la passerelle en cours d'exécution — aucun plugin séparé nécessaire. Les commandes CLI sont une alternative optionnelle pour les environnements où l'accès bash est préféré ; elles nécessitent `lansenger-cli` (Python).
48
48
 
49
+ | Outil | Description |
50
+ |-------|-------------|
51
+ | `lansenger_send_text` | Envoyer un message texte brut, pas de Markdown |
52
+ | `lansenger_send_format_text` | Envoyer du texte formaté Markdown avec @mentions optionnelles |
53
+ | `lansenger_send_file` | Envoyer fichier/image/video/voix (workspace ou chemin externe) |
54
+ | `lansenger_send_image_url` | Envoyer une image par URL |
55
+ | `lansenger_send_link_card` | Envoyer une carte de prévisualisation de lien enrichi |
56
+ | `lansenger_send_app_card` | Envoyer une carte interactive/approbation |
57
+ | `lansenger_send_app_articles` | Envoyer une carte multi-articles |
58
+ | `lansenger_update_dynamic_card` | Mettre à jour le statut d'une carte dynamique en place |
59
+ | `lansenger_revoke_message` | Révoquer un message précédemment envoyé |
60
+ | `lansenger_query_groups` | Rechercher les groupes disponibles |
61
+
62
+ Les outils sont aussi disponibles via CLI : `lansenger message send-text`, `lansenger message send-file`, etc.
63
+
49
64
  ## Installation et Configuration
50
65
 
51
66
  ### Installation recommandée
@@ -103,7 +118,7 @@ Ajoutez ces variables à `~/.openclaw/.env` ou à votre environnement :
103
118
  | `LANSENGER_APP_SECRET` | App Secret du bot personnel | `57E718CA1CAC20F2...` |
104
119
  | `LANSENGER_API_GATEWAY_URL` | URL de la passerelle API Lansenger (remplacement) | `https://open.e.lanxin.cn/open/apigw` |
105
120
 
106
- Les identifiants peuvent aussi être fournis via la configuration `openclaw.json` (voir Configuration optionnelle ci-dessous). Les variables d'environnement sont prioritaires si les deux sont définis.
121
+ Les identifiants peuvent aussi être fournis via la configuration `openclaw.json` (voir Configuration optionnelle ci-dessous). Les valeurs de configuration sont prioritaires ; les variables d'environnement sont utilisées comme repli lorsque la configuration n'est pas définie.
107
122
 
108
123
  ### Obtenir les identifiants
109
124
 
@@ -120,7 +135,7 @@ Les identifiants peuvent aussi être fournis via la configuration `openclaw.json
120
135
  "appId": "your-appid",
121
136
  "appSecret": "your-secret",
122
137
  "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
123
- "homeChannel": "lansenger",
138
+ "homeChannel": "2285568-xxx",
124
139
  "enabled": true,
125
140
  "allowFrom": ["your-appid"],
126
141
  "dmPolicy": "pairing",
@@ -141,10 +156,12 @@ Les identifiants peuvent aussi être fournis via la configuration `openclaw.json
141
156
  | `appId` | App ID du bot personnel | — |
142
157
  | `appSecret` | App Secret du bot personnel | — |
143
158
  | `apiGatewayUrl` | URL de la passerelle API | `https://open.e.lanxin.cn/open/apigw` |
144
- | `homeChannel` | Canal par défaut pour le routage de l'agent | `lansenger` |
145
- | `enabled` | Activer/désactiver le canal | `true` |
159
+ | `homeChannel` | Chat ID par défaut pour la livraison cron/notification | |
160
+ | `enabled` | Activer/désactiver le canal (défaut runtime : false sans identifiants) | `true` |
146
161
  | `allowFrom` | IDs d'utilisateurs autorisés en DM | `[]` |
147
162
  | `dmPolicy` | Politique DM : `pairing`, `allowlist`, `open`, `disabled` | `pairing` |
163
+ | `configWrites` | Autoriser Lansenger à écrire la config en réponse aux événements du canal | `true` |
164
+ | `name` | Nom d'affichage pour ce compte | — |
148
165
  | `accounts` | Configuration multi-bot | — |
149
166
  | `groupPolicy` | Politique de groupe : `open` (tous les groupes), `allowlist` (groupes autorisés uniquement), `disabled` (messages de groupe désactivés) | `allowlist` |
150
167
  | `groupAllowFrom` | IDs de groupes autorisés à déclencher le bot | `[]` |
@@ -252,7 +269,7 @@ Champs de routage :
252
269
 
253
270
  En mode mono-agent, tous les messages routent vers l'agent par défaut (`main`) automatiquement — pas de bindings nécessaires.
254
271
 
255
- ### Politique de groupe
272
+ ### Types de messages supportés
256
273
 
257
274
  | Type | Description | Méthode API | Direction |
258
275
  |------|-------------|-------------|-----------|
@@ -301,6 +318,7 @@ Le plugin supporte les cartes d'approbation :
301
318
  - **Média** — les balises `<media>` fonctionnent pour les fichiers du workspace ; pour les chemins externes, utilisez `lansenger_send_file`.
302
319
  - **openclaw skill/message lansenger** — ces commandes CLI n'existent PAS ; utilisez les outils de l'agent.
303
320
  - **Outils agent** — les outils agent (`lansenger_send_*`) nécessitent le plugin outils ET une injection réussie de la passerelle — si les outils ne sont pas disponibles, utilisez la CLI comme repli. Les commandes CLI (`lansenger message send-*`) nécessitent `pipx install lansenger-cli`.
321
+ - **alsoAllow** — les outils agent sont enregistrés par ce plugin de canal mais peuvent être **invisibles** sous un profil d'outils restrictif. Ajoutez `"tools": { "alsoAllow": ["group:plugins"] }` dans `openclaw.json` pour que l'agent puisse voir et utiliser les outils `lansenger_send_*`. Sans cela, les outils peuvent ne pas apparaître silencieusement dans la liste d'outils de l'agent.
304
322
 
305
323
  ## Développement
306
324
 
@@ -330,9 +348,14 @@ openclaw-lansenger-channel/
330
348
  ├── src/
331
349
  │ ├── client.ts # Client API Lansenger (WS, HTTP, médias)
332
350
  │ ├── channel.ts # Plugin de canal OpenClaw
333
- │ ├── channel.test.ts # Tests du plugin de canal
351
+ │ ├── runtime.ts # Runtime passerelle (méthodes, handler entrant)
334
352
  │ ├── tools.ts # Définitions des outils agent (10 outils intégrés)
335
- └── runtime.ts # Runtime passerelle (méthodes, handler entrant)
353
+ ├── setup-wizard.ts # Assistant de configuration (migration config multi-compte)
354
+ │ ├── channel.test.ts # Tests du plugin de canal
355
+ │ ├── client.test.ts # Tests du client API
356
+ │ ├── runtime.test.ts # Tests du runtime
357
+ │ ├── tools.test.ts # Tests des outils
358
+ │ └── setup-wizard.test.ts # Tests de l'assistant de configuration
336
359
  ├── skills/
337
360
  │ └── lansenger-messaging/
338
361
  │ └── SKILL.md # Stratégie de messagerie (outils + CLI)
@@ -371,20 +394,21 @@ Les mises à jour de statut d'approbation utilisent le format DynamicMsg appCard
371
394
 
372
395
  ## Journal des modifications
373
396
 
397
+ - **v3.5.0** — Correction de la livraison en double des messages (déduplication par tour) ; suppression du suffixe UUID OpenClaw des noms de fichiers ; documentation whitelist MEDIA ; conseil alsoAllow ; corrections d'exactitude README
374
398
  - **v3.3.0** — Fusion du plugin tools dans le plugin canal ; outils agent désormais intégrés (pas d'installation séparée) ; suppression des peerDependencies sur `@lansenger-pm/openclaw-lansenger-tools`
375
399
  - **v3.2.10** — Alerte au démarrage si `group:plugins` absent de l'allowlist ; `configWrites` dans le schema de config canal ; plugin compagnon via `globalThis.__lansenger_channel`
376
- - **v3.1** — Wizard multi-compte ; alignement dmPolicy (dmSecurity→dmPolicy + paired→pairing) ; prompts bilingues ; shouldPrompt skip steps configurés ; migration config multi-compte
377
- - **v3.0** — Ajout `lansenger_send_format_text` (Markdown + @mention) ; réécriture SKILL.md ; correction headStatusInfo description+colour
378
- - **v2.10** — Conversion px→pt appCard ; classification erreurs sendImageUrl ; journalisation outils
379
- - **v2.9** — Adaptateur statut ; repli env vars ; uiHints chinois ; README nettoyage (5 langues)
380
- - **v2.8** — Routage multi-agent OpenClaw `bindings[]` ; groupPolicy/groupAllowFrom/groups ; SKILL.md AgentSkills
381
- - **v2.7** — Enregistrement outils objets simples ; état runtime client/target
382
- - **v2.6** — Enregistrement inconditionnel ; suppression ghost delete_message
383
- - **v2.5** — formatText reminder ; AppArticles `summary` ; revoke bot/group uniquement
384
- - **v2.4** — Correction assemblage message ; corrections appArticles/linkCard
385
- - **v2.3** — Suppression envoi groupe/privé legacy ; routage via msgTarget
386
- - **v2.2** — Ajout 9 outils agent
387
- - **v2.0** — Version initiale
400
+ - **v3.1.0** — Wizard multi-compte ; alignement dmPolicy (dmSecurity→dmPolicy + paired→pairing) ; prompts bilingues ; shouldPrompt skip steps configurés ; migration config multi-compte
401
+ - **v3.0.0** — Ajout `lansenger_send_format_text` (Markdown + @mention) ; réécriture SKILL.md ; correction headStatusInfo description+colour
402
+ - **v2.10.0** — Conversion px→pt appCard ; classification erreurs sendImageUrl ; journalisation outils
403
+ - **v2.9.0** — Adaptateur statut ; repli env vars ; uiHints chinois ; README nettoyage (5 langues)
404
+ - **v2.8.0** — Routage multi-agent OpenClaw `bindings[]` ; groupPolicy/groupAllowFrom/groups ; SKILL.md AgentSkills
405
+ - **v2.7.0** — Enregistrement outils objets simples ; état runtime client/target
406
+ - **v2.6.0** — Enregistrement inconditionnel ; suppression ghost delete_message
407
+ - **v2.5.0** — formatText reminder ; AppArticles `summary` ; revoke bot/group uniquement
408
+ - **v2.4.0** — Correction assemblage message ; corrections appArticles/linkCard
409
+ - **v2.3.0** — Suppression envoi groupe/privé legacy ; routage via msgTarget
410
+ - **v2.2.0** — Ajout 9 outils agent
411
+ - **v2.0.0** — Version initiale
388
412
 
389
413
  ## Licence
390
414
 
package/README.md CHANGED
@@ -46,7 +46,8 @@ Messages can be sent via **agent tools** (built-in) or **CLI commands** (optiona
46
46
 
47
47
  | Tool | Description |
48
48
  |------|-------------|
49
- | `lansenger_send_text` | Send text or formatText message (Markdown by default) |
49
+ | `lansenger_send_text` | Send plain text message with optional file attachment and @mentions (NO Markdown) |
50
+ | `lansenger_send_format_text` | Send Markdown-formatted text with optional @mentions |
50
51
  | `lansenger_send_file` | Send file/image/video/voice from workspace or external path |
51
52
  | `lansenger_send_image_url` | Send image by URL |
52
53
  | `lansenger_send_link_card` | Send rich link preview card |
@@ -109,7 +110,7 @@ Add these to `~/.openclaw/.env` or your environment:
109
110
  | `LANSENGER_APP_SECRET` | Personal bot App Secret | `57E718CA1CAC20F2...` |
110
111
  | `LANSENGER_API_GATEWAY_URL` | Lansenger API Gateway URL override | `https://open.e.lanxin.cn/open/apigw` |
111
112
 
112
- Credentials can also be provided via `openclaw.json` config (see Optional Configuration below). Env vars take precedence when both are set.
113
+ Credentials can also be provided via `openclaw.json` config (see Optional Configuration below). Config values take precedence; env vars are used as fallback when config is unset.
113
114
 
114
115
  ### Get Credentials
115
116
 
@@ -126,7 +127,7 @@ Credentials can also be provided via `openclaw.json` config (see Optional Config
126
127
  "appId": "your-appid",
127
128
  "appSecret": "your-secret",
128
129
  "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
129
- "homeChannel": "lansenger",
130
+ "homeChannel": "2285568-xxx",
130
131
  "enabled": true,
131
132
  "allowFrom": ["your-appid"],
132
133
  "dmPolicy": "pairing",
@@ -147,10 +148,12 @@ Credentials can also be provided via `openclaw.json` config (see Optional Config
147
148
  | `appId` | Personal bot App ID | — |
148
149
  | `appSecret` | Personal bot App Secret | — |
149
150
  | `apiGatewayUrl` | API Gateway URL | `https://open.e.lanxin.cn/open/apigw` |
150
- | `homeChannel` | Default channel for agent routing | `lansenger` |
151
- | `enabled` | Enable/disable the channel | `true` |
151
+ | `homeChannel` | Default chat ID for cron/notification delivery | |
152
+ | `enabled` | Enable/disable the channel (runtime default: false without credentials) | `true` |
152
153
  | `allowFrom` | User IDs allowed to DM the bot | `[]` |
153
154
  | `dmPolicy` | DM policy: `pairing`, `allowlist`, `open`, `disabled` | `pairing` |
155
+ | `configWrites` | Allow Lansenger to write config in response to channel events | `true` |
156
+ | `name` | Display name for this account | — |
154
157
  | `accounts` | Multi-bot configuration | — |
155
158
  | `groupPolicy` | Group policy: `open`, `allowlist`, `disabled` | `allowlist` |
156
159
  | `groupAllowFrom` | Group IDs allowed to trigger the bot | `[]` |
@@ -258,7 +261,7 @@ Routing fields:
258
261
 
259
262
  In single-agent mode, all messages route to the default agent (`main`) automatically — no bindings needed.
260
263
 
261
- ### Group policy
264
+ ### Supported Message Types
262
265
 
263
266
  | Type | Description | API Method | Direction |
264
267
  |------|-------------|------------|-----------|
@@ -307,6 +310,7 @@ The plugin supports approval workflow cards:
307
310
  - **Media** — `<media>` tags work for workspace files; for external paths use `lansenger_send_file`.
308
311
  - **openclaw skill/message lansenger** — these CLI commands do NOT exist; use agent tools instead.
309
312
  - **Agent tools** — agent tools (`lansenger_send_*`) are built into the channel plugin — always available when the channel is configured and running. CLI commands (`lansenger message send-*`) require `pipx install lansenger-cli` and are an optional alternative.
313
+ - **alsoAllow** — agent tools are registered by this channel plugin but may be **invisible** under restrictive tool profiles. Add `"tools": { "alsoAllow": ["group:plugins"] }` to `openclaw.json` to ensure the agent can see and use `lansenger_send_*` tools. Without this, tools may silently not appear in the agent's tool list.
310
314
 
311
315
  ## Development
312
316
 
@@ -336,9 +340,14 @@ openclaw-lansenger-channel/
336
340
  ├── src/
337
341
  │ ├── client.ts # Lansenger API client (WS, HTTP, media)
338
342
  │ ├── channel.ts # OpenClaw channel plugin
339
- │ ├── channel.test.ts # Channel plugin tests
343
+ │ ├── runtime.ts # Gateway runtime (methods, inbound handler)
340
344
  │ ├── tools.ts # Agent tool definitions (10 built-in tools)
341
- └── runtime.ts # Gateway runtime (methods, inbound handler)
345
+ ├── setup-wizard.ts # Setup wizard (multi-account config migration)
346
+ │ ├── channel.test.ts # Channel plugin tests
347
+ │ ├── client.test.ts # API client tests
348
+ │ ├── runtime.test.ts # Runtime tests
349
+ │ ├── tools.test.ts # Tool tests
350
+ │ └── setup-wizard.test.ts # Setup wizard tests
342
351
  ├── skills/
343
352
  │ └── lansenger-messaging/
344
353
  │ └── SKILL.md # Agent messaging strategy (tools + CLI)
@@ -377,20 +386,21 @@ Approval status updates use the DynamicMsg appCard format. The `updateCardStatus
377
386
 
378
387
  ## Changelog
379
388
 
389
+ - **v3.5.0** — Fix duplicate message delivery (per-turn dedup); strip OpenClaw UUID suffix from filenames; MEDIA whitelist docs; alsoAllow tip; README accuracy fixes
380
390
  - **v3.3.0** — Merge tools plugin into channel plugin; agent tools now built-in (no separate install); remove peerDependencies on `@lansenger-pm/openclaw-lansenger-tools`
381
391
  - **v3.2.10** — Startup warning for missing `group:plugins` in tool allowlist; `configWrites` in channel config schema; companion plugin cross-runtime state via `globalThis.__lansenger_channel`
382
- - **v3.1** — Multi-account setup wizard; dmPolicy/dmSecurity→dmPolicy+pairing (OpenClaw standard); bilingual prompts; credential shouldPrompt skips configured steps; clean multi-account config migration
383
- - **v3.0** — Add `lansenger_send_format_text` tool (Markdown + @mention); rewrite SKILL.md; fix headStatusInfo description+colour semantics
384
- - **v2.10** — font-size px→pt auto-conversion; sendImageUrl error classification; tool registration logging
385
- - **v2.9** — Status adapter; env var fallback; uiHints; README cleanup (5 locales)
386
- - **v2.8** — OpenClaw `bindings[]` multi-agent routing; groupPolicy/groupAllowFrom/groups access control; SKILL.md AgentSkills spec
387
- - **v2.7** — Plain-object tool registration; runtime state for client/target
388
- - **v2.6** — Register tools unconditionally; removed phantom delete_message
389
- - **v2.5** — formatText reminder; appArticles `summary`; revoke chatType bot/group only
390
- - **v2.4** — Fix message body assembly; appArticles/linkCard field fixes
391
- - **v2.3** — Remove legacy group/private send; all routing via msgTarget
392
- - **v2.2** — Add 9 agent tools
393
- - **v2.0** — Initial release
392
+ - **v3.1.0** — Multi-account setup wizard; dmPolicy/dmSecurity→dmPolicy+pairing (OpenClaw standard); bilingual prompts; credential shouldPrompt skips configured steps; clean multi-account config migration
393
+ - **v3.0.0** — Add `lansenger_send_format_text` tool (Markdown + @mention); rewrite SKILL.md; fix headStatusInfo description+colour semantics
394
+ - **v2.10.0** — font-size px→pt auto-conversion; sendImageUrl error classification; tool registration logging
395
+ - **v2.9.0** — Status adapter; env var fallback; uiHints; README cleanup (5 locales)
396
+ - **v2.8.0** — OpenClaw `bindings[]` multi-agent routing; groupPolicy/groupAllowFrom/groups access control; SKILL.md AgentSkills spec
397
+ - **v2.7.0** — Plain-object tool registration; runtime state for client/target
398
+ - **v2.6.0** — Register tools unconditionally; removed phantom delete_message
399
+ - **v2.5.0** — formatText reminder; appArticles `summary`; revoke chatType bot/group only
400
+ - **v2.4.0** — Fix message body assembly; appArticles/linkCard field fixes
401
+ - **v2.3.0** — Remove legacy group/private send; all routing via msgTarget
402
+ - **v2.2.0** — Add 9 agent tools
403
+ - **v2.0.0** — Initial release
394
404
 
395
405
  ## License
396
406
 
package/README.zhHans.md CHANGED
@@ -48,7 +48,8 @@
48
48
 
49
49
  | 工具 | 说明 |
50
50
  |------|------|
51
- | `lansenger_send_text` | 发送文本或 formatText 消息(默认 Markdown |
51
+ | `lansenger_send_text` | 发送纯文本消息,不支持 Markdown |
52
+ | `lansenger_send_format_text` | 发送 Markdown 格式文字,支持 @提及 |
52
53
  | `lansenger_send_file` | 发送文件/图片/视频/语音(工作区或外部路径) |
53
54
  | `lansenger_send_image_url` | 通过 URL 发送图片 |
54
55
  | `lansenger_send_link_card` | 发送富链接预览卡片 |
@@ -117,7 +118,7 @@ openclaw pairing approve lansenger <配对码>
117
118
  | `LANSENGER_APP_SECRET` | 个人机器人 App Secret | `57E718CA1CAC20F2...` |
118
119
  | `LANSENGER_API_GATEWAY_URL` | 蓝信 API 网关 URL 覆盖 | `https://open.e.lanxin.cn/open/apigw` |
119
120
 
120
- 凭证也可通过 `openclaw.json` 配置提供(见下方可选配置)。当两者同时设置时,环境变量优先。
121
+ 凭证也可通过 `openclaw.json` 配置提供(见下方可选配置)。配置值优先;环境变量仅在配置未设置时作为回退。
121
122
 
122
123
  ### 获取凭证
123
124
 
@@ -134,7 +135,7 @@ openclaw pairing approve lansenger <配对码>
134
135
  "appId": "your-appid",
135
136
  "appSecret": "your-secret",
136
137
  "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
137
- "homeChannel": "lansenger",
138
+ "homeChannel": "2285568-xxx",
138
139
  "enabled": true,
139
140
  "allowFrom": ["your-appid"],
140
141
  "dmPolicy": "pairing",
@@ -155,10 +156,12 @@ openclaw pairing approve lansenger <配对码>
155
156
  | `appId` | 个人机器人 App ID | — |
156
157
  | `appSecret` | 个人机器人 App Secret | — |
157
158
  | `apiGatewayUrl` | API 网关 URL | `https://open.e.lanxin.cn/open/apigw` |
158
- | `homeChannel` | 代理路由的默认频道 | `lansenger` |
159
- | `enabled` | 启用/禁用频道 | `true` |
159
+ | `homeChannel` | 定时任务/通知送达的默认聊天 ID | |
160
+ | `enabled` | 启用/禁用频道(运行时默认:无凭证时为 false) | `true` |
160
161
  | `allowFrom` | 允许私聊的用户 ID | `[]` |
161
162
  | `dmPolicy` | 私聊策略:`pairing`、`allowlist`、`open`、`disabled` | `pairing` |
163
+ | `configWrites` | 允许蓝信响应频道事件写入配置 | `true` |
164
+ | `name` | 此账户的显示名称 | — |
162
165
  | `accounts` | 多机器人配置 | — |
163
166
  | `groupPolicy` | 群聊策略:`open`(所有群)、`allowlist`(仅允许列表群)、`disabled`(禁止群消息) | `allowlist` |
164
167
  | `groupAllowFrom` | 允许触发机器人的群 ID | `[]` |
@@ -266,7 +269,7 @@ openclaw channels status --probe
266
269
 
267
270
  单 Agent 模式下,所有消息自动路由到默认 Agent(`main`),无需 bindings 配置。
268
271
 
269
- ### 群聊策略
272
+ ### 支持的消息类型
270
273
 
271
274
  | 类型 | 说明 | API 方法 | 方向 |
272
275
  |------|------|----------|------|
@@ -315,6 +318,7 @@ openclaw channels status --probe
315
318
  - **媒体标签** — `<media>` 标签适用于工作区文件;外部路径请使用 `lansenger_send_file`。
316
319
  - **openclaw skill/message lansenger** — 这些 CLI 命令不存在;请使用代理工具。
317
320
  - **代理工具** — 代理工具(`lansenger_send_*`)需要工具插件且网关注入成功 — 若工具不可用,请使用 CLI 作为备选。CLI 命令(`lansenger message send-*`)需要 `pipx install lansenger-cli`。
321
+ - **alsoAllow** — 本插件注册了 agent 工具(`lansenger_send_*`),但在严格工具策略下可能**不可见**。需在 `openclaw.json` 中添加 `"tools": { "alsoAllow": ["group:plugins"] }` 以确保 agent 能看到并使用这些工具。否则工具可能静默不出现在 agent 工具列表中。
318
322
 
319
323
  ## 开发
320
324
 
@@ -344,9 +348,14 @@ openclaw-lansenger-channel/
344
348
  ├── src/
345
349
  │ ├── client.ts # 蓝信 API 客户端(WS、HTTP、媒体)
346
350
  │ ├── channel.ts # OpenClaw 频道插件
347
- │ ├── channel.test.ts # 频道插件测试
351
+ │ ├── runtime.ts # 网关运行时(方法、入站处理器)
348
352
  │ ├── tools.ts # 代理工具定义(10 个内置工具)
349
- └── runtime.ts # 网关运行时(方法、入站处理器)
353
+ ├── setup-wizard.ts # 设置向导(多账号配置迁移)
354
+ │ ├── channel.test.ts # 频道插件测试
355
+ │ ├── client.test.ts # API 客户端测试
356
+ │ ├── runtime.test.ts # 运行时测试
357
+ │ ├── tools.test.ts # 工具测试
358
+ │ └── setup-wizard.test.ts # 设置向导测试
350
359
  ├── skills/
351
360
  │ └── lansenger-messaging/
352
361
  │ └── SKILL.md # 代理消息策略(工具 + CLI)
@@ -385,19 +394,20 @@ Agent 路由由 OpenClaw 的 `bindings[]` 配置管理——见[多 Agent 路由
385
394
 
386
395
  ## 更新日志
387
396
 
397
+ - **v3.5.0** — 修复重复消息送达(每回合去重);剥离文件名中的 OpenClaw UUID 后缀;MEDIA 白名单文档;alsoAllow 提示;README 准确性修复
388
398
  - **v3.3.0** — 合并 tools 插件至频道插件;代理工具现已内置(无需单独安装);移除 `@lansenger-pm/openclaw-lansenger-tools` 的 peerDependencies
389
- - **v3.1** — 多账号设置向导;dmPolicy 对齐 OpenClaw 标准(dmSecurity→dmPolicy + paired→pairing);中英双语提示文案;凭证 shouldPrompt 跳过已配置步骤;多账号配置迁移清理
390
- - **v3.0** — 新增 `lansenger_send_format_text` 工具(Markdown + @提及);重写 SKILL.md;修正 headStatusInfo description+colour 语义
391
- - **v2.10** — appCard font-size px→pt 自动转换;sendImageUrl 错误分类;工具注册日志
392
- - **v2.9** — 状态适配器;环境变量回退;uiHints 中文标签;README 精简(5 语言)
393
- - **v2.8** — OpenClaw `bindings[]` 多 Agent 路由;groupPolicy/groupAllowFrom/groups 群聊准入;SKILL.md AgentSkills 规范
394
- - **v2.7** — 纯对象工具注册;运行时状态获取 client/target
395
- - **v2.6** — 无条件注册工具;移除幽灵 delete_message
396
- - **v2.5** — formatText reminder;AppArticles `summary`;撤回仅 bot/group
397
- - **v2.4** — 修复消息体组装;appArticles/linkCard 字段修复
398
- - **v2.3** — 移除遗留群聊/私聊发送;全部通过 msgTarget 路由
399
- - **v2.2** — 添加 9 个 agent 工具
400
- - **v2.0** — 初始发布
399
+ - **v3.1.0** — 多账号设置向导;dmPolicy 对齐 OpenClaw 标准(dmSecurity→dmPolicy + paired→pairing);中英双语提示文案;凭证 shouldPrompt 跳过已配置步骤;多账号配置迁移清理
400
+ - **v3.0.0** — 新增 `lansenger_send_format_text` 工具(Markdown + @提及);重写 SKILL.md;修正 headStatusInfo description+colour 语义
401
+ - **v2.10.0** — appCard font-size px→pt 自动转换;sendImageUrl 错误分类;工具注册日志
402
+ - **v2.9.0** — 状态适配器;环境变量回退;uiHints 中文标签;README 精简(5 语言)
403
+ - **v2.8.0** — OpenClaw `bindings[]` 多 Agent 路由;groupPolicy/groupAllowFrom/groups 群聊准入;SKILL.md AgentSkills 规范
404
+ - **v2.7.0** — 纯对象工具注册;运行时状态获取 client/target
405
+ - **v2.6.0** — 无条件注册工具;移除幽灵 delete_message
406
+ - **v2.5.0** — formatText reminder;AppArticles `summary`;撤回仅 bot/group
407
+ - **v2.4.0** — 修复消息体组装;appArticles/linkCard 字段修复
408
+ - **v2.3.0** — 移除遗留群聊/私聊发送;全部通过 msgTarget 路由
409
+ - **v2.2.0** — 添加 9 个 agent 工具
410
+ - **v2.0.0** — 初始发布
401
411
 
402
412
  ## 许可证
403
413
 
package/README.zhHant.md CHANGED
@@ -46,6 +46,21 @@
46
46
 
47
47
  > **代理工具始終可用** — 頻道設定且閘道執行時即可使用,無需單獨安裝插件。CLI 命令為可選替代方案,適合偏好 bash 呼叫的場景;需安裝 `lansenger-cli`(Python)。
48
48
 
49
+ | 工具 | 說明 |
50
+ |------|------|
51
+ | `lansenger_send_text` | 發送純文字訊息,不支援 Markdown |
52
+ | `lansenger_send_format_text` | 發送 Markdown 格式文字,支援 @提及 |
53
+ | `lansenger_send_file` | 發送檔案/圖片/影片/語音(工作區或外部路徑) |
54
+ | `lansenger_send_image_url` | 透過 URL 發送圖片 |
55
+ | `lansenger_send_link_card` | 發送富連結預覽卡片 |
56
+ | `lansenger_send_app_card` | 發送互動/審批卡片 |
57
+ | `lansenger_send_app_articles` | 發送多文章卡片 |
58
+ | `lansenger_update_dynamic_card` | 原地更新動態卡片狀態 |
59
+ | `lansenger_revoke_message` | 撤回已傳送的訊息 |
60
+ | `lansenger_query_groups` | 查詢可用群組 |
61
+
62
+ 工具也可透過 CLI 使用:`lansenger message send-text`、`lansenger message send-file` 等。
63
+
49
64
  ## 安裝與設定
50
65
 
51
66
  ### 建議安裝流程
@@ -103,7 +118,7 @@ openclaw pairing approve lansenger <配對碼>
103
118
  | `LANSENGER_APP_SECRET` | 個人機器人 App Secret | `57E718CA1CAC20F2...` |
104
119
  | `LANSENGER_API_GATEWAY_URL` | 藍信 API 閘道 URL 覆蓋 | `https://open.e.lanxin.cn/open/apigw` |
105
120
 
106
- 憑證也可透過 `openclaw.json` 配置提供(見下方可選設定)。當兩者同時設定時,環境變數優先。
121
+ 憑證也可透過 `openclaw.json` 配置提供(見下方可選設定)。配置值優先;環境變數僅在配置未設定時作為回退。
107
122
 
108
123
  ### 取得憑證
109
124
 
@@ -120,7 +135,7 @@ openclaw pairing approve lansenger <配對碼>
120
135
  "appId": "your-appid",
121
136
  "appSecret": "your-secret",
122
137
  "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
123
- "homeChannel": "lansenger",
138
+ "homeChannel": "2285568-xxx",
124
139
  "enabled": true,
125
140
  "allowFrom": ["your-appid"],
126
141
  "dmPolicy": "pairing",
@@ -141,10 +156,12 @@ openclaw pairing approve lansenger <配對碼>
141
156
  | `appId` | 個人機器人 App ID | — |
142
157
  | `appSecret` | 個人機器人 App Secret | — |
143
158
  | `apiGatewayUrl` | API 閘道 URL | `https://open.e.lanxin.cn/open/apigw` |
144
- | `homeChannel` | 代理路由的預設頻道 | `lansenger` |
145
- | `enabled` | 啟用/禁用頻道 | `true` |
159
+ | `homeChannel` | 定時任務/通知遞送的預設聊天 ID | |
160
+ | `enabled` | 啟用/禁用頻道(運行時預設:無憑證時為 false) | `true` |
146
161
  | `allowFrom` | 允許私聊的使用者 ID | `[]` |
147
162
  | `dmPolicy` | 私聊策略:`pairing`、`allowlist`、`open`、`disabled` | `pairing` |
163
+ | `configWrites` | 允許藍信回應頻道事件寫入配置 | `true` |
164
+ | `name` | 此帳戶的顯示名稱 | — |
148
165
  | `accounts` | 多機器人設定 | — |
149
166
  | `groupPolicy` | 群聊策略:`open`(所有群)、`allowlist`(僅允許列表群)、`disabled`(禁止群訊息) | `allowlist` |
150
167
  | `groupAllowFrom` | 允許觸發機器人的群 ID | `[]` |
@@ -252,7 +269,7 @@ openclaw channels status --probe
252
269
 
253
270
  單 Agent 模式下,所有訊息自動路由至預設 Agent(`main`),無需 bindings 設定。
254
271
 
255
- ### 羣聊策略
272
+ ### 支持的訊息類型
256
273
 
257
274
  | 類型 | 說明 | API 方法 | 方向 |
258
275
  |------|------|----------|------|
@@ -301,6 +318,7 @@ openclaw channels status --probe
301
318
  - **媒體標籤**——`<media>` 標籤適用於工作區檔案;外部路徑請使用 `lansenger_send_file`。
302
319
  - **openclaw skill/message lansenger**——這些 CLI 命令不存在;請使用代理工具。
303
320
  - **代理工具**——代理工具(`lansenger_send_*`)需要工具插件且閘道注入成功——若工具不可用,請使用 CLI 作為備選。CLI 命令(`lansenger message send-*`)需要 `pipx install lansenger-cli`。
321
+ - **alsoAllow**——本插件註冊了 agent 工具(`lansenger_send_*`),但在嚴格工具策略下可能**不可見**。需在 `openclaw.json` 中新增 `"tools": { "alsoAllow": ["group:plugins"] }` 以確保 agent 能看到並使用這些工具。否則工具可能靜默不出現在 agent 工具列表中。
304
322
 
305
323
  ## 開發
306
324
 
@@ -330,9 +348,14 @@ openclaw-lansenger-channel/
330
348
  ├── src/
331
349
  │ ├── client.ts # 藍信 API 客戶端(WS、HTTP、媒體)
332
350
  │ ├── channel.ts # OpenClaw 频道插件
333
- │ ├── channel.test.ts # 频道插件測試
351
+ │ ├── runtime.ts # 閘道運行時(方法、入站處理器)
334
352
  │ ├── tools.ts # 代理工具定義(10 個內建工具)
335
- └── runtime.ts # 閘道運行時(方法、入站處理器)
353
+ ├── setup-wizard.ts # 設定精靈(多帳號配置遷移)
354
+ │ ├── channel.test.ts # 频道插件測試
355
+ │ ├── client.test.ts # API 客戶端測試
356
+ │ ├── runtime.test.ts # 運行時測試
357
+ │ ├── tools.test.ts # 工具測試
358
+ │ └── setup-wizard.test.ts # 設定精靈測試
336
359
  ├── skills/
337
360
  │ └── lansenger-messaging/
338
361
  │ └── SKILL.md # 代理訊息策略(工具 + CLI)
@@ -371,19 +394,20 @@ Agent 路由由 OpenClaw 的 `bindings[]` 設定管理——見[多 Agent 路由
371
394
 
372
395
  ## 更新日誌
373
396
 
397
+ - **v3.5.0** — 修正重複訊息遞送(每回合去重);從檔案名稱中移除 OpenClaw UUID 後綴;MEDIA 白名單文件;alsoAllow 提示;README 准確性修正
374
398
  - **v3.3.0** — 合併 tools 插件至頻道插件;代理工具現已內建(無需單獨安裝);移除 `@lansenger-pm/openclaw-lansenger-tools` 的 peerDependencies
375
- - **v3.1** — 多帳號設定精靈;dmPolicy 對齊 OpenClaw 標準(dmSecurity→dmPolicy + paired→pairing);中英雙語提示文案;憑證 shouldPrompt 跳過已設定步驟;多帳號設定遷移清理
376
- - **v3.0** — 新增 `lansenger_send_format_text` 工具(Markdown + @提及);重寫 SKILL.md;修正 headStatusInfo description+colour 語義
377
- - **v2.10** — appCard font-size px→pt 自動轉換;sendImageUrl 錯誤分類;工具註冊日誌
378
- - **v2.9** — 狀態適配器;環境變數回退;uiHints 中文標籤;README 精簡(5 語言)
379
- - **v2.8** — OpenClaw `bindings[]` 多 Agent 路由;groupPolicy/groupAllowFrom/groups 羣聊准入;SKILL.md AgentSkills 規範
380
- - **v2.7** — 純物件工具註冊;運行時狀態取得 client/target
381
- - **v2.6** — 無條件註冊工具;移除幽靈 delete_message
382
- - **v2.5** — formatText reminder;AppArticles `summary`;撤回僅 bot/group
383
- - **v2.4** — 修復訊息體組裝;appArticles/linkCard 欄位修復
384
- - **v2.3** — 移除遺留群組/私聊傳送;全部透過 msgTarget 路由
385
- - **v2.2** — 新增 9 個 agent 工具
386
- - **v2.0** — 初始發佈
399
+ - **v3.1.0** — 多帳號設定精靈;dmPolicy 對齊 OpenClaw 標準(dmSecurity→dmPolicy + paired→pairing);中英雙語提示文案;憑證 shouldPrompt 跳過已設定步驟;多帳號設定遷移清理
400
+ - **v3.0.0** — 新增 `lansenger_send_format_text` 工具(Markdown + @提及);重寫 SKILL.md;修正 headStatusInfo description+colour 語義
401
+ - **v2.10.0** — appCard font-size px→pt 自動轉換;sendImageUrl 錯誤分類;工具註冊日誌
402
+ - **v2.9.0** — 狀態適配器;環境變數回退;uiHints 中文標籤;README 精簡(5 語言)
403
+ - **v2.8.0** — OpenClaw `bindings[]` 多 Agent 路由;groupPolicy/groupAllowFrom/groups 羣聊准入;SKILL.md AgentSkills 規範
404
+ - **v2.7.0** — 純物件工具註冊;運行時狀態取得 client/target
405
+ - **v2.6.0** — 無條件註冊工具;移除幽靈 delete_message
406
+ - **v2.5.0** — formatText reminder;AppArticles `summary`;撤回僅 bot/group
407
+ - **v2.4.0** — 修復訊息體組裝;appArticles/linkCard 欄位修復
408
+ - **v2.3.0** — 移除遺留群組/私聊傳送;全部透過 msgTarget 路由
409
+ - **v2.2.0** — 新增 9 個 agent 工具
410
+ - **v2.0.0** — 初始發佈
387
411
 
388
412
  ## 授權條款
389
413
 
@@ -46,6 +46,21 @@
46
46
 
47
47
  > **代理工具始終可用** — 頻道設定且網關執行時即可使用,無需單獨安裝插件。CLI 命令為可選替代方案,適合偏好 bash 呼叫的場景;需安裝 `lansenger-cli`(Python)。
48
48
 
49
+ | 工具 | 說明 |
50
+ |------|------|
51
+ | `lansenger_send_text` | 發送純文字訊息,不支援 Markdown |
52
+ | `lansenger_send_format_text` | 發送 Markdown 格式文字,支援 @提及 |
53
+ | `lansenger_send_file` | 發送檔案/圖片/影片/語音(工作區或外部路徑) |
54
+ | `lansenger_send_image_url` | 透過 URL 發送圖片 |
55
+ | `lansenger_send_link_card` | 發送富連結預覽卡片 |
56
+ | `lansenger_send_app_card` | 發送互動/審批卡片 |
57
+ | `lansenger_send_app_articles` | 發送多文章卡片 |
58
+ | `lansenger_update_dynamic_card` | 原地更新動態卡片狀態 |
59
+ | `lansenger_revoke_message` | 撤回已發送的訊息 |
60
+ | `lansenger_query_groups` | 查詢可用羣組 |
61
+
62
+ 工具也可透過 CLI 使用:`lansenger message send-text`、`lansenger message send-file` 等。
63
+
49
64
  ## 安裝與設定
50
65
 
51
66
  ### 建議安裝流程
@@ -103,7 +118,7 @@ openclaw pairing approve lansenger <配對碼>
103
118
  | `LANSENGER_APP_SECRET` | 個人機械人 App Secret | `57E718CA1CAC20F2...` |
104
119
  | `LANSENGER_API_GATEWAY_URL` | 藍信 API 網關 URL 覆蓋 | `https://open.e.lanxin.cn/open/apigw` |
105
120
 
106
- 憑證也可透過 `openclaw.json` 配置提供(見下方可選設定)。當兩者同時設定時,環境變數優先。
121
+ 憑證也可透過 `openclaw.json` 配置提供(見下方可選設定)。配置值優先;環境變數僅在配置未設定時作為回退。
107
122
 
108
123
  ### 取得憑證
109
124
 
@@ -120,7 +135,7 @@ openclaw pairing approve lansenger <配對碼>
120
135
  "appId": "your-appid",
121
136
  "appSecret": "your-secret",
122
137
  "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
123
- "homeChannel": "lansenger",
138
+ "homeChannel": "2285568-xxx",
124
139
  "enabled": true,
125
140
  "allowFrom": ["your-appid"],
126
141
  "dmPolicy": "pairing",
@@ -141,10 +156,12 @@ openclaw pairing approve lansenger <配對碼>
141
156
  | `appId` | 個人機械人 App ID | — |
142
157
  | `appSecret` | 個人機械人 App Secret | — |
143
158
  | `apiGatewayUrl` | API 網關 URL | `https://open.e.lanxin.cn/open/apigw` |
144
- | `homeChannel` | 代理路由的預設頻道 | `lansenger` |
145
- | `enabled` | 啟用/禁用頻道 | `true` |
159
+ | `homeChannel` | 定時任務/通知遞送的預設聊天 ID | |
160
+ | `enabled` | 啟用/禁用頻道(運行時預設:無憑證時為 false) | `true` |
146
161
  | `allowFrom` | 允許私聊的使用者 ID | `[]` |
147
162
  | `dmPolicy` | 私聊策略:`pairing`、`allowlist`、`open`、`disabled` | `pairing` |
163
+ | `configWrites` | 允許藍信回應頻道事件寫入配置 | `true` |
164
+ | `name` | 此帳戶的顯示名稱 | — |
148
165
  | `accounts` | 多機械人設定 | — |
149
166
  | `groupPolicy` | 羣聊策略:`open`(所有羣)、`allowlist`(僅允許列表羣)、`disabled`(禁止羣訊息) | `allowlist` |
150
167
  | `groupAllowFrom` | 允許觸發機械人的羣 ID | `[]` |
@@ -254,7 +271,7 @@ openclaw channels status --probe
254
271
 
255
272
  單 Agent 模式下,所有訊息自動路由至預設 Agent(`main`),無需 bindings 設定。
256
273
 
257
- ### 羣聊策略
274
+ ### 支持的訊息類型
258
275
 
259
276
  | 類型 | 說明 | API 方法 | 方向 |
260
277
  |------|------|----------|------|
@@ -303,6 +320,7 @@ openclaw channels status --probe
303
320
  - **媒體標籤** — `<media>` 標籤適用於工作區檔案;外部路徑請使用 `lansenger_send_file`。
304
321
  - **openclaw skill/message lansenger** — 這些 CLI 命令不存在;請使用代理工具。
305
322
  - **代理工具** — 代理工具(`lansenger_send_*`)需要工具插件且網關注入成功 — 若工具不可用,請使用 CLI 作為備選。CLI 命令(`lansenger message send-*`)需要 `pipx install lansenger-cli`。
323
+ - **alsoAllow** — 本插件註冊了 agent 工具(`lansenger_send_*`),但在嚴格工具策略下可能**不可見**。需在 `openclaw.json` 中新增 `"tools": { "alsoAllow": ["group:plugins"] }` 以確保 agent 能看到並使用這些工具。否則工具可能靜默不出現在 agent 工具列表中。
306
324
 
307
325
  ## 開發
308
326
 
@@ -332,9 +350,14 @@ openclaw-lansenger-channel/
332
350
  ├── src/
333
351
  │ ├── client.ts # 藍信 API 客戶端(WS、HTTP、媒體)
334
352
  │ ├── channel.ts # OpenClaw 频道插件
335
- │ ├── channel.test.ts # 频道插件測試
353
+ │ ├── runtime.ts # 網關運行時(方法、入站處理器)
336
354
  │ ├── tools.ts # 代理工具定義(10 個內建工具)
337
- └── runtime.ts # 網關運行時(方法、入站處理器)
355
+ ├── setup-wizard.ts # 設定精靈(多帳號配置遷移)
356
+ │ ├── channel.test.ts # 频道插件測試
357
+ │ ├── client.test.ts # API 客戶端測試
358
+ │ ├── runtime.test.ts # 運行時測試
359
+ │ ├── tools.test.ts # 工具測試
360
+ │ └── setup-wizard.test.ts # 設定精靈測試
338
361
  ├── skills/
339
362
  │ └── lansenger-messaging/
340
363
  │ └── SKILL.md # 代理訊息策略(工具 + CLI)
@@ -373,19 +396,20 @@ Agent 路由由 OpenClaw 的 `bindings[]` 設定管理——見[多 Agent 路由
373
396
 
374
397
  ## 更新日誌
375
398
 
399
+ - **v3.5.0** — 修正重複訊息發送(每回合去重);從檔案名稱中移除 OpenClaw UUID 後綴;MEDIA 白名單文件;alsoAllow 提示;README 准確性修正
376
400
  - **v3.3.0** — 合併 tools 插件至頻道插件;代理工具現已內建(無需單獨安裝);移除 `@lansenger-pm/openclaw-lansenger-tools` 的 peerDependencies
377
- - **v3.1** — 多帳號設定精靈;dmPolicy 對齊 OpenClaw 標準(dmSecurity→dmPolicy + paired→pairing);中英雙語提示文案;憑證 shouldPrompt 跳過已設定步驟;多帳號設定遷移清理
378
- - **v3.0** — 新增 `lansenger_send_format_text` 工具(Markdown + @提及);重寫 SKILL.md;修正 headStatusInfo description+colour 語義
379
- - **v2.10** — appCard font-size px→pt 自動轉換;sendImageUrl 錯誤分類;工具註冊日誌
380
- - **v2.9** — 狀態適配器;環境變數回退;uiHints 中文標籤;README 精簡(5 語言)
381
- - **v2.8** — OpenClaw `bindings[]` 多 Agent 路由;groupPolicy/groupAllowFrom/groups 羣聊准入;SKILL.md AgentSkills 規範
382
- - **v2.7** — 純物件工具註冊;運行時狀態取得 client/target
383
- - **v2.6** — 無條件註冊工具;移除幽靈 delete_message
384
- - **v2.5** — formatText reminder;AppArticles `summary`;撤回僅 bot/group
385
- - **v2.4** — 修復訊息體組裝;appArticles/linkCard 欄位修復
386
- - **v2.3** — 移除遺留羣組/私聊發送;全部透過 msgTarget 路由
387
- - **v2.2** — 新增 9 個 agent 工具
388
- - **v2.0** — 初始發佈
401
+ - **v3.1.0** — 多帳號設定精靈;dmPolicy 對齊 OpenClaw 標準(dmSecurity→dmPolicy + paired→pairing);中英雙語提示文案;憑證 shouldPrompt 跳過已設定步驟;多帳號設定遷移清理
402
+ - **v3.0.0** — 新增 `lansenger_send_format_text` 工具(Markdown + @提及);重寫 SKILL.md;修正 headStatusInfo description+colour 語義
403
+ - **v2.10.0** — appCard font-size px→pt 自動轉換;sendImageUrl 錯誤分類;工具註冊日誌
404
+ - **v2.9.0** — 狀態適配器;環境變數回退;uiHints 中文標籤;README 精簡(5 語言)
405
+ - **v2.8.0** — OpenClaw `bindings[]` 多 Agent 路由;groupPolicy/groupAllowFrom/groups 羣聊准入;SKILL.md AgentSkills 規範
406
+ - **v2.7.0** — 純物件工具註冊;運行時狀態取得 client/target
407
+ - **v2.6.0** — 無條件註冊工具;移除幽靈 delete_message
408
+ - **v2.5.0** — formatText reminder;AppArticles `summary`;撤回僅 bot/group
409
+ - **v2.4.0** — 修復訊息體組裝;appArticles/linkCard 欄位修復
410
+ - **v2.3.0** — 移除遺留羣組/私聊發送;全部透過 msgTarget 路由
411
+ - **v2.2.0** — 新增 9 個 agent 工具
412
+ - **v2.0.0** — 初始發佈
389
413
 
390
414
  ## 授權條款
391
415
 
@@ -446,8 +446,13 @@ export const lansengerPlugin = {
446
446
  buildChannelSummary: ({ snapshot, cfg }) => {
447
447
  const hasCfg = (() => {
448
448
  const section = cfg.channels?.["lansenger"];
449
- const configured = Boolean(section?.appId && section?.appSecret) || Boolean(process.env.LANSENGER_APP_ID && process.env.LANSENGER_APP_SECRET);
450
- return configured;
449
+ const accounts = section?.accounts;
450
+ const topLevel = Boolean(section?.appId && section?.appSecret);
451
+ const fromAccounts = accounts && Object.keys(accounts).length > 0
452
+ ? Object.values(accounts).some((a) => Boolean(a?.appId && a?.appSecret))
453
+ : false;
454
+ const fromEnv = Boolean(process.env.LANSENGER_APP_ID && process.env.LANSENGER_APP_SECRET);
455
+ return topLevel || fromAccounts || fromEnv;
451
456
  })();
452
457
  const patched = { ...snapshot, configured: snapshot.configured || hasCfg };
453
458
  return buildProbeChannelStatusSummary(patched);