@lansenger-pm/openclaw-lansenger-channel 3.17.10 → 3.18.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/CHANGELOG.md CHANGED
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [3.18.0] - 2026-07-15
8
+
9
+ ### Breaking
10
+
11
+ - **apiGatewayUrl is now required** — the default value `https://open.e.lanxin.cn/open/apigw` has been removed. Users must explicitly provide their enterprise gateway URL via `openclaw.json` config, setup wizard, or `LANSENGER_API_GATEWAY_URL` environment variable.
12
+
13
+ ### Changed
14
+
15
+ - `DEFAULT_API_GATEWAY_URL` constant removed from `LansengerClient`. `apiGatewayUrl` type changed to `string | undefined`; constructor logs error when omitted.
16
+ - Setup wizard: `apiGatewayUrl` field marked as required, placeholder changed to generic example.
17
+ - All documentation (5 READMEs, SKILL.md, openclaw.plugin.json): `apiGatewayUrl` marked as required, hardcoded gateway URLs replaced with placeholder `https://your-api-gateway.example.com`.
18
+ - Doc links updated: `https://open.e.lanxin.cn/docs` → `https://developer.lanxin.cn`.
19
+
7
20
  ## [3.17.10] - 2026-07-15
8
21
 
9
22
  ### Fixed
package/README.fr.md CHANGED
@@ -88,7 +88,7 @@ openclaw gateway restart
88
88
 
89
89
  > **Optionnel** : Installer `lansenger-cli` pour une alternative CLI : `pipx install lansenger-cli`.
90
90
 
91
- > **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).
91
+ > **L'URL de la passerelle API est obligatoire** : vous devez fournir l'URL de votre passerelle d'entreprise (par ex. `https://your-api-gateway.example.com`) via la configuration `openclaw.json` ou une variable d'environnement — voir [Configuration](#configuration).
92
92
 
93
93
  ### Installation de développement (lien local)
94
94
 
@@ -123,9 +123,9 @@ Ajoutez ces variables à `~/.openclaw/.env` ou à votre environnement :
123
123
  |----------|-------------|---------|
124
124
  | `LANSENGER_APP_ID` | App ID du robot personnel | `your-appid` |
125
125
  | `LANSENGER_APP_SECRET` | App Secret du robot personnel | `ABCDEF123456...` |
126
- | `LANSENGER_API_GATEWAY_URL` | URL de la passerelle API Lansenger (remplacement) | `https://open.e.lanxin.cn/open/apigw` |
126
+ | `LANSENGER_API_GATEWAY_URL` | URL de la passerelle API Lansenger (obligatoire) | — |
127
127
 
128
- 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.
128
+ La configuration peut aussi être fournie via `openclaw.json` (voir 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. `apiGatewayUrl` est obligatoire et n'a pas de valeur par défaut.
129
129
 
130
130
  > ⚠️ **Sécurité : Migrez appSecret vers le stockage SecretRef**
131
131
  >
@@ -143,7 +143,7 @@ Les identifiants peuvent aussi être fournis via la configuration `openclaw.json
143
143
 
144
144
  > ⚠️ **Le client mobile ne permet pas de voir les identifiants.** Utilisez uniquement le client desktop.
145
145
 
146
- ### Configuration optionnelle
146
+ ### Configuration
147
147
 
148
148
  ```json
149
149
  {
@@ -151,7 +151,7 @@ Les identifiants peuvent aussi être fournis via la configuration `openclaw.json
151
151
  "lansenger": {
152
152
  "appId": "your-appid",
153
153
  "appSecret": "your-secret",
154
- "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
154
+ "apiGatewayUrl": "https://your-api-gateway.example.com",
155
155
  "homeChannel": "xxx-xxx",
156
156
  "enabled": true,
157
157
  "allowFrom": ["your-appid"],
@@ -160,7 +160,7 @@ Les identifiants peuvent aussi être fournis via la configuration `openclaw.json
160
160
  "your-appid": {
161
161
  "appId": "your-appid",
162
162
  "appSecret": "...",
163
- "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw"
163
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
164
164
  }
165
165
  }
166
166
  }
@@ -172,7 +172,7 @@ Les identifiants peuvent aussi être fournis via la configuration `openclaw.json
172
172
  |-------|-------------|-------------------|
173
173
  | `appId` | App ID du robot personnel | — |
174
174
  | `appSecret` | App Secret du robot personnel | — |
175
- | `apiGatewayUrl` | URL de la passerelle API | `https://open.e.lanxin.cn/open/apigw` |
175
+ | `apiGatewayUrl` | URL de la passerelle API (obligatoire) | — |
176
176
  | `homeChannel` | Chat ID par défaut pour la livraison cron/notification | — |
177
177
  | `enabled` | Activer/désactiver le canal (défaut runtime : false sans identifiants) | `true` |
178
178
  | `allowFrom` | IDs d'utilisateurs autorisés en DM | `[]` |
@@ -225,7 +225,7 @@ Pour ajouter plusieurs robots, utilisez `openclaw config set` avec la structure
225
225
  # Ajouter un deuxième robot (remplacez appid/appsecret/gateway par vos valeurs)
226
226
  openclaw config set channels.lansenger.accounts.your-appid-2.appId "your-appid-2"
227
227
  openclaw config set channels.lansenger.accounts.your-appid-2.appSecret "your-appsecret"
228
- openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
228
+ openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://your-api-gateway.example.com"
229
229
 
230
230
  # Redémarrer pour appliquer
231
231
  openclaw gateway restart
@@ -244,12 +244,12 @@ Structure de configuration résultante :
244
244
  "your-appid-2": {
245
245
  "appId": "your-appid-2",
246
246
  "appSecret": "...",
247
- "apiGatewayUrl": "https://apigw.lx.qianxin.com"
247
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
248
248
  },
249
249
  "your-appid-1": {
250
250
  "appId": "your-appid-1",
251
251
  "appSecret": "...",
252
- "apiGatewayUrl": "https://apigw.lx.qianxin.com"
252
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
253
253
  }
254
254
  }
255
255
  }
@@ -386,7 +386,7 @@ Ou utiliser le propriétaire détecté automatiquement (`homeChannel`), défini
386
386
  - **appArticles** — utilise le champ `summary` (pas `description`).
387
387
  - **linkCard** — `description`, `iconLink`, `fromName`, `fromIconLink` sont requis (chaînes vides comme valeurs par défaut).
388
388
  - **Auto-routage msgTarget** — toutes les méthodes d'envoi routent automatiquement ; pas d'appels API groupe/privé séparés.
389
- - **URL passerelle par environnement** — e.g. `https://apigw.lx.qianxin.com` pour 奇安信, `https://open.e.lanxin.cn/open/apigw` pour Lansenger standard.
389
+ - **L'URL de la passerelle est obligatoire** — vous devez fournir l'URL de votre passerelle d'entreprise (par ex. `https://your-api-gateway.example.com`). Il n'y a pas de valeur par défaut.
390
390
  - **reminder** — champ optionnel dans formatText ; recommandé dans les chats de groupe. Inclure « @姓名 » dans le texte pour les mentions.
391
391
  - **Média** — les balises `<media>` fonctionnent pour les fichiers du workspace ; pour les chemins externes, utilisez `lansenger_send_file`.
392
392
  - **openclaw skill/message lansenger** — ces commandes CLI n'existent PAS ; utilisez les outils de l'agent.
package/README.md CHANGED
@@ -86,7 +86,7 @@ openclaw gateway restart
86
86
 
87
87
  > **Optional**: Install `lansenger-cli` for an alternative CLI-based messaging path: `pipx install lansenger-cli`.
88
88
 
89
- > **Custom gateway**: For enterprise deployments (e.g. 奇安信), set `apiGatewayUrl` in `openclaw.json` or environment after configuration — see [Optional Configuration](#optional-configuration).
89
+ > **API Gateway URL is required**: You must provide your enterprise gateway URL (e.g. `https://your-api-gateway.example.com`) via `openclaw.json` config or environment variable — see [Configuration](#configuration).
90
90
 
91
91
  ### Development install (linked)
92
92
 
@@ -115,9 +115,9 @@ Add these to `~/.openclaw/.env` or your environment:
115
115
  |----------|-------------|---------|
116
116
  | `LANSENGER_APP_ID` | Personal bot App ID | `your-appid` |
117
117
  | `LANSENGER_APP_SECRET` | Personal bot App Secret | `ABCDEF123456...` |
118
- | `LANSENGER_API_GATEWAY_URL` | Lansenger API Gateway URL override | `https://open.e.lanxin.cn/open/apigw` |
118
+ | `LANSENGER_API_GATEWAY_URL` | Lansenger API Gateway URL (required) | — |
119
119
 
120
- 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.
120
+ Configuration can also be provided via `openclaw.json` (see below). Config values take precedence; env vars are used as fallback when config is unset. `apiGatewayUrl` is required and has no default.
121
121
 
122
122
  > ⚠️ **Security: Migrate appSecret to SecretRef storage**
123
123
  >
@@ -135,7 +135,7 @@ Credentials can also be provided via `openclaw.json` config (see Optional Config
135
135
 
136
136
  > ⚠️ **Mobile client does NOT support viewing credentials.** Use the desktop client only.
137
137
 
138
- ### Optional Configuration
138
+ ### Configuration
139
139
 
140
140
  ```json
141
141
  {
@@ -143,7 +143,7 @@ Credentials can also be provided via `openclaw.json` config (see Optional Config
143
143
  "lansenger": {
144
144
  "appId": "your-appid",
145
145
  "appSecret": "your-secret",
146
- "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
146
+ "apiGatewayUrl": "https://your-api-gateway.example.com",
147
147
  "homeChannel": "xxx-xxx",
148
148
  "enabled": true,
149
149
  "allowFrom": ["your-appid"],
@@ -152,7 +152,7 @@ Credentials can also be provided via `openclaw.json` config (see Optional Config
152
152
  "your-appid": {
153
153
  "appId": "your-appid",
154
154
  "appSecret": "...",
155
- "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw"
155
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
156
156
  }
157
157
  }
158
158
  }
@@ -164,7 +164,7 @@ Credentials can also be provided via `openclaw.json` config (see Optional Config
164
164
  |-------|-------------|---------|
165
165
  | `appId` | Personal bot App ID | — |
166
166
  | `appSecret` | Personal bot App Secret | — |
167
- | `apiGatewayUrl` | API Gateway URL | `https://open.e.lanxin.cn/open/apigw` |
167
+ | `apiGatewayUrl` | API Gateway URL (required) | — |
168
168
  | `homeChannel` | Default chat ID for cron/notification delivery | — |
169
169
  | `enabled` | Enable/disable the channel (runtime default: false without credentials) | `true` |
170
170
  | `allowFrom` | User IDs allowed to DM the bot | `[]` |
@@ -217,7 +217,7 @@ For multiple bots, add additional accounts using `openclaw config set`:
217
217
  # Add a second bot (replace appid/appsecret/gateway with your values)
218
218
  openclaw config set channels.lansenger.accounts.your-appid-2.appId "your-appid-2"
219
219
  openclaw config set channels.lansenger.accounts.your-appid-2.appSecret "your-appsecret"
220
- openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
220
+ openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://your-api-gateway.example.com"
221
221
 
222
222
  # Restart to apply
223
223
  openclaw gateway restart
@@ -236,12 +236,12 @@ The resulting config structure:
236
236
  "your-appid-2": {
237
237
  "appId": "your-appid-2",
238
238
  "appSecret": "...",
239
- "apiGatewayUrl": "https://apigw.lx.qianxin.com"
239
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
240
240
  },
241
241
  "your-appid-1": {
242
242
  "appId": "your-appid-1",
243
243
  "appSecret": "...",
244
- "apiGatewayUrl": "https://apigw.lx.qianxin.com"
244
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
245
245
  }
246
246
  }
247
247
  }
@@ -378,7 +378,7 @@ Or rely on the auto-detected bot owner (`homeChannel`), which is set automatical
378
378
  - **appArticles** — uses `summary` field (not `description`).
379
379
  - **linkCard** — `description`, `iconLink`, `fromName`, `fromIconLink` are required (empty strings as defaults).
380
380
  - **msgTarget auto-routing** — all send methods route automatically; no separate group/private API calls.
381
- - **Gateway URL per-environment** — e.g. `https://apigw.lx.qianxin.com` for 奇安信, `https://open.e.lanxin.cn/open/apigw` for standard Lansenger.
381
+ - **Gateway URL is required** — you must provide your enterprise gateway URL (e.g. `https://your-api-gateway.example.com`). There is no default.
382
382
  - **reminder** — optional in formatText; recommended in group chat. Include "@姓名" in text when mentioning.
383
383
  - **Media** — `<media>` tags work for workspace files; for external paths use `lansenger_send_file`.
384
384
  - **openclaw skill/message lansenger** — these CLI commands do NOT exist; use agent tools instead.
package/README.zhHans.md CHANGED
@@ -88,7 +88,7 @@ openclaw gateway restart
88
88
 
89
89
  > **可选**:安装 `lansenger-cli` 作为 CLI 替代方案:`pipx install lansenger-cli`。
90
90
 
91
- > **自定义网关**:企业私有化部署(如奇安信)需在配置后通过 `openclaw.json` 或环境变量设置 `apiGatewayUrl` — 见[可选配置](#可选配置)。
91
+ > **API 网关地址必填**:必须通过 `openclaw.json` 配置或环境变量提供企业网关地址(如 `https://your-api-gateway.example.com`)— 见[配置说明](#配置说明)。
92
92
 
93
93
  ### 开发安装(本地链接)
94
94
 
@@ -123,9 +123,9 @@ openclaw pairing approve lansenger <配对码>
123
123
  |------|------|------|
124
124
  | `LANSENGER_APP_ID` | 个人机器人 App ID | `your-appid` |
125
125
  | `LANSENGER_APP_SECRET` | 个人机器人 App Secret | `ABCDEF123456...` |
126
- | `LANSENGER_API_GATEWAY_URL` | 蓝信 API 网关 URL 覆盖 | `https://open.e.lanxin.cn/open/apigw` |
126
+ | `LANSENGER_API_GATEWAY_URL` | 蓝信 API 网关 URL(必填) | — |
127
127
 
128
- 凭证也可通过 `openclaw.json` 配置提供(见下方可选配置)。配置值优先;环境变量仅在配置未设置时作为回退。
128
+ 配置也可通过 `openclaw.json` 提供(见下方配置说明)。配置值优先;环境变量仅在配置未设置时作为回退。`apiGatewayUrl` 为必填项,无默认值。
129
129
 
130
130
  > ⚠️ **安全:将 appSecret 迁移至 SecretRef 存储**
131
131
  >
@@ -143,7 +143,7 @@ openclaw pairing approve lansenger <配对码>
143
143
 
144
144
  > ⚠️ **移动端不支持查看凭证。** 请仅使用桌面端。
145
145
 
146
- ### 可选配置
146
+ ### 配置说明
147
147
 
148
148
  ```json
149
149
  {
@@ -151,7 +151,7 @@ openclaw pairing approve lansenger <配对码>
151
151
  "lansenger": {
152
152
  "appId": "your-appid",
153
153
  "appSecret": "your-secret",
154
- "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
154
+ "apiGatewayUrl": "https://your-api-gateway.example.com",
155
155
  "homeChannel": "xxx-xxx",
156
156
  "enabled": true,
157
157
  "allowFrom": ["your-appid"],
@@ -160,7 +160,7 @@ openclaw pairing approve lansenger <配对码>
160
160
  "your-appid": {
161
161
  "appId": "your-appid",
162
162
  "appSecret": "...",
163
- "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw"
163
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
164
164
  }
165
165
  }
166
166
  }
@@ -172,7 +172,7 @@ openclaw pairing approve lansenger <配对码>
172
172
  |------|------|--------|
173
173
  | `appId` | 个人机器人 App ID | — |
174
174
  | `appSecret` | 个人机器人 App Secret | — |
175
- | `apiGatewayUrl` | API 网关 URL | `https://open.e.lanxin.cn/open/apigw` |
175
+ | `apiGatewayUrl` | API 网关 URL(必填) | — |
176
176
  | `homeChannel` | 定时任务/通知送达的默认聊天 ID | — |
177
177
  | `enabled` | 启用/禁用频道(运行时默认:无凭证时为 false) | `true` |
178
178
  | `allowFrom` | 允许私聊的用户 ID | `[]` |
@@ -225,7 +225,7 @@ openclaw pairing approve lansenger <配对码>
225
225
  # 添加第二个机器人(替换 appid/appsecret/gateway 为你的值)
226
226
  openclaw config set channels.lansenger.accounts.your-appid-2.appId "your-appid-2"
227
227
  openclaw config set channels.lansenger.accounts.your-appid-2.appSecret "your-appsecret"
228
- openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
228
+ openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://your-api-gateway.example.com"
229
229
 
230
230
  # 重启生效
231
231
  openclaw gateway restart
@@ -244,12 +244,12 @@ openclaw gateway restart
244
244
  "your-appid-2": {
245
245
  "appId": "your-appid-2",
246
246
  "appSecret": "...",
247
- "apiGatewayUrl": "https://apigw.lx.qianxin.com"
247
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
248
248
  },
249
249
  "your-appid-1": {
250
250
  "appId": "your-appid-1",
251
251
  "appSecret": "...",
252
- "apiGatewayUrl": "https://apigw.lx.qianxin.com"
252
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
253
253
  }
254
254
  }
255
255
  }
@@ -386,7 +386,7 @@ openclaw config set commands.ownerAllowFrom '["lansenger:用户ID-1", "lansenger
386
386
  - **appArticles** — 使用 `summary` 字段(不是 `description`)。
387
387
  - **linkCard** — `description`、`iconLink`、`fromName`、`fromIconLink` 为必填字段(可用空字符串作为默认值)。
388
388
  - **msgTarget 自动路由** — 所有发送方法自动路由,无需单独调用群聊/私聊 API。
389
- - **网关 URL 因环境不同** — 如 `https://apigw.lx.qianxin.com` 用于奇安信部署,`https://open.e.lanxin.cn/open/apigw` 用于标准蓝信。
389
+ - **网关 URL 为必填项** — 您必须提供企业网关地址(如 `https://your-api-gateway.example.com`),无默认值。
390
390
  - **reminder** — formatText 中可选字段;群聊中建议使用。提及用户时在文本中包含"@姓名"。
391
391
  - **媒体标签** — `<media>` 标签适用于工作区文件;外部路径请使用 `lansenger_send_file`。
392
392
  - **openclaw skill/message lansenger** — 这些 CLI 命令不存在;请使用代理工具。
package/README.zhHant.md CHANGED
@@ -88,7 +88,7 @@ openclaw gateway restart
88
88
 
89
89
  > **可選**:安裝 `lansenger-cli` 作為 CLI 替代方案:`pipx install lansenger-cli`。
90
90
 
91
- > **自訂閘道**:企業私有化部署(如奇安信)需在設定後透過 `openclaw.json` 或環境變數設定 `apiGatewayUrl` — 見[可選設定](#可選設定)。
91
+ > **API 閘道地址必填**:必須透過 `openclaw.json` 配置或環境變數提供企業閘道地址(如 `https://your-api-gateway.example.com`)— 見[設定說明](#設定說明)。
92
92
 
93
93
  ### 開發安裝(本地連結)
94
94
 
@@ -123,9 +123,9 @@ openclaw pairing approve lansenger <配對碼>
123
123
  |------|------|------|
124
124
  | `LANSENGER_APP_ID` | 個人機器人 App ID | `your-appid` |
125
125
  | `LANSENGER_APP_SECRET` | 個人機器人 App Secret | `ABCDEF123456...` |
126
- | `LANSENGER_API_GATEWAY_URL` | 藍信 API 閘道 URL 覆蓋 | `https://open.e.lanxin.cn/open/apigw` |
126
+ | `LANSENGER_API_GATEWAY_URL` | 藍信 API 閘道 URL(必填) | — |
127
127
 
128
- 憑證也可透過 `openclaw.json` 配置提供(見下方可選設定)。配置值優先;環境變數僅在配置未設定時作為回退。
128
+ 配置也可透過 `openclaw.json` 提供(見下方設定說明)。配置值優先;環境變數僅在配置未設定時作為回退。`apiGatewayUrl` 為必填項,無預設值。
129
129
 
130
130
  > ⚠️ **安全:將 appSecret 遷移至 SecretRef 儲存**
131
131
  >
@@ -143,7 +143,7 @@ openclaw pairing approve lansenger <配對碼>
143
143
 
144
144
  > ⚠️ **行動端不支援查看憑證。** 請僅使用桌面端。
145
145
 
146
- ### 可選設定
146
+ ### 設定說明
147
147
 
148
148
  ```json
149
149
  {
@@ -151,7 +151,7 @@ openclaw pairing approve lansenger <配對碼>
151
151
  "lansenger": {
152
152
  "appId": "your-appid",
153
153
  "appSecret": "your-secret",
154
- "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
154
+ "apiGatewayUrl": "https://your-api-gateway.example.com",
155
155
  "homeChannel": "xxx-xxx",
156
156
  "enabled": true,
157
157
  "allowFrom": ["your-appid"],
@@ -160,7 +160,7 @@ openclaw pairing approve lansenger <配對碼>
160
160
  "your-appid": {
161
161
  "appId": "your-appid",
162
162
  "appSecret": "...",
163
- "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw"
163
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
164
164
  }
165
165
  }
166
166
  }
@@ -172,7 +172,7 @@ openclaw pairing approve lansenger <配對碼>
172
172
  |------|------|--------|
173
173
  | `appId` | 個人機器人 App ID | — |
174
174
  | `appSecret` | 個人機器人 App Secret | — |
175
- | `apiGatewayUrl` | API 閘道 URL | `https://open.e.lanxin.cn/open/apigw` |
175
+ | `apiGatewayUrl` | API 閘道 URL(必填) | — |
176
176
  | `homeChannel` | 定時任務/通知遞送的預設聊天 ID | — |
177
177
  | `enabled` | 啟用/禁用頻道(運行時預設:無憑證時為 false) | `true` |
178
178
  | `allowFrom` | 允許私聊的使用者 ID | `[]` |
@@ -225,7 +225,7 @@ openclaw pairing approve lansenger <配對碼>
225
225
  # 新增第二個機器人(替換 appid/appsecret/gateway 為你的值)
226
226
  openclaw config set channels.lansenger.accounts.your-appid-2.appId "your-appid-2"
227
227
  openclaw config set channels.lansenger.accounts.your-appid-2.appSecret "your-appsecret"
228
- openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
228
+ openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://your-api-gateway.example.com"
229
229
 
230
230
  # 重啟生效
231
231
  openclaw gateway restart
@@ -244,12 +244,12 @@ openclaw gateway restart
244
244
  "your-appid-2": {
245
245
  "appId": "your-appid-2",
246
246
  "appSecret": "...",
247
- "apiGatewayUrl": "https://apigw.lx.qianxin.com"
247
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
248
248
  },
249
249
  "your-appid-1": {
250
250
  "appId": "your-appid-1",
251
251
  "appSecret": "...",
252
- "apiGatewayUrl": "https://apigw.lx.qianxin.com"
252
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
253
253
  }
254
254
  }
255
255
  }
@@ -386,7 +386,7 @@ openclaw config set commands.ownerAllowFrom '["lansenger:使用者ID-1", "lansen
386
386
  - **appArticles**——使用 `summary` 欄位(不是 `description`)。
387
387
  - **linkCard**——`description`、`iconLink`、`fromName`、`fromIconLink` 為必填欄位(可用空字串作為預設值)。
388
388
  - **msgTarget 自動路由**——所有傳送方法自動路由,無需分別呼叫群組/私聊 API。
389
- - **閘道 URL 因環境不同**——如 `https://apigw.lx.qianxin.com` 用於奇安信部署,`https://open.e.lanxin.cn/open/apigw` 用於標準藍信。
389
+ - **閘道 URL 為必填項** — 您必須提供企業閘道地址(如 `https://your-api-gateway.example.com`),無預設值。
390
390
  - **reminder**——formatText 中可選欄位;群組聊天中建議使用。提及使用者時在文字中包含「@姓名」。
391
391
  - **媒體標籤**——`<media>` 標籤適用於工作區檔案;外部路徑請使用 `lansenger_send_file`。
392
392
  - **openclaw skill/message lansenger**——這些 CLI 命令不存在;請使用代理工具。
@@ -88,7 +88,7 @@ openclaw gateway restart
88
88
 
89
89
  > **可選**:安裝 `lansenger-cli` 作為 CLI 替代方案:`pipx install lansenger-cli`。
90
90
 
91
- > **自訂網關**:企業私有化部署(如奇安信)需在設定後透過 `openclaw.json` 或環境變數設定 `apiGatewayUrl` — 見[可選設定](#可選設定)。
91
+ > **API 網關地址必填**:必須透過 `openclaw.json` 配置或環境變數提供企業網關地址(如 `https://your-api-gateway.example.com`)— 見[設定說明](#設定說明)。
92
92
 
93
93
  ### 開發安裝(本地連結)
94
94
 
@@ -123,9 +123,9 @@ openclaw pairing approve lansenger <配對碼>
123
123
  |------|------|------|
124
124
  | `LANSENGER_APP_ID` | 個人機械人 App ID | `your-appid` |
125
125
  | `LANSENGER_APP_SECRET` | 個人機械人 App Secret | `ABCDEF123456...` |
126
- | `LANSENGER_API_GATEWAY_URL` | 藍信 API 網關 URL 覆蓋 | `https://open.e.lanxin.cn/open/apigw` |
126
+ | `LANSENGER_API_GATEWAY_URL` | 藍信 API 網關 URL(必填) | — |
127
127
 
128
- 憑證也可透過 `openclaw.json` 配置提供(見下方可選設定)。配置值優先;環境變數僅在配置未設定時作為回退。
128
+ 配置也可透過 `openclaw.json` 提供(見下方設定說明)。配置值優先;環境變數僅在配置未設定時作為回退。`apiGatewayUrl` 為必填項,無預設值。
129
129
 
130
130
  > ⚠️ **安全:將 appSecret 遷移至 SecretRef 儲存**
131
131
  >
@@ -143,7 +143,7 @@ openclaw pairing approve lansenger <配對碼>
143
143
 
144
144
  > ⚠️ **行動端不支援查看憑證。** 請僅使用桌面端。
145
145
 
146
- ### 可選設定
146
+ ### 設定說明
147
147
 
148
148
  ```json
149
149
  {
@@ -151,7 +151,7 @@ openclaw pairing approve lansenger <配對碼>
151
151
  "lansenger": {
152
152
  "appId": "your-appid",
153
153
  "appSecret": "your-secret",
154
- "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw",
154
+ "apiGatewayUrl": "https://your-api-gateway.example.com",
155
155
  "homeChannel": "xxx-xxx",
156
156
  "enabled": true,
157
157
  "allowFrom": ["your-appid"],
@@ -160,7 +160,7 @@ openclaw pairing approve lansenger <配對碼>
160
160
  "your-appid": {
161
161
  "appId": "your-appid",
162
162
  "appSecret": "...",
163
- "apiGatewayUrl": "https://open.e.lanxin.cn/open/apigw"
163
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
164
164
  }
165
165
  }
166
166
  }
@@ -172,7 +172,7 @@ openclaw pairing approve lansenger <配對碼>
172
172
  |------|------|--------|
173
173
  | `appId` | 個人機械人 App ID | — |
174
174
  | `appSecret` | 個人機械人 App Secret | — |
175
- | `apiGatewayUrl` | API 網關 URL | `https://open.e.lanxin.cn/open/apigw` |
175
+ | `apiGatewayUrl` | API 網關 URL(必填) | — |
176
176
  | `homeChannel` | 定時任務/通知遞送的預設聊天 ID | — |
177
177
  | `enabled` | 啟用/禁用頻道(運行時預設:無憑證時為 false) | `true` |
178
178
  | `allowFrom` | 允許私聊的使用者 ID | `[]` |
@@ -227,7 +227,7 @@ openclaw pairing approve lansenger <配對碼>
227
227
  # 新增第二個機械人(替換 appid/appsecret/gateway 為你的值)
228
228
  openclaw config set channels.lansenger.accounts.your-appid-2.appId "your-appid-2"
229
229
  openclaw config set channels.lansenger.accounts.your-appid-2.appSecret "your-appsecret"
230
- openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://apigw.lx.qianxin.com"
230
+ openclaw config set channels.lansenger.accounts.your-appid-2.apiGatewayUrl "https://your-api-gateway.example.com"
231
231
 
232
232
  # 重啟生效
233
233
  openclaw gateway restart
@@ -246,12 +246,12 @@ openclaw gateway restart
246
246
  "your-appid-2": {
247
247
  "appId": "your-appid-2",
248
248
  "appSecret": "...",
249
- "apiGatewayUrl": "https://apigw.lx.qianxin.com"
249
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
250
250
  },
251
251
  "your-appid-1": {
252
252
  "appId": "your-appid-1",
253
253
  "appSecret": "...",
254
- "apiGatewayUrl": "https://apigw.lx.qianxin.com"
254
+ "apiGatewayUrl": "https://your-api-gateway.example.com"
255
255
  }
256
256
  }
257
257
  }
@@ -388,7 +388,7 @@ openclaw config set commands.ownerAllowFrom '["lansenger:使用者ID-1", "lansen
388
388
  - **appArticles** — 使用 `summary` 欄位(不是 `description`)。
389
389
  - **linkCard** — `description`、`iconLink`、`fromName`、`fromIconLink` 為必填欄位(可用空字串作為預設值)。
390
390
  - **msgTarget 自動路由** — 所有發送方法自動路由,無需分別呼叫群組/私聊 API。
391
- - **網關 URL 因環境不同** — 如 `https://apigw.lx.qianxin.com` 用於奇安信部署,`https://open.e.lanxin.cn/open/apigw` 用於標準藍信。
391
+ - **網關 URL 為必填項** — 您必須提供企業網關地址(如 `https://your-api-gateway.example.com`),無預設值。
392
392
  - **reminder** — formatText 中可選欄位;群組聊天中建議使用。提及使用者時在文字中包含「@姓名」。
393
393
  - **媒體標籤** — `<media>` 標籤適用於工作區檔案;外部路徑請使用 `lansenger_send_file`。
394
394
  - **openclaw skill/message lansenger** — 這些 CLI 命令不存在;請使用代理工具。
@@ -14,7 +14,7 @@ import * as fs from "node:fs/promises";
14
14
  import * as os from "node:os";
15
15
  import * as path from "node:path";
16
16
  import * as crypto from "node:crypto";
17
- import { LansengerClient, DEFAULT_API_GATEWAY_URL } from "./client.js";
17
+ import { LansengerClient } from "./client.js";
18
18
  import { getRunningClientByAccountId, getSessionAccountId, getLastInboundTimeByAccountId, stripOpenClawUuidSuffix, gatewayStartAccount, gatewayStopAccount } from "./runtime.js";
19
19
  import { lansengerSetupWizard } from "./setup-wizard.js";
20
20
  import { channelSecrets } from "./secret-contract.js";
@@ -134,7 +134,7 @@ function resolveAccount(cfg, accountId) {
134
134
  log.warn(`⚠️ appSecret for account '${resolvedAccountId || "default"}' is stored as plaintext in openclaw.json. ` +
135
135
  `Migrate to SecretRef for better security: run 'openclaw secrets configure'`);
136
136
  }
137
- const apiGatewayUrl = account?.apiGatewayUrl ?? section?.apiGatewayUrl ?? process.env.LANSENGER_API_GATEWAY_URL ?? DEFAULT_API_GATEWAY_URL;
137
+ const apiGatewayUrl = account?.apiGatewayUrl ?? section?.apiGatewayUrl ?? process.env.LANSENGER_API_GATEWAY_URL;
138
138
  // ── Config field priority in multi-account mode ──────────────────────────
139
139
  //
140
140
  // Two distinct priority patterns are used deliberately, NOT a bug:
@@ -281,7 +281,7 @@ const chatPlugin = createChatChannelPlugin({
281
281
  meta: {
282
282
  label: "Lansenger (蓝信)",
283
283
  selectionLabel: "Lansenger (蓝信)",
284
- docsPath: "https://open.e.lanxin.cn/docs",
284
+ docsPath: "https://developer.lanxin.cn",
285
285
  blurb: "Connect OpenClaw to Lansenger enterprise messaging platform. / 连接 OpenClaw 与蓝信企业即时通讯平台。",
286
286
  markdownCapable: true,
287
287
  },
@@ -481,7 +481,7 @@ const chatPlugin = createChatChannelPlugin({
481
481
  ? Object.values(accounts).every((a) => !a?.appId || Boolean(a?.apiGatewayUrl))
482
482
  : true;
483
483
  if (!topLevelGatewayUrl && !envHasGatewayUrl && !allAccountsWithAppIdHaveGatewayUrl && (topLevelAppId || hasAnyCompleteAccount || envHasAppId)) {
484
- warnings.push("Lansenger apiGatewayUrl is not set — most enterprise deployments require a custom gateway URL (e.g. https://apigw.lx.qianxin.com). The default https://open.e.lanxin.cn/open/apigw only works for Lansenger public cloud. / 蓝信 apiGatewayUrl 未设置 — 大部分企业部署需要自定义网关地址(如 https://apigw.lx.qianxin.com),默认地址仅适用于蓝信公有云。");
484
+ warnings.push("Lansenger apiGatewayUrl is not set — it is required for all deployments. Please provide your enterprise gateway URL. / 蓝信 apiGatewayUrl 未设置 — 此为必填项,请提供您的企业网关地址。");
485
485
  }
486
486
  if (accounts) {
487
487
  for (const [key, acc] of Object.entries(accounts)) {
@@ -546,7 +546,7 @@ const chatPlugin = createChatChannelPlugin({
546
546
  ? Object.values(accounts).every((a) => !a?.appId || Boolean(a?.apiGatewayUrl))
547
547
  : true;
548
548
  if (!topLevelGatewayUrl && !envHasGatewayUrl && !allAccountsWithAppIdHaveGatewayUrl && (topLevelAppId || hasAnyCompleteAccount || envHasAppId)) {
549
- findings.push({ checkId: "lansenger/apigatewayurl-not-set", severity: "warn", title: "apiGatewayUrl not set / API 网关地址未设置", detail: "Most enterprise deployments require a custom gateway URL (e.g. https://apigw.lx.qianxin.com). The default https://open.e.lanxin.cn/open/apigw only works for Lansenger public cloud. / 大部分企业部署需要自定义网关地址,默认地址仅适用于蓝信公有云。", remediation: "openclaw config set channels.lansenger.apiGatewayUrl https://apigw.lx.qianxin.com (or your enterprise gateway URL)" });
549
+ findings.push({ checkId: "lansenger/apigatewayurl-not-set", severity: "warn", title: "apiGatewayUrl not set / API 网关地址未设置", detail: "apiGatewayUrl is required for all deployments. Please provide your enterprise gateway URL. / apiGatewayUrl 为必填项,请提供您的企业网关地址。", remediation: "openclaw config set channels.lansenger.apiGatewayUrl <your-gateway-url>" });
550
550
  }
551
551
  if (accounts) {
552
552
  for (const [key, acc] of Object.entries(accounts)) {
@@ -774,9 +774,9 @@ const lansengerOnboarding = {
774
774
  "",
775
775
  "🔧 After Getting Credentials / 获取凭证后:",
776
776
  " 1. Enter App ID and App Secret in the configuration / 在配置中输入 App ID 和 App Secret",
777
- " 2. API Gateway URL is optional / API 网关地址可选",
778
- " Default: https://open.e.lanxin.cn/open/apigw (Lansenger public cloud) /",
779
- " 默认:https://open.e.lanxin.cn/open/apigw(蓝信公有云)",
777
+ " 2. API Gateway URL is required / API 网关地址必填",
778
+ " Example: https://your-api-gateway.example.com /",
779
+ " 示例:https://your-api-gateway.example.com",
780
780
  "",
781
781
  "🤝 Multi-Bot Support / 多机器人支持:",
782
782
  " - Each bot has independent App ID and App Secret / 每个机器人配置独立的 App ID 和 App Secret",
@@ -837,9 +837,9 @@ const lansengerOnboarding = {
837
837
  validate: (v) => String(v ?? "").trim() ? undefined : "Required / 必填",
838
838
  })).trim();
839
839
  apiGatewayUrl = String(await prompter.text({
840
- message: "API Gateway URL (Optional / 可选)",
841
- initialValue: "https://open.e.lanxin.cn/open/apigw",
842
- validate: () => undefined,
840
+ message: "API Gateway URL (Required / 必填)",
841
+ initialValue: "",
842
+ validate: (v) => String(v ?? "").trim() ? undefined : "Required / 必填",
843
843
  })).trim();
844
844
  }
845
845
  const channels = { ...(cfg.channels ?? {}) };