@lansenger-pm/openclaw-lansenger-channel 3.16.2 → 3.16.4
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 +22 -0
- package/README.fr.md +20 -16
- package/README.md +20 -16
- package/README.zhHans.md +20 -16
- package/README.zhHant.md +20 -16
- package/README.zhHantHK.md +20 -16
- package/dist/src/channel.js +168 -287
- package/dist/src/channel.js.map +1 -1
- package/dist/src/client.js +126 -118
- package/dist/src/client.js.map +1 -1
- package/dist/src/command-i18n.js +339 -0
- package/dist/src/command-i18n.js.map +1 -0
- package/dist/src/runtime.js +307 -564
- package/dist/src/runtime.js.map +1 -1
- package/dist/src/tools.js +396 -267
- package/dist/src/tools.js.map +1 -1
- package/package.json +4 -2
- package/skills/lansenger-messaging/SKILL.md +26 -1
- package/skills/lansenger-setup/SKILL.md +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ 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.16.4] - 2026-06-23
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Native approval cards (`approveCard`)**: Full native approval handler implementation for non-whitelist exec commands. Interactive approval cards with "Approve Once" / "This Session" / "Deny" buttons, delivered through the OpenClaw framework's native approval route. Includes `buildPendingPayload`, `buildResolvedResult`, `buildExpiredResult`, `prepareTarget`, `deliverPending`, `updateEntry`, and `deleteEntry`.
|
|
12
|
+
- **Approval handler runtime context**: `registerChannelRuntimeContext(CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY)` is called during gateway startup so the OpenClaw framework recognizes the Lansenger native approval route (sets `nativeRouteActive=true`).
|
|
13
|
+
- **`lansenger_send_approve_card` tool**: New Agent tool for sending approveCard interactive messages. Registered in the `plugins` tool group via `openclaw.plugin.json` contracts.
|
|
14
|
+
- **`command-i18n.ts`**: Centralized i18n module for slash command responses (zh/en).
|
|
15
|
+
- **Card body content**: Approval cards now show the full session key, the command in a code block, and individual `/approve` commands in separate code blocks for easy copy.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **`updateCardStatus` protocol**: Changed from appCard protocol (`appCardUpdateMsg`, `headStatusInfo.description`) to approveCard protocol (`approveCardUpdateMsg`, `headStatus.describe`, `headStatus.colour`, `headStatus.statusIcon`).
|
|
20
|
+
- **Card status update buttons**: After approval resolution, all three action buttons are replaced with a single disabled button showing the resolved action ("已允许执行一次" / "已允许本会话有效" / "已拒绝执行").
|
|
21
|
+
- **Approver permission matching**: `resolveLansengerApprovers` now strips the `lansenger:` prefix from `ownerAllowFrom` entries before matching against `senderId`.
|
|
22
|
+
|
|
23
|
+
## [3.16.3] - 2026-06-22
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- **`queryGroups` returns empty `groupIds`**: Default `pageOffset` was `1` but the API `page_offset` starts from `0`. With few groups, the first page was skipped entirely, returning `totalGroupIds > 0` but `groupIds: []`.
|
|
28
|
+
|
|
7
29
|
## [3.16.2] - 2026-06-22
|
|
8
30
|
|
|
9
31
|
### Added
|
package/README.fr.md
CHANGED
|
@@ -359,6 +359,7 @@ Le plugin supporte les cartes d'approbation :
|
|
|
359
359
|
- **reminder** — champ optionnel dans formatText ; recommandé dans les chats de groupe. Inclure « @姓名 » dans le texte pour les mentions.
|
|
360
360
|
- **Média** — les balises `<media>` fonctionnent pour les fichiers du workspace ; pour les chemins externes, utilisez `lansenger_send_file`.
|
|
361
361
|
- **openclaw skill/message lansenger** — ces commandes CLI n'existent PAS ; utilisez les outils de l'agent.
|
|
362
|
+
- **Copie automatique de la compétence lansenger-setup** — le plugin copie la compétence `lansenger-setup` dans `~/.openclaw/skills/` au démarrage pour que l'agent puisse aider à configurer Lansenger avant l'activation complète du canal. Ce comportement est intentionnel — ne le supprimez pas manuellement.
|
|
362
363
|
- **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`.
|
|
363
364
|
- **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.
|
|
364
365
|
|
|
@@ -388,23 +389,26 @@ npx tsc --noEmit
|
|
|
388
389
|
```
|
|
389
390
|
openclaw-lansenger-channel/
|
|
390
391
|
├── src/
|
|
391
|
-
│ ├── client.ts
|
|
392
|
-
│ ├── channel.ts
|
|
393
|
-
│ ├── runtime.ts
|
|
394
|
-
│ ├── tools.ts
|
|
395
|
-
│ ├──
|
|
396
|
-
│ ├──
|
|
397
|
-
│ ├──
|
|
398
|
-
│ ├──
|
|
399
|
-
│ ├── tools.test.ts # Tests des outils
|
|
400
|
-
│ └── setup-wizard.test.ts # Tests de l'assistant de configuration
|
|
392
|
+
│ ├── client.ts # Client API Lansenger (WS, HTTP, médias)
|
|
393
|
+
│ ├── channel.ts # Plugin de canal OpenClaw
|
|
394
|
+
│ ├── runtime.ts # Runtime passerelle (handler entrant, livraison)
|
|
395
|
+
│ ├── tools.ts # Définitions des outils agent (lansenger_send_*)
|
|
396
|
+
│ ├── persistent-store.ts # Persistance d'état sur disque
|
|
397
|
+
│ ├── setup-wizard.ts # Assistant de configuration (migration config multi-compte)
|
|
398
|
+
│ ├── setup-i18n.ts # i18n de l'assistant de configuration
|
|
399
|
+
│ ├── *.test.ts # Tests unitaires
|
|
401
400
|
├── skills/
|
|
402
|
-
│
|
|
403
|
-
│
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
├──
|
|
407
|
-
├──
|
|
401
|
+
│ ├── lansenger-messaging/
|
|
402
|
+
│ │ └── SKILL.md # Stratégie de messagerie (outils + CLI)
|
|
403
|
+
│ └── lansenger-setup/
|
|
404
|
+
│ └── SKILL.md # Assistant d'installation (copié auto vers ~/.openclaw/skills)
|
|
405
|
+
├── dist/ # JavaScript compilé
|
|
406
|
+
├── index.ts # Point d'entrée du plugin (registerFull, ensureSetupSkill)
|
|
407
|
+
├── setup-entry.ts # Point d'entrée de l'assistant de configuration
|
|
408
|
+
├── openclaw.plugin.json # Métadonnées du plugin & configuration GUI
|
|
409
|
+
├── CHANGELOG.md
|
|
410
|
+
├── VERSION
|
|
411
|
+
├── vitest.config.ts
|
|
408
412
|
├── package.json
|
|
409
413
|
└── tsconfig.json
|
|
410
414
|
```
|
package/README.md
CHANGED
|
@@ -351,6 +351,7 @@ The plugin supports approval workflow cards:
|
|
|
351
351
|
- **reminder** — optional in formatText; recommended in group chat. Include "@姓名" in text when mentioning.
|
|
352
352
|
- **Media** — `<media>` tags work for workspace files; for external paths use `lansenger_send_file`.
|
|
353
353
|
- **openclaw skill/message lansenger** — these CLI commands do NOT exist; use agent tools instead.
|
|
354
|
+
- **lansenger-setup skill auto-copy** — the plugin copies `lansenger-setup` skill to `~/.openclaw/skills/` on startup so the agent can help configure Lansenger even before the channel is fully activated. This is intentional — do not remove it manually.
|
|
354
355
|
- **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.
|
|
355
356
|
- **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.
|
|
356
357
|
|
|
@@ -380,23 +381,26 @@ npx tsc --noEmit
|
|
|
380
381
|
```
|
|
381
382
|
openclaw-lansenger-channel/
|
|
382
383
|
├── src/
|
|
383
|
-
│ ├── client.ts
|
|
384
|
-
│ ├── channel.ts
|
|
385
|
-
│ ├── runtime.ts
|
|
386
|
-
│ ├── tools.ts
|
|
387
|
-
│ ├──
|
|
388
|
-
│ ├──
|
|
389
|
-
│ ├──
|
|
390
|
-
│ ├──
|
|
391
|
-
│ ├── tools.test.ts # Tool tests
|
|
392
|
-
│ └── setup-wizard.test.ts # Setup wizard tests
|
|
384
|
+
│ ├── client.ts # Lansenger API client (WS, HTTP, media)
|
|
385
|
+
│ ├── channel.ts # OpenClaw channel plugin
|
|
386
|
+
│ ├── runtime.ts # Gateway runtime (inbound handler, delivery)
|
|
387
|
+
│ ├── tools.ts # Agent tool definitions (lansenger_send_*)
|
|
388
|
+
│ ├── persistent-store.ts # Disk-backed state persistence
|
|
389
|
+
│ ├── setup-wizard.ts # Setup wizard (multi-account config migration)
|
|
390
|
+
│ ├── setup-i18n.ts # Setup wizard i18n strings
|
|
391
|
+
│ ├── *.test.ts # Unit tests
|
|
393
392
|
├── skills/
|
|
394
|
-
│
|
|
395
|
-
│
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
├──
|
|
399
|
-
├──
|
|
393
|
+
│ ├── lansenger-messaging/
|
|
394
|
+
│ │ └── SKILL.md # Agent messaging strategy (tools + CLI)
|
|
395
|
+
│ └── lansenger-setup/
|
|
396
|
+
│ └── SKILL.md # Setup assistant (auto-copied to ~/.openclaw/skills)
|
|
397
|
+
├── dist/ # Compiled JavaScript
|
|
398
|
+
├── index.ts # Plugin entry point (registerFull, ensureSetupSkill)
|
|
399
|
+
├── setup-entry.ts # Setup wizard entry
|
|
400
|
+
├── openclaw.plugin.json # Plugin metadata & GUI config
|
|
401
|
+
├── CHANGELOG.md
|
|
402
|
+
├── VERSION
|
|
403
|
+
├── vitest.config.ts
|
|
400
404
|
├── package.json
|
|
401
405
|
└── tsconfig.json
|
|
402
406
|
```
|
package/README.zhHans.md
CHANGED
|
@@ -359,6 +359,7 @@ openclaw channels status --probe
|
|
|
359
359
|
- **reminder** — formatText 中可选字段;群聊中建议使用。提及用户时在文本中包含"@姓名"。
|
|
360
360
|
- **媒体标签** — `<media>` 标签适用于工作区文件;外部路径请使用 `lansenger_send_file`。
|
|
361
361
|
- **openclaw skill/message lansenger** — 这些 CLI 命令不存在;请使用代理工具。
|
|
362
|
+
- **lansenger-setup 技能自动复制** — 插件在启动时将 `lansenger-setup` 技能复制到 `~/.openclaw/skills/`,以便在频道完全激活之前就能帮助配置蓝信。这是有意设计,请勿手动删除。
|
|
362
363
|
- **代理工具** — 代理工具(`lansenger_send_*`)需要工具插件且网关注入成功 — 若工具不可用,请使用 CLI 作为备选。CLI 命令(`lansenger message send-*`)需要 `pipx install lansenger-cli`。
|
|
363
364
|
- **alsoAllow** — 本插件注册了 agent 工具(`lansenger_send_*`),但在严格工具策略下可能**不可见**。需在 `openclaw.json` 中添加 `"tools": { "alsoAllow": ["group:plugins"] }` 以确保 agent 能看到并使用这些工具。否则工具可能静默不出现在 agent 工具列表中。
|
|
364
365
|
|
|
@@ -388,23 +389,26 @@ npx tsc --noEmit
|
|
|
388
389
|
```
|
|
389
390
|
openclaw-lansenger-channel/
|
|
390
391
|
├── src/
|
|
391
|
-
│ ├── client.ts
|
|
392
|
-
│ ├── channel.ts
|
|
393
|
-
│ ├── runtime.ts
|
|
394
|
-
│ ├── tools.ts
|
|
395
|
-
│ ├──
|
|
396
|
-
│ ├──
|
|
397
|
-
│ ├──
|
|
398
|
-
│ ├──
|
|
399
|
-
│ ├── tools.test.ts # 工具测试
|
|
400
|
-
│ └── setup-wizard.test.ts # 设置向导测试
|
|
392
|
+
│ ├── client.ts # 蓝信 API 客户端(WS、HTTP、媒体)
|
|
393
|
+
│ ├── channel.ts # OpenClaw 频道插件
|
|
394
|
+
│ ├── runtime.ts # 网关运行时(入站处理、投递)
|
|
395
|
+
│ ├── tools.ts # 代理工具定义(lansenger_send_*)
|
|
396
|
+
│ ├── persistent-store.ts # 磁盘状态持久化
|
|
397
|
+
│ ├── setup-wizard.ts # 设置向导(多账号配置迁移)
|
|
398
|
+
│ ├── setup-i18n.ts # 设置向导多语言
|
|
399
|
+
│ ├── *.test.ts # 单元测试
|
|
401
400
|
├── skills/
|
|
402
|
-
│
|
|
403
|
-
│
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
├──
|
|
407
|
-
├──
|
|
401
|
+
│ ├── lansenger-messaging/
|
|
402
|
+
│ │ └── SKILL.md # 代理消息策略(工具 + CLI)
|
|
403
|
+
│ └── lansenger-setup/
|
|
404
|
+
│ └── SKILL.md # 安装助手(自动复制至 ~/.openclaw/skills)
|
|
405
|
+
├── dist/ # 编译后的 JavaScript
|
|
406
|
+
├── index.ts # 插件入口(registerFull、ensureSetupSkill)
|
|
407
|
+
├── setup-entry.ts # 设置向导入口
|
|
408
|
+
├── openclaw.plugin.json # 插件元数据与 GUI 配置
|
|
409
|
+
├── CHANGELOG.md
|
|
410
|
+
├── VERSION
|
|
411
|
+
├── vitest.config.ts
|
|
408
412
|
├── package.json
|
|
409
413
|
└── tsconfig.json
|
|
410
414
|
```
|
package/README.zhHant.md
CHANGED
|
@@ -359,6 +359,7 @@ openclaw channels status --probe
|
|
|
359
359
|
- **reminder**——formatText 中可選欄位;群組聊天中建議使用。提及使用者時在文字中包含「@姓名」。
|
|
360
360
|
- **媒體標籤**——`<media>` 標籤適用於工作區檔案;外部路徑請使用 `lansenger_send_file`。
|
|
361
361
|
- **openclaw skill/message lansenger**——這些 CLI 命令不存在;請使用代理工具。
|
|
362
|
+
- **lansenger-setup 技能自動複製**——插件在啟動時將 `lansenger-setup` 技能複製到 `~/.openclaw/skills/`,以便在頻道完全啟用前就能幫助設定藍信。此為設計行為,請勿手動刪除。
|
|
362
363
|
- **代理工具**——代理工具(`lansenger_send_*`)需要工具插件且閘道注入成功——若工具不可用,請使用 CLI 作為備選。CLI 命令(`lansenger message send-*`)需要 `pipx install lansenger-cli`。
|
|
363
364
|
- **alsoAllow**——本插件註冊了 agent 工具(`lansenger_send_*`),但在嚴格工具策略下可能**不可見**。需在 `openclaw.json` 中新增 `"tools": { "alsoAllow": ["group:plugins"] }` 以確保 agent 能看到並使用這些工具。否則工具可能靜默不出現在 agent 工具列表中。
|
|
364
365
|
|
|
@@ -388,23 +389,26 @@ npx tsc --noEmit
|
|
|
388
389
|
```
|
|
389
390
|
openclaw-lansenger-channel/
|
|
390
391
|
├── src/
|
|
391
|
-
│ ├── client.ts
|
|
392
|
-
│ ├── channel.ts
|
|
393
|
-
│ ├── runtime.ts
|
|
394
|
-
│ ├── tools.ts
|
|
395
|
-
│ ├──
|
|
396
|
-
│ ├──
|
|
397
|
-
│ ├──
|
|
398
|
-
│ ├──
|
|
399
|
-
│ ├── tools.test.ts # 工具測試
|
|
400
|
-
│ └── setup-wizard.test.ts # 設定精靈測試
|
|
392
|
+
│ ├── client.ts # 藍信 API 客戶端(WS、HTTP、媒體)
|
|
393
|
+
│ ├── channel.ts # OpenClaw 頻道插件
|
|
394
|
+
│ ├── runtime.ts # 閘道運行時(入站處理、投遞)
|
|
395
|
+
│ ├── tools.ts # 代理工具定義(lansenger_send_*)
|
|
396
|
+
│ ├── persistent-store.ts # 磁碟狀態持久化
|
|
397
|
+
│ ├── setup-wizard.ts # 設定精靈(多帳號配置遷移)
|
|
398
|
+
│ ├── setup-i18n.ts # 設定精靈多語言
|
|
399
|
+
│ ├── *.test.ts # 單元測試
|
|
401
400
|
├── skills/
|
|
402
|
-
│
|
|
403
|
-
│
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
├──
|
|
407
|
-
├──
|
|
401
|
+
│ ├── lansenger-messaging/
|
|
402
|
+
│ │ └── SKILL.md # 代理訊息策略(工具 + CLI)
|
|
403
|
+
│ └── lansenger-setup/
|
|
404
|
+
│ └── SKILL.md # 安裝助手(自動複製至 ~/.openclaw/skills)
|
|
405
|
+
├── dist/ # 編譯後的 JavaScript
|
|
406
|
+
├── index.ts # 插件入口(registerFull、ensureSetupSkill)
|
|
407
|
+
├── setup-entry.ts # 設定精靈入口
|
|
408
|
+
├── openclaw.plugin.json # 插件元資料與 GUI 設定
|
|
409
|
+
├── CHANGELOG.md
|
|
410
|
+
├── VERSION
|
|
411
|
+
├── vitest.config.ts
|
|
408
412
|
├── package.json
|
|
409
413
|
└── tsconfig.json
|
|
410
414
|
```
|
package/README.zhHantHK.md
CHANGED
|
@@ -361,6 +361,7 @@ openclaw channels status --probe
|
|
|
361
361
|
- **reminder** — formatText 中可選欄位;群組聊天中建議使用。提及使用者時在文字中包含「@姓名」。
|
|
362
362
|
- **媒體標籤** — `<media>` 標籤適用於工作區檔案;外部路徑請使用 `lansenger_send_file`。
|
|
363
363
|
- **openclaw skill/message lansenger** — 這些 CLI 命令不存在;請使用代理工具。
|
|
364
|
+
- **lansenger-setup 技能自動複製** — 插件在啟動時將 `lansenger-setup` 技能複製到 `~/.openclaw/skills/`,以便在頻道完全啟用前就能幫助設定藍信。此為設計行為,請勿手動刪除。
|
|
364
365
|
- **代理工具** — 代理工具(`lansenger_send_*`)需要工具插件且網關注入成功 — 若工具不可用,請使用 CLI 作為備選。CLI 命令(`lansenger message send-*`)需要 `pipx install lansenger-cli`。
|
|
365
366
|
- **alsoAllow** — 本插件註冊了 agent 工具(`lansenger_send_*`),但在嚴格工具策略下可能**不可見**。需在 `openclaw.json` 中新增 `"tools": { "alsoAllow": ["group:plugins"] }` 以確保 agent 能看到並使用這些工具。否則工具可能靜默不出現在 agent 工具列表中。
|
|
366
367
|
|
|
@@ -390,23 +391,26 @@ npx tsc --noEmit
|
|
|
390
391
|
```
|
|
391
392
|
openclaw-lansenger-channel/
|
|
392
393
|
├── src/
|
|
393
|
-
│ ├── client.ts
|
|
394
|
-
│ ├── channel.ts
|
|
395
|
-
│ ├── runtime.ts
|
|
396
|
-
│ ├── tools.ts
|
|
397
|
-
│ ├──
|
|
398
|
-
│ ├──
|
|
399
|
-
│ ├──
|
|
400
|
-
│ ├──
|
|
401
|
-
│ ├── tools.test.ts # 工具測試
|
|
402
|
-
│ └── setup-wizard.test.ts # 設定精靈測試
|
|
394
|
+
│ ├── client.ts # 藍信 API 客戶端(WS、HTTP、媒體)
|
|
395
|
+
│ ├── channel.ts # OpenClaw 頻道插件
|
|
396
|
+
│ ├── runtime.ts # 網關運行時(入站處理、投遞)
|
|
397
|
+
│ ├── tools.ts # 代理工具定義(lansenger_send_*)
|
|
398
|
+
│ ├── persistent-store.ts # 磁碟狀態持久化
|
|
399
|
+
│ ├── setup-wizard.ts # 設定精靈(多帳號配置遷移)
|
|
400
|
+
│ ├── setup-i18n.ts # 設定精靈多語言
|
|
401
|
+
│ ├── *.test.ts # 單元測試
|
|
403
402
|
├── skills/
|
|
404
|
-
│
|
|
405
|
-
│
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
├──
|
|
409
|
-
├──
|
|
403
|
+
│ ├── lansenger-messaging/
|
|
404
|
+
│ │ └── SKILL.md # 代理訊息策略(工具 + CLI)
|
|
405
|
+
│ └── lansenger-setup/
|
|
406
|
+
│ └── SKILL.md # 安裝助手(自動複製至 ~/.openclaw/skills)
|
|
407
|
+
├── dist/ # 編譯後的 JavaScript
|
|
408
|
+
├── index.ts # 插件入口(registerFull、ensureSetupSkill)
|
|
409
|
+
├── setup-entry.ts # 設定精靈入口
|
|
410
|
+
├── openclaw.plugin.json # 插件元資料與 GUI 設定
|
|
411
|
+
├── CHANGELOG.md
|
|
412
|
+
├── VERSION
|
|
413
|
+
├── vitest.config.ts
|
|
410
414
|
├── package.json
|
|
411
415
|
└── tsconfig.json
|
|
412
416
|
```
|