@lansenger-pm/openclaw-lansenger-channel 3.12.2 → 3.13.0
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 +95 -36
- package/dist/src/setup-i18n.js +60 -0
- package/dist/src/setup-i18n.js.map +1 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,70 +4,81 @@ 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.
|
|
7
|
+
## [3.13.0] - 2026-06-03
|
|
8
|
+
|
|
9
|
+
> **Compatible with OpenClaw `^2026.5.28`** (tested against `2026.5.28`).
|
|
10
|
+
|
|
11
|
+
### Bug Fix
|
|
12
|
+
|
|
13
|
+
- **Missing `dist/src/setup-i18n.*` in npm package**: `setup-wizard.js` imports `./setup-i18n.js`, but the `files` field in `package.json` did not include `dist/src/setup-i18n.*`, causing `Cannot find module './setup-i18n.js'` at gateway startup. Added `dist/src/setup-i18n.*` to the `files` array.
|
|
8
14
|
|
|
9
15
|
### Outbound Hook Expansion
|
|
10
16
|
|
|
11
|
-
- **`reply_payload_sending` hook**: Register typed plugin hook via `api.on()` for lansenger channel. Intercepts reply payloads before delivery
|
|
12
|
-
- **`
|
|
13
|
-
- **`
|
|
14
|
-
- **`
|
|
15
|
-
- **`
|
|
17
|
+
- **`reply_payload_sending` hook**: Register typed plugin hook via `api.on()` for the lansenger channel. Intercepts reply payloads before delivery — enables logging, approval context injection, and payload rewrite/cancel decisions.
|
|
18
|
+
- **`message_sending` hook**: Register hook in gateway startup for early-stage reply interception.
|
|
19
|
+
- **`normalizePayload` — code-block detection**: Payloads containing `\`\`\`` code fences are now marked `_lansengerFormatText: true` even when they also carry `mediaUrl` or `presentation`. Previously, code-rich agent replies with attachments fell back to plain-text `msgType`, losing Markdown formatting. Now they always render via `formatText`.
|
|
20
|
+
- **`beforeDeliverPayload` — approval-resolved crash recovery**: When `hint.kind === "approval-resolved"`, the delivery pipeline now proactively updates the original appCard status via `updateDynamicCard`. Because the delivery pipeline replays on gateway restart, this provides crash-recovery safety.
|
|
21
|
+
- **`shouldSuppressLocalPayloadPrompt`**: Suppresses the local text prompt when the native approval route is active (`hint.kind === "approval-pending"` with `nativeRouteActive === true`). Prevents duplicate approval prompts.
|
|
22
|
+
- **`pendingApprovalCards` Map**: Tracks sent approval card `messageId`s keyed by `chatId`. Enables `beforeDeliverPayload` to correlate approval-resolved payloads with the original card for status updates.
|
|
16
23
|
- **Text chunking**: Add `textChunkLimit: 4000`, `chunkerMode: "markdown"`, and `chunker` (using SDK `chunkMarkdownTextWithMode`). Long agent replies are automatically split into multiple Lansenger messages, preserving Markdown structure across chunks.
|
|
17
24
|
- **`resolveEffectiveTextChunkLimit`**: Uses SDK `resolveTextChunkLimit` to allow config-level override of the chunk limit.
|
|
25
|
+
- Add `normalizePayload` and `beforeDeliverPayload` callbacks on outbound base (structural preparation for outbound hooks).
|
|
26
|
+
- Add session-scoped delivery dedup (`sessionDeliveryTracker`) to prevent duplicate sends across turns in the same session.
|
|
18
27
|
|
|
19
|
-
###
|
|
28
|
+
### OpenClaw 2026.5.27–28 Compatibility
|
|
20
29
|
|
|
21
|
-
- `
|
|
22
|
-
-
|
|
30
|
+
- Migrate `api.runtime.channel.turn` → `api.runtime.channel.inbound` (OpenClaw removed the old `turn` runtime alias; the new `inbound` namespace provides the same `run` function with identical parameters). This is a **required** migration — the old `turn` alias no longer exists in OpenClaw 2026.5.27.
|
|
31
|
+
- Thread canonical `sessionKey` into outbound hooks (`sendText`, `sendMedia`, `sendFormattedText`) for multi-session/multi-agent routing and dedup.
|
|
32
|
+
- Fallback `sessionKey` now includes `accountId` for multi-bot scenarios (`agent:main:lansenger:<accountId>:<chatType>:<chatId>`).
|
|
33
|
+
- Pin npm install spec to exact version (`@lansenger-pm/openclaw-lansenger-channel@3.13.0`) to prevent supply-chain attacks and accidental upgrades.
|
|
34
|
+
- Bump `openclaw` devDependency from `^2026.5.20` to `^2026.5.28`.
|
|
35
|
+
- Split changelog out of READMEs into standalone `CHANGELOG.md` (all 5 locale READMEs now reference this file).
|
|
23
36
|
|
|
24
|
-
|
|
37
|
+
### Approval Flow Enhancement
|
|
25
38
|
|
|
26
|
-
|
|
39
|
+
- `approvalCapability.transport.send` now stores card `messageId` in `pendingApprovalCards` for later correlation in `beforeDeliverPayload`.
|
|
40
|
+
- Card status updates (pending → approved/denied) now happen via both `transport.update` (approval framework) and `beforeDeliverPayload` (delivery pipeline). The latter provides crash-recovery safety.
|
|
27
41
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
- Bump `openclaw` devDependency to `^2026.5.28`.
|
|
42
|
+
### Setup Wizard i18n
|
|
43
|
+
|
|
44
|
+
- **Locale-aware setup wizard**: Replace all bilingual hard-coded strings (`"Chinese / English"`) with `createSetupTranslator()` + plugin-owned dictionary. The wizard now displays in the user's locale (resolved from `OPENCLAW_LOCALE` → `LC_ALL` → `LC_MESSAGES` → `LANG`, fallback English).
|
|
45
|
+
- Supported locales: **`en`**, **`zh-CN`**, **`zh-TW`**. French and other locales fall back to English for wizard prompts (READMEs remain 5-language).
|
|
46
|
+
- Common strings (status labels, "Docs:" prefix, etc.) use the built-in OpenClaw catalog keys (`wizard.channels.*`). Plugin-specific strings use a local dictionary with `lt()`.
|
|
47
|
+
- New file: `src/setup-i18n.ts` — locale resolver + 40+ entry dictionary.
|
|
35
48
|
|
|
36
49
|
### Security
|
|
37
50
|
|
|
38
|
-
- **SecretRef support for appSecret**: `resolveAccount()` now detects SecretRef objects via `coerceSecretRef()` and resolves from env vars. No need to store appSecret as plaintext in config.
|
|
39
|
-
- **Plaintext appSecret warning
|
|
40
|
-
- **
|
|
41
|
-
-
|
|
51
|
+
- **SecretRef support for appSecret**: `resolveAccount()` now detects SecretRef objects via `coerceSecretRef()` and resolves from env vars. No need to store appSecret as plaintext in config. After running `openclaw secrets configure`, the config contains `__OPENCLAW_SECRET__({ref_id})` instead of the raw secret value, while the actual value is stored in the system credential store.
|
|
52
|
+
- **Plaintext appSecret warning in `resolveAccount()`**: Emits `log.warn` on every gateway startup when `appSecret` is stored as a plaintext string in `openclaw.json`, advising migration to SecretRef via `openclaw secrets configure`.
|
|
53
|
+
- **Plaintext appSecurity warning in setup wizard `finalize`**: Console output in the user's locale when plaintext appSecret is detected after config migration.
|
|
54
|
+
- **`securityNote` in setup wizard**: A conditional note that appears only when a plaintext appSecret exists, with locale-appropriate migration instructions.
|
|
55
|
+
- **README security advisory**: All 5 locale READMEs now include a prominent `⚠️ Security: Migrate appSecret to SecretRef storage` block.
|
|
56
|
+
- **SSRF protection for sendImageUrl**: `assertHttpUrlTargetsPrivateNetwork()` blocks RFC1918/link-local/metadata-IP targets by default.
|
|
42
57
|
- **`dangerouslyAllowPrivateNetwork` config**: Opt-in at top-level or per-account to allow private network image URLs. Audit finding (`lansenger/dangerously-allow-private-network`) warns when enabled.
|
|
43
|
-
- **`mediaLocalRoots` config**: Restrict local file delivery to configured directories.
|
|
58
|
+
- **`mediaLocalRoots` config**: Restrict local file delivery to configured directories. Prevents agents from accessing arbitrary files outside allowed roots. Available at top-level and per-account.
|
|
44
59
|
- **Path validation**: `isPathAllowed()` validates local file paths against `mediaLocalRoots` before delivery; blocked paths are logged and skipped.
|
|
45
60
|
|
|
46
|
-
## [3.12.0] - 2026-05-29
|
|
47
|
-
|
|
48
|
-
### OpenClaw 2026.5.27 Compatibility
|
|
49
|
-
|
|
50
|
-
- Migrate `api.runtime.channel.turn` → `api.runtime.channel.inbound` (OpenClaw removed the old `turn` runtime alias from `PluginRuntimeChannel`; the new `inbound` namespace provides the same `run` function with identical parameters).
|
|
51
|
-
- Bump `openclaw` devDependency from `^2026.5.20` to `^2026.5.27`.
|
|
52
|
-
- Split changelog out of READMEs into standalone `CHANGELOG.md` (all 5 locale READMEs now reference this file).
|
|
53
|
-
|
|
54
61
|
## [3.11.0] - 2026-05-26
|
|
55
62
|
|
|
63
|
+
> **Compatible with OpenClaw `^2026.5.20`** (tested against `2026.5.20` and `2026.5.22`).
|
|
64
|
+
|
|
56
65
|
### Breaking Changes
|
|
57
66
|
|
|
58
|
-
- Remove `child_process` dependency (was blocking OpenClaw install due to security scan).
|
|
59
|
-
- Video messages now require manual `coverImagePath`
|
|
67
|
+
- Remove `child_process` dependency (was blocking OpenClaw install due to security scan). OpenClaw's built-in dangerous-code scanner flagged `child_process` as a critical pattern and blocked plugin installation — users could not install without `--dangerously-force-unsafe-install`. v3.11.0 removes all `child_process` usage, so the plugin installs cleanly without override flags.
|
|
68
|
+
- Video messages now require **4 manual parameters**: `coverImagePath`, `videoWidth`, `videoHeight`, `videoDuration`. Previous v3.10.0 auto-extracted these via ffmpeg/ffprobe (which depended on `child_process`). Now the agent must use ffmpeg/ffprobe before calling send-file. See the skill docs for exact commands.
|
|
60
69
|
|
|
61
70
|
### Bug Fixes
|
|
62
71
|
|
|
63
|
-
- Inbound video cover downloaded as image type (previously misclassified).
|
|
72
|
+
- Inbound video cover downloaded as image type (previously misclassified as video type).
|
|
64
73
|
|
|
65
74
|
## [3.10.0] - 2026-05-22
|
|
66
75
|
|
|
76
|
+
> **Compatible with OpenClaw `^2026.5.20`** (tested against `2026.5.22`).
|
|
77
|
+
|
|
67
78
|
### Features
|
|
68
79
|
|
|
69
80
|
- Fix video message: Lansenger API requires `mediaIds=[video, coverImage]` (2 elements). `sendFile()` auto-extracts first frame via ffmpeg and uploads as cover image.
|
|
70
|
-
- `send-text` with file attachment now uses correct mediaType instead of hardcoded `3`.
|
|
81
|
+
- `send-text` with file attachment now uses correct `mediaType` instead of hardcoded `3`.
|
|
71
82
|
|
|
72
83
|
### Bug Fixes
|
|
73
84
|
|
|
@@ -76,6 +87,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
76
87
|
|
|
77
88
|
## [3.9.0] - 2026-05-20
|
|
78
89
|
|
|
90
|
+
> **Compatible with OpenClaw `^2026.5.20`** (tested against `2026.5.20`).
|
|
91
|
+
|
|
79
92
|
### Features
|
|
80
93
|
|
|
81
94
|
- Switch file upload to `/v1/app/medias/create` API (supports larger files up to 10M/20M, uses string type `image`/`video`/`audio`/`file` instead of numeric media type).
|
|
@@ -83,15 +96,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
83
96
|
|
|
84
97
|
## [3.8.2] - 2026-05-20
|
|
85
98
|
|
|
99
|
+
> **Compatible with OpenClaw `^2026.5.20`** (tested against `2026.5.20`).
|
|
100
|
+
|
|
86
101
|
### Features
|
|
87
102
|
|
|
88
103
|
- Add `security.collectWarnings` and `security.collectAuditFindings` for `openclaw doctor --lint` integration. Checks: credentials missing/incomplete, dmPolicy not pairing, apiGatewayUrl not set, group config unused.
|
|
89
104
|
- Add `doctor.repairConfig` to auto-fix dmPolicy to pairing.
|
|
90
|
-
-
|
|
105
|
+
- Bump `openclaw` devDependency from `^2026.5.7` to `^2026.5.20`.
|
|
91
106
|
- Fix apiGatewayUrl lint check to skip when accounts have gateway set.
|
|
92
107
|
|
|
93
108
|
## [3.7.9] - 2026-05-18
|
|
94
109
|
|
|
110
|
+
> **Compatible with OpenClaw `^2026.5.7`**. This is the last release compatible with OpenClaw 2026.5.7. The next version (v3.8.2) raises the minimum to `^2026.5.20`.
|
|
111
|
+
|
|
95
112
|
### Features
|
|
96
113
|
|
|
97
114
|
- **Inbound debounce**: integrate OpenClaw `messages.inbound.debounceMs` for merging rapid consecutive messages (uses `createChannelInboundDebouncer` + `shouldDebounceTextInbound` from `openclaw/plugin-sdk/channel-inbound`).
|
|
@@ -108,6 +125,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
108
125
|
|
|
109
126
|
## [3.6.0] - 2026-05-16
|
|
110
127
|
|
|
128
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
129
|
+
|
|
111
130
|
### Bug Fixes
|
|
112
131
|
|
|
113
132
|
- Fix health-monitor infinite restart loop: register `gateway.startAccount`/`stopAccount` so channelManager runtime store gets `running=true` + `connected=true`.
|
|
@@ -116,6 +135,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
116
135
|
|
|
117
136
|
## [3.5.0] - 2026-05-14
|
|
118
137
|
|
|
138
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
139
|
+
|
|
119
140
|
### Features
|
|
120
141
|
|
|
121
142
|
- **Per-turn dedup**: prevent duplicate text/media delivery within a single inbound turn.
|
|
@@ -130,6 +151,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
130
151
|
|
|
131
152
|
## [3.4.5] - 2026-05-12
|
|
132
153
|
|
|
154
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
155
|
+
|
|
133
156
|
### Bug Fixes
|
|
134
157
|
|
|
135
158
|
- Fix duplicate delivery — `deliver()` deferred to outbound adapter; text dedup + empty caption for files.
|
|
@@ -137,6 +160,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
137
160
|
|
|
138
161
|
## [3.3.0] - 2026-05-10
|
|
139
162
|
|
|
163
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
164
|
+
|
|
140
165
|
### Features
|
|
141
166
|
|
|
142
167
|
- **Merge tools into channel plugin**: all 9 agent tools (`send_file`, `send_text`, `send_format_text`, `send_image_url`, `revoke_message`, `send_link_card`, `send_app_articles`, `send_app_card`, `update_dynamic_card`, `query_groups`) are now built-in. No separate `openclaw-lansenger-tools` plugin needed.
|
|
@@ -146,6 +171,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
146
171
|
|
|
147
172
|
## [3.2.10] - 2026-05-08
|
|
148
173
|
|
|
174
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
175
|
+
|
|
149
176
|
### Features
|
|
150
177
|
|
|
151
178
|
- Startup warning for missing `group:plugins` in tool allowlist (`openclaw doctor` integration).
|
|
@@ -157,6 +184,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
157
184
|
|
|
158
185
|
## [3.1.0] - 2026-05-06
|
|
159
186
|
|
|
187
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
188
|
+
|
|
160
189
|
### Features
|
|
161
190
|
|
|
162
191
|
- **Multi-account setup wizard**: add multiple bots with independent App IDs; agent routing via `bindings[]` config.
|
|
@@ -167,6 +196,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
167
196
|
|
|
168
197
|
## [3.0.0] - 2026-05-04
|
|
169
198
|
|
|
199
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
200
|
+
|
|
170
201
|
### Features
|
|
171
202
|
|
|
172
203
|
- Add `lansenger_send_format_text` tool (Markdown + @mention support via `formatText` API).
|
|
@@ -181,6 +212,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
181
212
|
|
|
182
213
|
## [2.10.0] - 2026-04-28
|
|
183
214
|
|
|
215
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
216
|
+
|
|
184
217
|
### Features
|
|
185
218
|
|
|
186
219
|
- **px→pt auto-conversion**: `sendAppCard` converts CSS `font-size` from px to pt (Lansenger requires pt; px renders incorrectly).
|
|
@@ -189,6 +222,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
189
222
|
|
|
190
223
|
## [2.9.12] - 2026-04-26
|
|
191
224
|
|
|
225
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
226
|
+
|
|
192
227
|
### Features
|
|
193
228
|
|
|
194
229
|
- **Status adapter**: expose channel status via `buildChannelSummary` + `probeAccount` + `buildAccountSnapshot`.
|
|
@@ -198,6 +233,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
198
233
|
|
|
199
234
|
## [2.8.1] - 2026-04-24
|
|
200
235
|
|
|
236
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
237
|
+
|
|
201
238
|
### Features
|
|
202
239
|
|
|
203
240
|
- **OpenClaw bindings multi-agent routing**: use `resolveAgentRoute` from SDK for agent routing; remove per-account `agentId` and `BindingManager`/`execSync` dependency.
|
|
@@ -207,6 +244,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
207
244
|
|
|
208
245
|
## [2.7.0] - 2026-04-22
|
|
209
246
|
|
|
247
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
248
|
+
|
|
210
249
|
### Features
|
|
211
250
|
|
|
212
251
|
- Register tools as plain objects (not factory functions) — external plugin capture API only accepts non-function tool descriptors.
|
|
@@ -215,6 +254,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
215
254
|
|
|
216
255
|
## [2.6.0] - 2026-04-20
|
|
217
256
|
|
|
257
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
258
|
+
|
|
218
259
|
### Bug Fixes
|
|
219
260
|
|
|
220
261
|
- Register tools unconditionally — resolve account at execute time instead of registration time (fixes `tools.allow 'no registered tools matched'`).
|
|
@@ -222,6 +263,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
222
263
|
|
|
223
264
|
## [2.5.0] - 2026-04-18
|
|
224
265
|
|
|
266
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
267
|
+
|
|
225
268
|
### Features
|
|
226
269
|
|
|
227
270
|
- `formatText` reminder support (auto-fallback: strips reminder on API error).
|
|
@@ -232,6 +275,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
232
275
|
|
|
233
276
|
## [2.4.0] - 2026-04-16
|
|
234
277
|
|
|
278
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
279
|
+
|
|
235
280
|
### Bug Fixes
|
|
236
281
|
|
|
237
282
|
- Fix message body assembly: `wrap()` excludes `msgType` from `msgData`; `appArticles` uses correct `msgType`/`summary`/flat array.
|
|
@@ -239,12 +284,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
239
284
|
|
|
240
285
|
## [2.3.0] - 2026-04-14
|
|
241
286
|
|
|
287
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
288
|
+
|
|
242
289
|
### Features
|
|
243
290
|
|
|
244
291
|
- Remove legacy `sendGroupText`/`sendGroupFormatText`; all routing via `msgTarget(chatId)` helper (determines private vs group endpoint automatically).
|
|
245
292
|
|
|
246
293
|
## [2.2.0] - 2026-04-12
|
|
247
294
|
|
|
295
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
296
|
+
|
|
248
297
|
### Features
|
|
249
298
|
|
|
250
299
|
- Add 9 dedicated agent tools: `send_file`, `send_text`, `send_format_text`, `send_image_url`, `revoke_message`, `send_link_card`, `send_app_articles`, `send_app_card`, `update_dynamic_card`, `query_groups`.
|
|
@@ -256,6 +305,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
256
305
|
|
|
257
306
|
## [2.1.0] - 2026-04-10
|
|
258
307
|
|
|
308
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
309
|
+
|
|
259
310
|
### Features
|
|
260
311
|
|
|
261
312
|
- **sendAttachment → send action**: merge `sendAttachment` into `send` action — `filePath` param in `send` action sends file, no MEDIA tags needed. Align with Telegram pattern.
|
|
@@ -263,6 +314,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
263
314
|
|
|
264
315
|
## [2.0.0] - 2026-04-08
|
|
265
316
|
|
|
317
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
318
|
+
|
|
266
319
|
### Breaking Changes
|
|
267
320
|
|
|
268
321
|
- **Migrate to Channel Turn Kernel**: replace `BindingManager`/`execSync` with OpenClaw's `channel.inbound.run` for inbound processing.
|
|
@@ -277,6 +330,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
277
330
|
|
|
278
331
|
## [1.0.3] - 2026-04-04
|
|
279
332
|
|
|
333
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
334
|
+
|
|
280
335
|
### Features
|
|
281
336
|
|
|
282
337
|
- Quick Start section in all READMEs: one-command setup with `openclaw channels add`, pairing approval flow.
|
|
@@ -292,6 +347,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
292
347
|
|
|
293
348
|
## [1.0.1] - 2026-04-02
|
|
294
349
|
|
|
350
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
351
|
+
|
|
295
352
|
### Bug Fixes
|
|
296
353
|
|
|
297
354
|
- Fix README `dmSecurity` example: `allowlist` → `paired`.
|
|
@@ -299,6 +356,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
|
|
|
299
356
|
|
|
300
357
|
## [1.0.0] - 2026-04-01
|
|
301
358
|
|
|
359
|
+
> **Compatible with OpenClaw `^2026.5.7`**.
|
|
360
|
+
|
|
302
361
|
### Initial Release
|
|
303
362
|
|
|
304
363
|
- Lansenger (蓝信) channel plugin for OpenClaw.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
function resolveWizardLocale() {
|
|
2
|
+
const raw = process.env.OPENCLAW_LOCALE || process.env.LC_ALL || process.env.LC_MESSAGES || process.env.LANG || "";
|
|
3
|
+
const normalized = (raw.split(".")[0] ?? "").replace(/_/g, "-").toLowerCase();
|
|
4
|
+
if (normalized.startsWith("zh-tw") || normalized.startsWith("zh-hant"))
|
|
5
|
+
return "zh-TW";
|
|
6
|
+
if (normalized.startsWith("zh-cn") || normalized.startsWith("zh-hans"))
|
|
7
|
+
return "zh-CN";
|
|
8
|
+
if (normalized.startsWith("zh"))
|
|
9
|
+
return "zh-CN";
|
|
10
|
+
return "en";
|
|
11
|
+
}
|
|
12
|
+
const LOCALE = resolveWizardLocale();
|
|
13
|
+
const LANSINGER_I18N = {
|
|
14
|
+
channelLabel: { en: "Lansenger", "zh-CN": "蓝信", "zh-TW": "藍信" },
|
|
15
|
+
introTitle: { en: "Lansenger Setup", "zh-CN": "蓝信配置", "zh-TW": "藍信設定" },
|
|
16
|
+
introDesktopPath: { en: "Lansenger Desktop → Contacts → Bots → Personal Bots", "zh-CN": "蓝信桌面端 → 通讯录 → 智能机器人 → 个人机器人", "zh-TW": "藍信桌面端 → 通訊錄 → 智慧機器人 → 個人機器人" },
|
|
17
|
+
introClickInfo: { en: "Click the ℹ️ icon to view App ID and App Secret", "zh-CN": "点击 ℹ️ 图标查看凭证", "zh-TW": "點擊 ℹ️ 圖標查看憑證" },
|
|
18
|
+
introPersonalOnly: { en: "Personal Bots only — organization bots not supported", "zh-CN": "仅支持个人机器人", "zh-TW": "僅支援個人機器人" },
|
|
19
|
+
introNoMobile: { en: "Mobile client does NOT support viewing credentials", "zh-CN": "移动端不支持查看凭证", "zh-TW": "行動端不支援查看憑證" },
|
|
20
|
+
introToolsIncluded: { en: "✅ Agent tools are included in this plugin (no separate install needed).", "zh-CN": "✅ 代理工具已内置于此插件,无需单独安装。", "zh-TW": "✅ 代理工具已內建於此插件,無需單獨安裝。" },
|
|
21
|
+
introCliAlt: { en: "CLI is an optional alternative: pip install lansenger-cli", "zh-CN": "CLI 为可选替代方案:pip install lansenger-cli", "zh-TW": "CLI 為可選替代方案:pip install lansenger-cli" },
|
|
22
|
+
appIdLabel: { en: "Lansenger App ID", "zh-CN": "蓝信 App ID", "zh-TW": "藍信 App ID" },
|
|
23
|
+
appIdHelpLine1: { en: "App ID from your Lansenger Personal Bot", "zh-CN": "个人机器人的 App ID", "zh-TW": "個人機器人的 App ID" },
|
|
24
|
+
appIdHelpLine2: { en: "Found alongside App Secret → Contacts → Bots → Personal Bots", "zh-CN": "通讯录 → 智能机器人 → 个人机器人", "zh-TW": "通訊錄 → 智慧機器人 → 個人機器人" },
|
|
25
|
+
appIdEnvPrompt: { en: "LANSENGER_APP_ID detected. Use env var?", "zh-CN": "检测到环境变量 LANSENGER_APP_ID,是否使用?", "zh-TW": "偵測到環境變數 LANSENGER_APP_ID,是否使用?" },
|
|
26
|
+
appIdKeepPrompt: { en: "App ID already configured. Keep it?", "zh-CN": "App ID 已配置,是否保留?", "zh-TW": "App ID 已設定,是否保留?" },
|
|
27
|
+
appIdInputPrompt: { en: "Enter Lansenger App ID", "zh-CN": "输入蓝信 App ID", "zh-TW": "輸入藍信 App ID" },
|
|
28
|
+
secretLabel: { en: "Lansenger App Secret", "zh-CN": "蓝信 App Secret", "zh-TW": "藍信 App Secret" },
|
|
29
|
+
secretHelpLine1: { en: "App Secret from your Lansenger Personal Bot", "zh-CN": "个人机器人的 App Secret", "zh-TW": "個人機器人的 App Secret" },
|
|
30
|
+
secretHelpLine2: { en: "Found alongside App ID → Contacts → Bots → Personal Bots", "zh-CN": "通讯录 → 智能机器人 → 个人机器人", "zh-TW": "通訊錄 → 智慧機器人 → 個人機器人" },
|
|
31
|
+
secretEnvPrompt: { en: "LANSENGER_APP_SECRET detected. Use env var?", "zh-CN": "检测到环境变量 LANSENGER_APP_SECRET,是否使用?", "zh-TW": "偵測到環境變數 LANSENGER_APP_SECRET,是否使用?" },
|
|
32
|
+
secretKeepPrompt: { en: "App Secret already configured. Keep it?", "zh-CN": "App Secret 已配置,是否保留?", "zh-TW": "App Secret 已設定,是否保留?" },
|
|
33
|
+
secretInputPrompt: { en: "Enter Lansenger App Secret", "zh-CN": "输入蓝信 App Secret", "zh-TW": "輸入藍信 App Secret" },
|
|
34
|
+
baseUrlMessage: { en: "API Gateway URL (optional, default Lansenger public cloud)", "zh-CN": "API 网关地址(可选,默认蓝信公有云)", "zh-TW": "API 閘道位址(可選,預設藍信公有雲)" },
|
|
35
|
+
allowFromHelpTitle: { en: "Lansenger user ID", "zh-CN": "蓝信用户 ID", "zh-TW": "藍信使用者 ID" },
|
|
36
|
+
allowFromHelpLine1: { en: "Lansenger user IDs have format: orgId-applicationId (e.g. xxx-xxxxxxx)", "zh-CN": "蓝信用户 ID 格式:orgId-applicationId(如 xxx-xxxxxxx)", "zh-TW": "藍信使用者 ID 格式:orgId-applicationId(如 xxx-xxxxxxx)" },
|
|
37
|
+
allowFromMessage: { en: "Lansenger allowFrom (user IDs, format: orgId-applicationId)", "zh-CN": "蓝信允许的用户 ID(格式:orgId-applicationId)", "zh-TW": "藍信允許的使用者 ID(格式:orgId-applicationId)" },
|
|
38
|
+
allowFromInvalidNote: { en: "Lansenger allowFrom requires user IDs in format appId-userId.", "zh-CN": "蓝信 allowFrom 需要格式为 appId-userId 的用户 ID。", "zh-TW": "藍信 allowFrom 需要格式為 appId-userId 的使用者 ID。" },
|
|
39
|
+
companionTitle: { en: "Messaging Tools", "zh-CN": "消息工具", "zh-TW": "訊息工具" },
|
|
40
|
+
companionLine1: { en: "Agent tools (lansenger_send_file, etc.) are included in this plugin — no separate install needed.", "zh-CN": "代理工具(lansenger_send_file 等)已内置于此插件,无需单独安装。", "zh-TW": "代理工具(lansenger_send_file 等)已內建於此插件,無需單獨安裝。" },
|
|
41
|
+
companionLine2: { en: "CLI is an optional alternative (works via bash):", "zh-CN": "CLI 为可选替代方案(通过 bash 调用):", "zh-TW": "CLI 為可選替代方案(透過 bash 呼叫):" },
|
|
42
|
+
companionLine3: { en: "Without CLI, the agent can still use built-in tools for files, cards, and formatted messages.", "zh-CN": "未安装 CLI 时,代理仍可使用内置工具发送文件、卡片和格式化消息。", "zh-TW": "未安裝 CLI 時,代理仍可使用內建工具傳送檔案、卡片和格式化訊息。" },
|
|
43
|
+
securityTitle: { en: "⚠️ Security: Plaintext appSecret", "zh-CN": "⚠️ 安全:appSecret 明文存储", "zh-TW": "⚠️ 安全:appSecret 明文儲存" },
|
|
44
|
+
securityLine1: { en: "Your appSecret is stored as plaintext in openclaw.json.", "zh-CN": "appSecret 以明文存储在 openclaw.json 中。", "zh-TW": "appSecret 以明文儲存在 openclaw.json 中。" },
|
|
45
|
+
securityLine2: { en: "Any workspace tool that reads config can see your bot credentials.", "zh-CN": "任何读取配置的工作区工具都能看到机器人凭证。", "zh-TW": "任何讀取配置的工作區工具都能看到機器人憑證。" },
|
|
46
|
+
securityLine3: { en: "Migrate to SecretRef storage by running:", "zh-CN": "迁移至 SecretRef 存储,请运行:", "zh-TW": "遷移至 SecretRef 儲存,請執行:" },
|
|
47
|
+
securityLine4: { en: "Or use the LANSENGER_APP_SECRET environment variable instead.", "zh-CN": "或使用 LANSENGER_APP_SECRET 环境变量替代。", "zh-TW": "或使用 LANSENGER_APP_SECRET 環境變數替代。" },
|
|
48
|
+
finalizePlaintext1: { en: "⚠️ Your appSecret is stored as plaintext in openclaw.json.", "zh-CN": "⚠️ appSecret 以明文存储在 openclaw.json 中。", "zh-TW": "⚠️ appSecret 以明文儲存在 openclaw.json 中。" },
|
|
49
|
+
finalizePlaintext2: { en: " This means any workspace tool that reads config can see your bot credentials.", "zh-CN": " 这意味着任何读取配置的工作区工具都能看到机器人凭证。", "zh-TW": " 這意味著任何讀取配置的工作區工具都能看到機器人憑證。" },
|
|
50
|
+
finalizePlaintext3: { en: " Migrate to SecretRef storage by running: openclaw secrets configure", "zh-CN": " 迁移至 SecretRef 存储,请运行:openclaw secrets configure", "zh-TW": " 遷移至 SecretRef 儲存,請執行:openclaw secrets configure" },
|
|
51
|
+
finalizePlaintext4: { en: " Or use the LANSENGER_APP_SECRET environment variable instead.", "zh-CN": " 或使用 LANSENGER_APP_SECRET 环境变量替代。", "zh-TW": " 或使用 LANSENGER_APP_SECRET 環境變數替代。" },
|
|
52
|
+
};
|
|
53
|
+
function lt(key) {
|
|
54
|
+
const entry = LANSINGER_I18N[key];
|
|
55
|
+
if (!entry)
|
|
56
|
+
return key;
|
|
57
|
+
return entry[LOCALE] ?? entry.en ?? key;
|
|
58
|
+
}
|
|
59
|
+
export { lt, LOCALE };
|
|
60
|
+
//# sourceMappingURL=setup-i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-i18n.js","sour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CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,IAAI,GAAG,CAAC;AAC1C,CAAC;AAED,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lansenger-pm/openclaw-lansenger-channel",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"dist/src/runtime.js",
|
|
19
19
|
"dist/src/runtime.d.ts",
|
|
20
20
|
"dist/src/runtime.js.map",
|
|
21
|
+
"dist/src/setup-i18n.*",
|
|
21
22
|
"dist/src/setup-wizard.js",
|
|
22
23
|
"dist/src/setup-wizard.d.ts",
|
|
23
24
|
"dist/src/setup-wizard.js.map",
|
|
@@ -85,7 +86,7 @@
|
|
|
85
86
|
"quickstartAllowFrom": true
|
|
86
87
|
},
|
|
87
88
|
"install": {
|
|
88
|
-
"npmSpec": "@lansenger-pm/openclaw-lansenger-channel@3.
|
|
89
|
+
"npmSpec": "@lansenger-pm/openclaw-lansenger-channel@3.13.0",
|
|
89
90
|
"localPath": ".",
|
|
90
91
|
"defaultChoice": "npm"
|
|
91
92
|
},
|