@hotwvpyym/openclaw-lark 2026.9.7 → 2026.10.3
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.md +19 -7
- package/README.zh.md +19 -7
- package/dist/index.mjs +2 -2
- package/dist/{monitor-DQx0fPli.mjs → monitor-qXlHB8uA.mjs} +86 -2
- package/openclaw.plugin.json +946 -3
- package/package.json +18 -17
package/README.md
CHANGED
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
| 事实 | 说明 |
|
|
22
22
|
|---|---|
|
|
23
23
|
| 官方插件停更 | `larksuite/openclaw-lark` 最后一个官方版本为 **2026.7.16**,之后官方不再维护 |
|
|
24
|
-
| 与新版 OpenClaw 不兼容 | 官方 2026.7.16 版无法安装/正常运行在 OpenClaw **2026.9.x
|
|
24
|
+
| 与新版 OpenClaw 不兼容 | 官方 2026.7.16 版无法安装/正常运行在 OpenClaw **2026.9.x 及以上**(插件 SDK API 已变化);**2026.10.x 起官方移除了 `openclaw/plugin-sdk/command-auth` 子路径**,官方 7.16 的静态 import 会在插件注册前加载失败 |
|
|
25
25
|
| 官方新线门槛更高 | 官方替代插件 `@openclaw/feishu` 要求 OpenClaw **≥2026.9.8**,无法用于 9.7 及以下版本,且该插件**不提供卡片用量页脚(footer metrics)** |
|
|
26
26
|
|
|
27
|
-
### 本版本修复的核心问题(OpenClaw 2026.9.7
|
|
27
|
+
### 本版本修复的核心问题(OpenClaw 2026.9.7 生产实测验证 + 2026.10.3 对齐验证)
|
|
28
28
|
|
|
29
29
|
1. **卡片页脚指标缺失**:官方版升级到 9.7 后,卡片页脚只剩「状态 + 耗时」,`tokens / cache / context / model` 四项全部丢失。
|
|
30
30
|
- 根因:OpenClaw 2026.9.7 起会话存储从 `sessions.json` 改为 **per-agent SQLite**(`<stateDir>/agents/<agentId>/agent/openclaw-agent.sqlite`),footer 渲染时的 agent 归属解析抛出 `AgentSelectionRequiredError`,被外层 `catch` 静默吞掉,导致页脚渲染中止。
|
|
@@ -35,6 +35,13 @@
|
|
|
35
35
|
- 会话快照探测削峰(每轮 720 次 → ≤60 次,SDK 探测一次缓存);
|
|
36
36
|
- 高频日志降噪(info → debug);
|
|
37
37
|
- AbortController 生命周期管理(流式卡片请求可被中断、随网关关闭清理)。
|
|
38
|
+
4. **OpenClaw 10.x 兼容层(2026.10.3 起)**:官方 10.x 移除了 `openclaw/plugin-sdk/command-auth` 子路径,新增 `command-auth-compat` 双路径兼容层:
|
|
39
|
+
- **9.x**(`2026.8.1` ~ `2026.9.x`):仍走官方 legacy `command-auth`,行为与历史版本完全一致;
|
|
40
|
+
- **10.x**(`2026.10.x`):自动切换到官方 `channel-ingress-runtime` 完成命令授权(与 OpenClaw 10.x 主机其他渠道行为一致);
|
|
41
|
+
- **授权一致性回归**:3840 组参数对比 legacy vs ingress,3560 组一致(92.7%),280 组差异全部为官方 10.x 有意收紧(更严格、更安全,无反向风险);同时修复空 sender + 通配 allowlist 的越权缺口(详见 `reports/auth-consistency/REPORT.md`)。
|
|
42
|
+
5. **manifest configSchema 修复(OpenClaw 10.x 配置校验收严)**:OpenClaw 10.x 起基于插件 manifest 的 `configSchema` **严格校验**渠道配置;旧版 manifest 该字段为空,导致 `channels.feishu.footer`(页脚六项开关)等全部合法配置被拒绝(报 `must not have additional properties`),openclaw 升级后插件配置直接 invalid。
|
|
43
|
+
- 修复:将源码 `FEISHU_CONFIG_JSON_SCHEMA`(zod 自动生成)完整同步进 manifest `configSchema`,共 **41 个字段**(footer 六项 / dmPolicy / replyMode / heartbeat / dedup / accounts 等);
|
|
44
|
+
- 效果:`openclaw config validate` 通过,页脚六项等配置正常生效;ClawHub validate 2026.10.3 **0 Breakages / 0 Warnings**。
|
|
38
45
|
|
|
39
46
|
### 保留的官方全部功能
|
|
40
47
|
|
|
@@ -71,6 +78,7 @@
|
|
|
71
78
|
| 2026.9.6 | 官方 tarball | typecheck 0 错误 ✅ |
|
|
72
79
|
| 2026.9.7 | 官方 tarball + 生产服务器 | typecheck 0 错误 + 生产实测(footer 六项/消息收发/插件加载全过)✅ |
|
|
73
80
|
| 2026.9.8 | 官方 tarball | typecheck 0 错误 ✅ |
|
|
81
|
+
| **2026.10.3** | 官方 npm(latest 稳定版) | typecheck 0 错误 + lint 0 errors + 445 测试全绿 + clawhub validate **0 Breakages / 0 Warnings** ✅ |
|
|
74
82
|
|
|
75
83
|
**架构适配说明**:OpenClaw 8.x / 9.6 使用 `sessions.json` 会话存储,9.7+ 使用 per-agent SQLite —— 插件对两种架构均做了兼容(SQLite 直读不可用时自动回退 SDK 读取),因此 2026.8.1 至最新版均可用。
|
|
76
84
|
|
|
@@ -88,12 +96,12 @@
|
|
|
88
96
|
**方式 A:本地 tgz 安装(推荐,最可控)**
|
|
89
97
|
|
|
90
98
|
```bash
|
|
91
|
-
openclaw plugins install npm-pack:/path/to/hotwvpyym-openclaw-lark-2026.
|
|
99
|
+
openclaw plugins install npm-pack:/path/to/hotwvpyym-openclaw-lark-2026.10.3.tgz --force --accept-capabilities
|
|
92
100
|
```
|
|
93
101
|
|
|
94
102
|
**方式 B:从 GitHub Release 下载**
|
|
95
103
|
|
|
96
|
-
在 [Releases](../../releases) 页面下载 `hotwvpyym-openclaw-lark-2026.
|
|
104
|
+
在 [Releases](../../releases) 页面下载 `hotwvpyym-openclaw-lark-2026.10.3.tgz`,然后按方式 A 安装。
|
|
97
105
|
|
|
98
106
|
**方式 C:ClawHub(发布后可用)**
|
|
99
107
|
|
|
@@ -104,7 +112,7 @@ openclaw plugins install @hotwvpyym/openclaw-lark
|
|
|
104
112
|
安装完成后确认:
|
|
105
113
|
|
|
106
114
|
```bash
|
|
107
|
-
openclaw plugins list # 应看到 openclaw-lark,版本 2026.
|
|
115
|
+
openclaw plugins list # 应看到 openclaw-lark,版本 2026.10.3
|
|
108
116
|
openclaw gateway restart # 若安装过程提示 drain 超时,用此命令兜底
|
|
109
117
|
```
|
|
110
118
|
|
|
@@ -158,7 +166,10 @@ openclaw config set channels.feishu.footer.model true # 模型
|
|
|
158
166
|
|
|
159
167
|
- 🐛 **Bug 报告**:请提交 [Issue](../../issues),附上:OpenClaw 版本(`openclaw -v`)、插件版本(`openclaw plugins list`)、复现步骤、相关日志。
|
|
160
168
|
- 💡 **功能建议**:同样通过 Issue 提出。
|
|
161
|
-
- 🔄 **持续更新**:本仓库将跟随 OpenClaw
|
|
169
|
+
- 🔄 **持续更新**:本仓库将跟随 OpenClaw 版本演进持续维护。升级方式三选一:
|
|
170
|
+
- **热更新(推荐,无需重启 Gateway)**:`openclaw plugins update <id>` 或 `openclaw plugins install <新版>` 后执行 `openclaw plugins reload <id>`——OpenClaw 10.x 原生支持插件级热重载(60 秒 drain 窗口,失败自动回滚保留旧版本继续服务);本插件已通过资源生命周期审计,兼容 reload;
|
|
171
|
+
- **本地 tgz**:`openclaw plugins install npm-pack:/path/to/<新版.tgz> --force --accept-capabilities`(同名升级直接覆盖);
|
|
172
|
+
- **兜底**:`openclaw gateway restart`。
|
|
162
173
|
|
|
163
174
|
**已知限制**:暂无已知功能性问题;如发现问题会在本 README 与 CHANGELOG 中同步更新。
|
|
164
175
|
|
|
@@ -168,7 +179,8 @@ openclaw config set channels.feishu.footer.model true # 模型
|
|
|
168
179
|
|
|
169
180
|
| 版本 | 内容 |
|
|
170
181
|
|---|---|
|
|
171
|
-
| **2026.
|
|
182
|
+
| **2026.10.3**(当前,正式发布版) | **对齐 OpenClaw 2026.10.3 稳定版(npm latest)**:新增 `command-auth-compat` 双路径兼容层(9.x legacy / 10.x channel-ingress-runtime),修复官方 10.x 移除 command-auth 子路径后的加载失败;manifest 补 `name` 字段,clawhub validate 2026.10.3 达 0 Breakages / 0 Warnings;授权一致性回归 3840 组通过(含空 sender 越权缺口修复);兼容 OpenClaw ≥2026.8.1 |
|
|
183
|
+
| 2026.9.7 | 发布就绪版本:包名改为 `@hotwvpyym/openclaw-lark`(匹配 ClawHub 发布者 scope),补 `openclaw.build.openclawVersion`/`license` 字段;内容与 9.6.11 一致(日历 page_size 全量修复 + footer 指标 + 性能优化) |
|
|
172
184
|
| 2026.9.6.11 | 日历等 13 文件 20 处 `page_size` 上下限全量补齐(按飞书文档),calendar 系列运行时钳制双保险;修复上一版注入产生的语法问题 |
|
|
173
185
|
| 2026.9.6.10 | AbortController 生命周期管理;`not available` 日志降级 debug |
|
|
174
186
|
| 2026.9.6.9 | 会话快照探测削峰(720→≤60 次/轮);4 处高频日志降噪 |
|
package/README.zh.md
CHANGED
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
| 事实 | 说明 |
|
|
20
20
|
|---|---|
|
|
21
21
|
| 官方插件停更 | `larksuite/openclaw-lark` 最后一个官方版本为 **2026.7.16**,之后官方不再维护 |
|
|
22
|
-
| 与新版 OpenClaw 不兼容 | 官方 2026.7.16 版无法安装/正常运行在 OpenClaw **2026.9.x
|
|
22
|
+
| 与新版 OpenClaw 不兼容 | 官方 2026.7.16 版无法安装/正常运行在 OpenClaw **2026.9.x 及以上**(插件 SDK API 已变化);**2026.10.x 起官方移除了 `openclaw/plugin-sdk/command-auth` 子路径**,官方 7.16 的静态 import 会在插件注册前加载失败 |
|
|
23
23
|
| 官方新线门槛更高 | 官方替代插件 `@openclaw/feishu` 要求 OpenClaw **≥2026.9.8**,无法用于 9.7 及以下版本,且该插件**不提供卡片用量页脚(footer metrics)** |
|
|
24
24
|
|
|
25
|
-
### 本版本修复的核心问题(OpenClaw 2026.9.7
|
|
25
|
+
### 本版本修复的核心问题(OpenClaw 2026.9.7 生产实测验证 + 2026.10.3 对齐验证)
|
|
26
26
|
|
|
27
27
|
1. **卡片页脚指标缺失**:官方版升级到 9.7 后,卡片页脚只剩「状态 + 耗时」,`tokens / cache / context / model` 四项全部丢失。
|
|
28
28
|
- 根因:OpenClaw 2026.9.7 起会话存储从 `sessions.json` 改为 **per-agent SQLite**(`<stateDir>/agents/<agentId>/agent/openclaw-agent.sqlite`),footer 渲染时的 agent 归属解析抛出 `AgentSelectionRequiredError`,被外层 `catch` 静默吞掉,导致页脚渲染中止。
|
|
@@ -33,6 +33,13 @@
|
|
|
33
33
|
- 会话快照探测削峰(每轮 720 次 → ≤60 次,SDK 探测一次缓存);
|
|
34
34
|
- 高频日志降噪(info → debug);
|
|
35
35
|
- AbortController 生命周期管理(流式卡片请求可被中断、随网关关闭清理)。
|
|
36
|
+
4. **OpenClaw 10.x 兼容层(2026.10.3 起)**:官方 10.x 移除了 `openclaw/plugin-sdk/command-auth` 子路径,新增 `command-auth-compat` 双路径兼容层:
|
|
37
|
+
- **9.x**(`2026.8.1` ~ `2026.9.x`):仍走官方 legacy `command-auth`,行为与历史版本完全一致;
|
|
38
|
+
- **10.x**(`2026.10.x`):自动切换到官方 `channel-ingress-runtime` 完成命令授权(与 OpenClaw 10.x 主机其他渠道行为一致);
|
|
39
|
+
- **授权一致性回归**:3840 组参数对比 legacy vs ingress,3560 组一致(92.7%),280 组差异全部为官方 10.x 有意收紧(更严格、更安全,无反向风险);同时修复空 sender + 通配 allowlist 的越权缺口(详见 `reports/auth-consistency/REPORT.md`)。
|
|
40
|
+
5. **manifest configSchema 修复(OpenClaw 10.x 配置校验收严)**:OpenClaw 10.x 起基于插件 manifest 的 `configSchema` **严格校验**渠道配置;旧版 manifest 该字段为空,导致 `channels.feishu.footer`(页脚六项开关)等全部合法配置被拒绝(报 `must not have additional properties`),openclaw 升级后插件配置直接 invalid。
|
|
41
|
+
- 修复:将源码 `FEISHU_CONFIG_JSON_SCHEMA`(zod 自动生成)完整同步进 manifest `configSchema`,共 **41 个字段**(footer 六项 / dmPolicy / replyMode / heartbeat / dedup / accounts 等);
|
|
42
|
+
- 效果:`openclaw config validate` 通过,页脚六项等配置正常生效;ClawHub validate 2026.10.3 **0 Breakages / 0 Warnings**。
|
|
36
43
|
|
|
37
44
|
### 保留的官方全部功能
|
|
38
45
|
|
|
@@ -69,6 +76,7 @@
|
|
|
69
76
|
| 2026.9.6 | 官方 tarball | typecheck 0 错误 ✅ |
|
|
70
77
|
| 2026.9.7 | 官方 tarball + 生产服务器 | typecheck 0 错误 + 生产实测(footer 六项/消息收发/插件加载全过)✅ |
|
|
71
78
|
| 2026.9.8 | 官方 tarball | typecheck 0 错误 ✅ |
|
|
79
|
+
| **2026.10.3** | 官方 npm(latest 稳定版) | typecheck 0 错误 + lint 0 errors + 445 测试全绿 + clawhub validate **0 Breakages / 0 Warnings** ✅ |
|
|
72
80
|
|
|
73
81
|
**架构适配说明**:OpenClaw 8.x / 9.6 使用 `sessions.json` 会话存储,9.7+ 使用 per-agent SQLite —— 插件对两种架构均做了兼容(SQLite 直读不可用时自动回退 SDK 读取),因此 2026.8.1 至最新版均可用。
|
|
74
82
|
|
|
@@ -86,12 +94,12 @@
|
|
|
86
94
|
**方式 A:本地 tgz 安装(推荐,最可控)**
|
|
87
95
|
|
|
88
96
|
```bash
|
|
89
|
-
openclaw plugins install npm-pack:/path/to/hotwvpyym-openclaw-lark-2026.
|
|
97
|
+
openclaw plugins install npm-pack:/path/to/hotwvpyym-openclaw-lark-2026.10.3.tgz --force --accept-capabilities
|
|
90
98
|
```
|
|
91
99
|
|
|
92
100
|
**方式 B:从 GitHub Release 下载**
|
|
93
101
|
|
|
94
|
-
在 [Releases](../../releases) 页面下载 `hotwvpyym-openclaw-lark-2026.
|
|
102
|
+
在 [Releases](../../releases) 页面下载 `hotwvpyym-openclaw-lark-2026.10.3.tgz`,然后按方式 A 安装。
|
|
95
103
|
|
|
96
104
|
**方式 C:ClawHub(发布后可用)**
|
|
97
105
|
|
|
@@ -102,7 +110,7 @@ openclaw plugins install @hotwvpyym/openclaw-lark
|
|
|
102
110
|
安装完成后确认:
|
|
103
111
|
|
|
104
112
|
```bash
|
|
105
|
-
openclaw plugins list # 应看到 openclaw-lark,版本 2026.
|
|
113
|
+
openclaw plugins list # 应看到 openclaw-lark,版本 2026.10.3
|
|
106
114
|
openclaw gateway restart # 若安装过程提示 drain 超时,用此命令兜底
|
|
107
115
|
```
|
|
108
116
|
|
|
@@ -156,7 +164,10 @@ openclaw config set channels.feishu.footer.model true # 模型
|
|
|
156
164
|
|
|
157
165
|
- 🐛 **Bug 报告**:请提交 [Issue](../../issues),附上:OpenClaw 版本(`openclaw -v`)、插件版本(`openclaw plugins list`)、复现步骤、相关日志。
|
|
158
166
|
- 💡 **功能建议**:同样通过 Issue 提出。
|
|
159
|
-
- 🔄 **持续更新**:本仓库将跟随 OpenClaw
|
|
167
|
+
- 🔄 **持续更新**:本仓库将跟随 OpenClaw 版本演进持续维护。升级方式三选一:
|
|
168
|
+
- **热更新(推荐,无需重启 Gateway)**:`openclaw plugins update <id>` 或 `openclaw plugins install <新版>` 后执行 `openclaw plugins reload <id>`——OpenClaw 10.x 原生支持插件级热重载(60 秒 drain 窗口,失败自动回滚保留旧版本继续服务);本插件已通过资源生命周期审计,兼容 reload;
|
|
169
|
+
- **本地 tgz**:`openclaw plugins install npm-pack:/path/to/<新版.tgz> --force --accept-capabilities`(同名升级直接覆盖);
|
|
170
|
+
- **兜底**:`openclaw gateway restart`。
|
|
160
171
|
|
|
161
172
|
**已知限制**:暂无已知功能性问题;如发现问题会在本 README 与 CHANGELOG 中同步更新。
|
|
162
173
|
|
|
@@ -166,7 +177,8 @@ openclaw config set channels.feishu.footer.model true # 模型
|
|
|
166
177
|
|
|
167
178
|
| 版本 | 内容 |
|
|
168
179
|
|---|---|
|
|
169
|
-
| **2026.
|
|
180
|
+
| **2026.10.3**(当前,正式发布版) | **对齐 OpenClaw 2026.10.3 稳定版(npm latest)**:新增 `command-auth-compat` 双路径兼容层(9.x legacy / 10.x channel-ingress-runtime),修复官方 10.x 移除 command-auth 子路径后的加载失败;manifest 补 `name` 字段,clawhub validate 2026.10.3 达 0 Breakages / 0 Warnings;授权一致性回归 3840 组通过(含空 sender 越权缺口修复);兼容 OpenClaw ≥2026.8.1 |
|
|
181
|
+
| 2026.9.7 | 发布就绪版本:包名改为 `@hotwvpyym/openclaw-lark`(匹配 ClawHub 发布者 scope),补 `openclaw.build.openclawVersion`/`license` 字段;内容与 9.6.11 一致(日历 page_size 全量修复 + footer 指标 + 性能优化) |
|
|
170
182
|
| 2026.9.6.11 | 日历等 13 文件 20 处 `page_size` 上下限全量补齐(按飞书文档),calendar 系列运行时钳制双保险;修复上一版注入产生的语法问题 |
|
|
171
183
|
| 2026.9.6.10 | AbortController 生命周期管理;`not available` 日志降级 debug |
|
|
172
184
|
| 2026.9.6.9 | 会话快照探测削峰(720→≤60 次/轮);4 处高频日志降噪 |
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as ensureMention, A as resolveAnyEnabledToolsConfig, At as getLarkAccount, B as sendMessageFeishu, C as triggerOnboarding, Ct as resolveReceiveIdType, D as formatToolResult, Dt as getTicket, E as createToolContext, Et as larkLogger, F as getStoredToken, G as formatMentionAllForCard, H as buildMentionedCardContent, I as filterSensitiveScopes, J as formatMentionForText, K as formatMentionAllForText, L as getAppGrantedScopes, M as mcpDomain, N as openPlatformDomain, O as getFirstAccount, Ot as getDefaultLarkAccountId, P as wwwDomain, Q as currentBotPeerContext, R as editMessageFeishu, S as handleInvokeErrorWithAutoAuth, St as parseFeishuRouteTarget, T as registerFeishuOAuthTool, Tt as getUserAgent, U as buildMentionedMessage, V as updateCardFeishu, W as extractMessageBody, X as nonBotMentions, Y as mentionedBot, Z as resolveFeishuGroupToolPolicy, _ as getMessageFeishu, _t as UserScopeInsufficientError, a as registerAskUserQuestionTool, at as sendAudioLark, b as buildConvertContextFromItem, bt as looksLikeFeishuId, c as formatDiagReportCli, ct as uploadAndSendMediaLark, d as traceByMessageId, dt as validateLocalMediaRoots, et as normalizeOutboundMentions, f as probeFeishu, ft as assertLarkOk$2, g as checkMessageGate, gt as UserAuthRequiredError, h as sanitizeParamsForLog, ht as AppScopeMissingError, i as isMessageExpired, it as sendTextLark, j as rawLarkRequest, jt as getLarkAccountIds, k as registerTool, kt as getEnabledLarkAccounts, l as formatTraceOutput, lt as uploadFileLark, m as recordToolUseStart, mt as AppScopeCheckFailedError, nt as sendCommentReplyLark, o as registerCommands, ot as sendFileLark, p as recordToolUseEnd, pt as formatLarkError, q as formatMentionForCard, r as handleFeishuReaction, rt as sendMediaLark, s as analyzeTrace, st as sendImageLark, t as monitorFeishuProvider, tt as sendCardLark, u as runDiagnosis, ut as uploadImageLark, v as parseMessageEvent, vt as isSyntheticTarget, w as executeAuthorize, wt as LarkClient, x as extractMentionOpenId, xt as normalizeFeishuTarget, y as convertMessageContent, yt as isCommentTarget, z as sendCardFeishu } from "./monitor-
|
|
1
|
+
import { $ as ensureMention, A as resolveAnyEnabledToolsConfig, At as getLarkAccount, B as sendMessageFeishu, C as triggerOnboarding, Ct as resolveReceiveIdType, D as formatToolResult, Dt as getTicket, E as createToolContext, Et as larkLogger, F as getStoredToken, G as formatMentionAllForCard, H as buildMentionedCardContent, I as filterSensitiveScopes, J as formatMentionForText, K as formatMentionAllForText, L as getAppGrantedScopes, M as mcpDomain, N as openPlatformDomain, O as getFirstAccount, Ot as getDefaultLarkAccountId, P as wwwDomain, Q as currentBotPeerContext, R as editMessageFeishu, S as handleInvokeErrorWithAutoAuth, St as parseFeishuRouteTarget, T as registerFeishuOAuthTool, Tt as getUserAgent, U as buildMentionedMessage, V as updateCardFeishu, W as extractMessageBody, X as nonBotMentions, Y as mentionedBot, Z as resolveFeishuGroupToolPolicy, _ as getMessageFeishu, _t as UserScopeInsufficientError, a as registerAskUserQuestionTool, at as sendAudioLark, b as buildConvertContextFromItem, bt as looksLikeFeishuId, c as formatDiagReportCli, ct as uploadAndSendMediaLark, d as traceByMessageId, dt as validateLocalMediaRoots, et as normalizeOutboundMentions, f as probeFeishu, ft as assertLarkOk$2, g as checkMessageGate, gt as UserAuthRequiredError, h as sanitizeParamsForLog, ht as AppScopeMissingError, i as isMessageExpired, it as sendTextLark, j as rawLarkRequest, jt as getLarkAccountIds, k as registerTool, kt as getEnabledLarkAccounts, l as formatTraceOutput, lt as uploadFileLark, m as recordToolUseStart, mt as AppScopeCheckFailedError, nt as sendCommentReplyLark, o as registerCommands, ot as sendFileLark, p as recordToolUseEnd, pt as formatLarkError, q as formatMentionForCard, r as handleFeishuReaction, rt as sendMediaLark, s as analyzeTrace, st as sendImageLark, t as monitorFeishuProvider, tt as sendCardLark, u as runDiagnosis, ut as uploadImageLark, v as parseMessageEvent, vt as isSyntheticTarget, w as executeAuthorize, wt as LarkClient, x as extractMentionOpenId, xt as normalizeFeishuTarget, y as convertMessageContent, yt as isCommentTarget, z as sendCardFeishu } from "./monitor-qXlHB8uA.mjs";
|
|
2
2
|
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/core";
|
|
3
3
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
4
4
|
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
@@ -1430,7 +1430,7 @@ const feishuPlugin = {
|
|
|
1430
1430
|
},
|
|
1431
1431
|
gateway: {
|
|
1432
1432
|
startAccount: async (ctx) => {
|
|
1433
|
-
const { monitorFeishuProvider } = await import("./monitor-
|
|
1433
|
+
const { monitorFeishuProvider } = await import("./monitor-qXlHB8uA.mjs").then((n) => n.n);
|
|
1434
1434
|
const account = getLarkAccount(ctx.cfg, ctx.accountId);
|
|
1435
1435
|
const port = account.config?.webhookPort ?? null;
|
|
1436
1436
|
ctx.setStatus({
|
|
@@ -20,8 +20,8 @@ import { chmod, mkdir, readFile, unlink, writeFile } from "node:fs/promises";
|
|
|
20
20
|
import * as crypto from "node:crypto";
|
|
21
21
|
import { createCipheriv, createDecipheriv, randomBytes, randomUUID } from "node:crypto";
|
|
22
22
|
import { DEFAULT_GROUP_HISTORY_LIMIT, buildPendingHistoryContextFromMap, clearHistoryEntriesIfEnabled, recordPendingHistoryEntryIfEnabled } from "openclaw/plugin-sdk/reply-history";
|
|
23
|
-
import { resolveSenderCommandAuthorization } from "openclaw/plugin-sdk/command-auth";
|
|
24
23
|
import { isNormalizedSenderAllowed } from "openclaw/plugin-sdk/allow-from";
|
|
24
|
+
import { defineStableChannelIngressIdentity, resolveChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
25
25
|
import { createReplyPrefixContext, createTypingCallbacks } from "openclaw/plugin-sdk/channel-outbound";
|
|
26
26
|
import { logTypingFailure } from "openclaw/plugin-sdk/channel-feedback";
|
|
27
27
|
import { DatabaseSync } from "node:sqlite";
|
|
@@ -9656,6 +9656,88 @@ async function convertMessageContent(raw, messageType, ctx) {
|
|
|
9656
9656
|
});
|
|
9657
9657
|
}
|
|
9658
9658
|
//#endregion
|
|
9659
|
+
//#region src/messaging/inbound/command-auth-compat.ts
|
|
9660
|
+
/**
|
|
9661
|
+
* Resolve whether a sender may run slash/control commands.
|
|
9662
|
+
*
|
|
9663
|
+
* Prefers the legacy `command-auth` subpath when the running OpenClaw exports
|
|
9664
|
+
* it; falls back to the channel-ingress runtime on OpenClaw 10.x.
|
|
9665
|
+
*/
|
|
9666
|
+
async function resolveSenderCommandAuthorizationCompat(params) {
|
|
9667
|
+
const legacy = await tryLoadLegacyCommandAuth();
|
|
9668
|
+
if (legacy) return legacy.resolveSenderCommandAuthorization({
|
|
9669
|
+
rawBody: params.rawBody,
|
|
9670
|
+
cfg: params.cfg,
|
|
9671
|
+
isGroup: params.isGroup,
|
|
9672
|
+
dmPolicy: params.dmPolicy,
|
|
9673
|
+
configuredAllowFrom: params.configuredAllowFrom,
|
|
9674
|
+
configuredGroupAllowFrom: params.configuredGroupAllowFrom,
|
|
9675
|
+
senderId: params.senderId,
|
|
9676
|
+
isSenderAllowed: params.isSenderAllowed,
|
|
9677
|
+
readAllowFromStore: params.readAllowFromStore,
|
|
9678
|
+
shouldComputeCommandAuthorized: params.shouldComputeCommandAuthorized,
|
|
9679
|
+
resolveCommandAuthorizedFromAuthorizers: params.resolveCommandAuthorizedFromAuthorizers
|
|
9680
|
+
});
|
|
9681
|
+
return resolveCommandAuthorizationViaIngress(params);
|
|
9682
|
+
}
|
|
9683
|
+
async function tryLoadLegacyCommandAuth() {
|
|
9684
|
+
const legacyPath = "openclaw/plugin-sdk/command-auth";
|
|
9685
|
+
try {
|
|
9686
|
+
const mod = await import(legacyPath);
|
|
9687
|
+
if (typeof mod?.resolveSenderCommandAuthorization === "function") return mod;
|
|
9688
|
+
} catch {}
|
|
9689
|
+
return null;
|
|
9690
|
+
}
|
|
9691
|
+
async function resolveCommandAuthorizationViaIngress(params) {
|
|
9692
|
+
if (!params.shouldComputeCommandAuthorized(params.rawBody, params.cfg)) return { commandAuthorized: void 0 };
|
|
9693
|
+
if (!params.senderId) return { commandAuthorized: false };
|
|
9694
|
+
return { commandAuthorized: (await resolveChannelMessageIngress({
|
|
9695
|
+
channelId: params.channelId,
|
|
9696
|
+
accountId: params.accountId,
|
|
9697
|
+
identity: defineStableChannelIngressIdentity({
|
|
9698
|
+
key: "senderId",
|
|
9699
|
+
normalize: (value) => value.length > 0 ? value : null,
|
|
9700
|
+
authentication: "verified"
|
|
9701
|
+
}),
|
|
9702
|
+
subject: { stableId: params.senderId },
|
|
9703
|
+
conversation: {
|
|
9704
|
+
kind: params.isGroup ? "group" : "direct",
|
|
9705
|
+
id: params.channelId
|
|
9706
|
+
},
|
|
9707
|
+
event: {
|
|
9708
|
+
kind: "message",
|
|
9709
|
+
authMode: "inbound",
|
|
9710
|
+
mayPair: false
|
|
9711
|
+
},
|
|
9712
|
+
policy: {
|
|
9713
|
+
dmPolicy: params.dmPolicy,
|
|
9714
|
+
groupPolicy: "allowlist",
|
|
9715
|
+
activation: {
|
|
9716
|
+
requireMention: false,
|
|
9717
|
+
allowTextCommands: true
|
|
9718
|
+
},
|
|
9719
|
+
command: {
|
|
9720
|
+
useAccessGroups: true,
|
|
9721
|
+
allowTextCommands: true,
|
|
9722
|
+
hasControlCommand: true,
|
|
9723
|
+
modeWhenAccessGroupsOff: "configured"
|
|
9724
|
+
}
|
|
9725
|
+
},
|
|
9726
|
+
allowFrom: params.configuredAllowFrom,
|
|
9727
|
+
groupAllowFrom: params.configuredGroupAllowFrom,
|
|
9728
|
+
readStoreAllowFrom: async ({ dmPolicy }) => !params.isGroup && dmPolicy !== "allowlist" && dmPolicy !== "open" ? await params.readAllowFromStore().catch(() => []) : [],
|
|
9729
|
+
command: {
|
|
9730
|
+
useAccessGroups: true,
|
|
9731
|
+
allowTextCommands: true,
|
|
9732
|
+
hasControlCommand: true,
|
|
9733
|
+
modeWhenAccessGroupsOff: "configured",
|
|
9734
|
+
commandOwnerAllowFrom: params.configuredAllowFrom,
|
|
9735
|
+
groupOwnerAllowFrom: "configured",
|
|
9736
|
+
directGroupAllowFrom: "none"
|
|
9737
|
+
}
|
|
9738
|
+
})).commandAccess?.authorized };
|
|
9739
|
+
}
|
|
9740
|
+
//#endregion
|
|
9659
9741
|
//#region src/messaging/inbound/parse-io.ts
|
|
9660
9742
|
const log$14 = larkLogger("inbound/parse-io");
|
|
9661
9743
|
/**
|
|
@@ -16317,7 +16399,7 @@ async function handleFeishuMessage(params) {
|
|
|
16317
16399
|
if (combined.length > 0) return combined;
|
|
16318
16400
|
return (groupConfig?.groupPolicy ?? defaultGroupConfig?.groupPolicy ?? accountFeishuCfg?.groupPolicy) === "open" ? ["*"] : [];
|
|
16319
16401
|
})();
|
|
16320
|
-
const { commandAuthorized } = await
|
|
16402
|
+
const { commandAuthorized } = await resolveSenderCommandAuthorizationCompat({
|
|
16321
16403
|
rawBody: ctx.content,
|
|
16322
16404
|
cfg: accountScopedCfg,
|
|
16323
16405
|
isGroup,
|
|
@@ -16330,6 +16412,8 @@ async function handleFeishuMessage(params) {
|
|
|
16330
16412
|
allowFrom
|
|
16331
16413
|
}),
|
|
16332
16414
|
readAllowFromStore: () => readAllowFromStore(account.accountId),
|
|
16415
|
+
channelId: ctx.chatId,
|
|
16416
|
+
accountId: account.accountId,
|
|
16333
16417
|
shouldComputeCommandAuthorized: core.channel.commands.shouldComputeCommandAuthorized,
|
|
16334
16418
|
resolveCommandAuthorizedFromAuthorizers: core.channel.commands.resolveCommandAuthorizedFromAuthorizers
|
|
16335
16419
|
});
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "openclaw-lark",
|
|
3
|
+
"name": "OpenClaw Lark (Community Compat)",
|
|
3
4
|
"channels": [
|
|
4
5
|
"feishu"
|
|
5
6
|
],
|
|
@@ -7,9 +8,951 @@
|
|
|
7
8
|
"./skills"
|
|
8
9
|
],
|
|
9
10
|
"configSchema": {
|
|
11
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
10
12
|
"type": "object",
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
+
"properties": {
|
|
14
|
+
"appId": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"appSecret": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"encryptKey": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"verificationToken": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"name": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"enabled": {
|
|
30
|
+
"type": "boolean"
|
|
31
|
+
},
|
|
32
|
+
"domain": {
|
|
33
|
+
"anyOf": [
|
|
34
|
+
{
|
|
35
|
+
"type": "string",
|
|
36
|
+
"const": "feishu"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "string",
|
|
40
|
+
"const": "lark"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^https:\\/\\/"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"connectionMode": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"enum": [
|
|
51
|
+
"websocket",
|
|
52
|
+
"webhook"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"webhookPath": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
},
|
|
58
|
+
"webhookPort": {
|
|
59
|
+
"type": "number"
|
|
60
|
+
},
|
|
61
|
+
"dmPolicy": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"enum": [
|
|
64
|
+
"open",
|
|
65
|
+
"pairing",
|
|
66
|
+
"allowlist",
|
|
67
|
+
"disabled"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"allowFrom": {
|
|
71
|
+
"anyOf": [
|
|
72
|
+
{
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"groupPolicy": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"enum": [
|
|
86
|
+
"open",
|
|
87
|
+
"allowlist",
|
|
88
|
+
"disabled"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"groupAllowFrom": {
|
|
92
|
+
"anyOf": [
|
|
93
|
+
{
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "array",
|
|
98
|
+
"items": {
|
|
99
|
+
"type": "string"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"requireMention": {
|
|
105
|
+
"type": "boolean"
|
|
106
|
+
},
|
|
107
|
+
"respondToMentionAll": {
|
|
108
|
+
"type": "boolean"
|
|
109
|
+
},
|
|
110
|
+
"groups": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"propertyNames": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
"additionalProperties": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"properties": {
|
|
118
|
+
"groupPolicy": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"enum": [
|
|
121
|
+
"open",
|
|
122
|
+
"allowlist",
|
|
123
|
+
"disabled"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"requireMention": {
|
|
127
|
+
"type": "boolean"
|
|
128
|
+
},
|
|
129
|
+
"respondToMentionAll": {
|
|
130
|
+
"type": "boolean"
|
|
131
|
+
},
|
|
132
|
+
"tools": {
|
|
133
|
+
"type": "object",
|
|
134
|
+
"properties": {
|
|
135
|
+
"allow": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"items": {
|
|
138
|
+
"type": "string"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"deny": {
|
|
142
|
+
"type": "array",
|
|
143
|
+
"items": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"skills": {
|
|
150
|
+
"type": "array",
|
|
151
|
+
"items": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"enabled": {
|
|
156
|
+
"type": "boolean"
|
|
157
|
+
},
|
|
158
|
+
"allowFrom": {
|
|
159
|
+
"anyOf": [
|
|
160
|
+
{
|
|
161
|
+
"type": "string"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"type": "array",
|
|
165
|
+
"items": {
|
|
166
|
+
"type": "string"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
"systemPrompt": {
|
|
172
|
+
"type": "string"
|
|
173
|
+
},
|
|
174
|
+
"allowBots": {
|
|
175
|
+
"anyOf": [
|
|
176
|
+
{
|
|
177
|
+
"type": "boolean"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"type": "string",
|
|
181
|
+
"const": "mentions"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"replyInThread": {
|
|
186
|
+
"type": "boolean"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"historyLimit": {
|
|
192
|
+
"type": "number"
|
|
193
|
+
},
|
|
194
|
+
"dmHistoryLimit": {
|
|
195
|
+
"type": "number"
|
|
196
|
+
},
|
|
197
|
+
"dms": {
|
|
198
|
+
"type": "object",
|
|
199
|
+
"properties": {
|
|
200
|
+
"historyLimit": {
|
|
201
|
+
"type": "number"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"textChunkLimit": {
|
|
206
|
+
"type": "number"
|
|
207
|
+
},
|
|
208
|
+
"chunkMode": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"enum": [
|
|
211
|
+
"newline",
|
|
212
|
+
"paragraph",
|
|
213
|
+
"none"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
"blockStreamingCoalesce": {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"properties": {
|
|
219
|
+
"minChars": {
|
|
220
|
+
"type": "number"
|
|
221
|
+
},
|
|
222
|
+
"maxChars": {
|
|
223
|
+
"type": "number"
|
|
224
|
+
},
|
|
225
|
+
"idleMs": {
|
|
226
|
+
"type": "number"
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"mediaMaxMb": {
|
|
231
|
+
"type": "number"
|
|
232
|
+
},
|
|
233
|
+
"heartbeat": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"properties": {
|
|
236
|
+
"every": {
|
|
237
|
+
"type": "string"
|
|
238
|
+
},
|
|
239
|
+
"activeHours": {
|
|
240
|
+
"type": "object",
|
|
241
|
+
"properties": {
|
|
242
|
+
"start": {
|
|
243
|
+
"type": "string"
|
|
244
|
+
},
|
|
245
|
+
"end": {
|
|
246
|
+
"type": "string"
|
|
247
|
+
},
|
|
248
|
+
"timezone": {
|
|
249
|
+
"type": "string"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"target": {
|
|
254
|
+
"type": "string"
|
|
255
|
+
},
|
|
256
|
+
"to": {
|
|
257
|
+
"type": "string"
|
|
258
|
+
},
|
|
259
|
+
"prompt": {
|
|
260
|
+
"type": "string"
|
|
261
|
+
},
|
|
262
|
+
"accountId": {
|
|
263
|
+
"type": "string"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"replyMode": {
|
|
268
|
+
"anyOf": [
|
|
269
|
+
{
|
|
270
|
+
"type": "string",
|
|
271
|
+
"enum": [
|
|
272
|
+
"auto",
|
|
273
|
+
"static",
|
|
274
|
+
"streaming"
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"type": "object",
|
|
279
|
+
"properties": {
|
|
280
|
+
"default": {
|
|
281
|
+
"type": "string",
|
|
282
|
+
"enum": [
|
|
283
|
+
"auto",
|
|
284
|
+
"static",
|
|
285
|
+
"streaming"
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
"group": {
|
|
289
|
+
"type": "string",
|
|
290
|
+
"enum": [
|
|
291
|
+
"auto",
|
|
292
|
+
"static",
|
|
293
|
+
"streaming"
|
|
294
|
+
]
|
|
295
|
+
},
|
|
296
|
+
"direct": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"enum": [
|
|
299
|
+
"auto",
|
|
300
|
+
"static",
|
|
301
|
+
"streaming"
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
},
|
|
308
|
+
"streaming": {
|
|
309
|
+
"anyOf": [
|
|
310
|
+
{
|
|
311
|
+
"type": "boolean"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"type": "object",
|
|
315
|
+
"properties": {
|
|
316
|
+
"mode": {
|
|
317
|
+
"type": "string",
|
|
318
|
+
"enum": [
|
|
319
|
+
"off",
|
|
320
|
+
"partial",
|
|
321
|
+
"block",
|
|
322
|
+
"progress"
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
"block": {
|
|
326
|
+
"type": "object",
|
|
327
|
+
"properties": {
|
|
328
|
+
"enabled": {
|
|
329
|
+
"type": "boolean"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"additionalProperties": {}
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"additionalProperties": {}
|
|
336
|
+
}
|
|
337
|
+
]
|
|
338
|
+
},
|
|
339
|
+
"blockStreaming": {
|
|
340
|
+
"type": "boolean"
|
|
341
|
+
},
|
|
342
|
+
"toolUseDisplay": {
|
|
343
|
+
"type": "object",
|
|
344
|
+
"properties": {
|
|
345
|
+
"showFullPaths": {
|
|
346
|
+
"type": "boolean"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"tools": {
|
|
351
|
+
"type": "object",
|
|
352
|
+
"properties": {
|
|
353
|
+
"doc": {
|
|
354
|
+
"type": "boolean"
|
|
355
|
+
},
|
|
356
|
+
"wiki": {
|
|
357
|
+
"type": "boolean"
|
|
358
|
+
},
|
|
359
|
+
"drive": {
|
|
360
|
+
"type": "boolean"
|
|
361
|
+
},
|
|
362
|
+
"perm": {
|
|
363
|
+
"type": "boolean"
|
|
364
|
+
},
|
|
365
|
+
"scopes": {
|
|
366
|
+
"type": "boolean"
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"footer": {
|
|
371
|
+
"type": "object",
|
|
372
|
+
"properties": {
|
|
373
|
+
"status": {
|
|
374
|
+
"type": "boolean"
|
|
375
|
+
},
|
|
376
|
+
"elapsed": {
|
|
377
|
+
"type": "boolean"
|
|
378
|
+
},
|
|
379
|
+
"tokens": {
|
|
380
|
+
"type": "boolean"
|
|
381
|
+
},
|
|
382
|
+
"cache": {
|
|
383
|
+
"type": "boolean"
|
|
384
|
+
},
|
|
385
|
+
"context": {
|
|
386
|
+
"type": "boolean"
|
|
387
|
+
},
|
|
388
|
+
"model": {
|
|
389
|
+
"type": "boolean"
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"markdown": {
|
|
394
|
+
"type": "object",
|
|
395
|
+
"properties": {
|
|
396
|
+
"tables": {
|
|
397
|
+
"type": "string",
|
|
398
|
+
"enum": [
|
|
399
|
+
"off",
|
|
400
|
+
"bullets",
|
|
401
|
+
"code"
|
|
402
|
+
]
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
"configWrites": {
|
|
407
|
+
"type": "boolean"
|
|
408
|
+
},
|
|
409
|
+
"capabilities": {
|
|
410
|
+
"type": "object",
|
|
411
|
+
"properties": {
|
|
412
|
+
"image": {
|
|
413
|
+
"type": "boolean"
|
|
414
|
+
},
|
|
415
|
+
"audio": {
|
|
416
|
+
"type": "boolean"
|
|
417
|
+
},
|
|
418
|
+
"video": {
|
|
419
|
+
"type": "boolean"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"dedup": {
|
|
424
|
+
"type": "object",
|
|
425
|
+
"properties": {
|
|
426
|
+
"ttlMs": {
|
|
427
|
+
"type": "number"
|
|
428
|
+
},
|
|
429
|
+
"maxEntries": {
|
|
430
|
+
"type": "number"
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
"reactionNotifications": {
|
|
435
|
+
"type": "string",
|
|
436
|
+
"enum": [
|
|
437
|
+
"off",
|
|
438
|
+
"own",
|
|
439
|
+
"all"
|
|
440
|
+
]
|
|
441
|
+
},
|
|
442
|
+
"threadSession": {
|
|
443
|
+
"type": "boolean"
|
|
444
|
+
},
|
|
445
|
+
"allowBots": {
|
|
446
|
+
"anyOf": [
|
|
447
|
+
{
|
|
448
|
+
"type": "boolean"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"type": "string",
|
|
452
|
+
"const": "mentions"
|
|
453
|
+
}
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
"replyInThread": {
|
|
457
|
+
"type": "boolean"
|
|
458
|
+
},
|
|
459
|
+
"uat": {
|
|
460
|
+
"type": "object",
|
|
461
|
+
"properties": {
|
|
462
|
+
"enabled": {
|
|
463
|
+
"type": "boolean"
|
|
464
|
+
},
|
|
465
|
+
"allowedScopes": {
|
|
466
|
+
"type": "array",
|
|
467
|
+
"items": {
|
|
468
|
+
"type": "string"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"blockedScopes": {
|
|
472
|
+
"type": "array",
|
|
473
|
+
"items": {
|
|
474
|
+
"type": "string"
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
"accounts": {
|
|
480
|
+
"type": "object",
|
|
481
|
+
"propertyNames": {
|
|
482
|
+
"type": "string"
|
|
483
|
+
},
|
|
484
|
+
"additionalProperties": {
|
|
485
|
+
"type": "object",
|
|
486
|
+
"properties": {
|
|
487
|
+
"appId": {
|
|
488
|
+
"type": "string"
|
|
489
|
+
},
|
|
490
|
+
"appSecret": {
|
|
491
|
+
"type": "string"
|
|
492
|
+
},
|
|
493
|
+
"encryptKey": {
|
|
494
|
+
"type": "string"
|
|
495
|
+
},
|
|
496
|
+
"verificationToken": {
|
|
497
|
+
"type": "string"
|
|
498
|
+
},
|
|
499
|
+
"name": {
|
|
500
|
+
"type": "string"
|
|
501
|
+
},
|
|
502
|
+
"enabled": {
|
|
503
|
+
"type": "boolean"
|
|
504
|
+
},
|
|
505
|
+
"domain": {
|
|
506
|
+
"anyOf": [
|
|
507
|
+
{
|
|
508
|
+
"type": "string",
|
|
509
|
+
"const": "feishu"
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"type": "string",
|
|
513
|
+
"const": "lark"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"type": "string",
|
|
517
|
+
"pattern": "^https:\\/\\/"
|
|
518
|
+
}
|
|
519
|
+
]
|
|
520
|
+
},
|
|
521
|
+
"connectionMode": {
|
|
522
|
+
"type": "string",
|
|
523
|
+
"enum": [
|
|
524
|
+
"websocket",
|
|
525
|
+
"webhook"
|
|
526
|
+
]
|
|
527
|
+
},
|
|
528
|
+
"webhookPath": {
|
|
529
|
+
"type": "string"
|
|
530
|
+
},
|
|
531
|
+
"webhookPort": {
|
|
532
|
+
"type": "number"
|
|
533
|
+
},
|
|
534
|
+
"dmPolicy": {
|
|
535
|
+
"type": "string",
|
|
536
|
+
"enum": [
|
|
537
|
+
"open",
|
|
538
|
+
"pairing",
|
|
539
|
+
"allowlist",
|
|
540
|
+
"disabled"
|
|
541
|
+
]
|
|
542
|
+
},
|
|
543
|
+
"allowFrom": {
|
|
544
|
+
"anyOf": [
|
|
545
|
+
{
|
|
546
|
+
"type": "string"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"type": "array",
|
|
550
|
+
"items": {
|
|
551
|
+
"type": "string"
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
]
|
|
555
|
+
},
|
|
556
|
+
"groupPolicy": {
|
|
557
|
+
"type": "string",
|
|
558
|
+
"enum": [
|
|
559
|
+
"open",
|
|
560
|
+
"allowlist",
|
|
561
|
+
"disabled"
|
|
562
|
+
]
|
|
563
|
+
},
|
|
564
|
+
"groupAllowFrom": {
|
|
565
|
+
"anyOf": [
|
|
566
|
+
{
|
|
567
|
+
"type": "string"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"type": "array",
|
|
571
|
+
"items": {
|
|
572
|
+
"type": "string"
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
]
|
|
576
|
+
},
|
|
577
|
+
"requireMention": {
|
|
578
|
+
"type": "boolean"
|
|
579
|
+
},
|
|
580
|
+
"respondToMentionAll": {
|
|
581
|
+
"type": "boolean"
|
|
582
|
+
},
|
|
583
|
+
"groups": {
|
|
584
|
+
"type": "object",
|
|
585
|
+
"propertyNames": {
|
|
586
|
+
"type": "string"
|
|
587
|
+
},
|
|
588
|
+
"additionalProperties": {
|
|
589
|
+
"type": "object",
|
|
590
|
+
"properties": {
|
|
591
|
+
"groupPolicy": {
|
|
592
|
+
"type": "string",
|
|
593
|
+
"enum": [
|
|
594
|
+
"open",
|
|
595
|
+
"allowlist",
|
|
596
|
+
"disabled"
|
|
597
|
+
]
|
|
598
|
+
},
|
|
599
|
+
"requireMention": {
|
|
600
|
+
"type": "boolean"
|
|
601
|
+
},
|
|
602
|
+
"respondToMentionAll": {
|
|
603
|
+
"type": "boolean"
|
|
604
|
+
},
|
|
605
|
+
"tools": {
|
|
606
|
+
"type": "object",
|
|
607
|
+
"properties": {
|
|
608
|
+
"allow": {
|
|
609
|
+
"type": "array",
|
|
610
|
+
"items": {
|
|
611
|
+
"type": "string"
|
|
612
|
+
}
|
|
613
|
+
},
|
|
614
|
+
"deny": {
|
|
615
|
+
"type": "array",
|
|
616
|
+
"items": {
|
|
617
|
+
"type": "string"
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
"skills": {
|
|
623
|
+
"type": "array",
|
|
624
|
+
"items": {
|
|
625
|
+
"type": "string"
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
"enabled": {
|
|
629
|
+
"type": "boolean"
|
|
630
|
+
},
|
|
631
|
+
"allowFrom": {
|
|
632
|
+
"anyOf": [
|
|
633
|
+
{
|
|
634
|
+
"type": "string"
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
"type": "array",
|
|
638
|
+
"items": {
|
|
639
|
+
"type": "string"
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
]
|
|
643
|
+
},
|
|
644
|
+
"systemPrompt": {
|
|
645
|
+
"type": "string"
|
|
646
|
+
},
|
|
647
|
+
"allowBots": {
|
|
648
|
+
"anyOf": [
|
|
649
|
+
{
|
|
650
|
+
"type": "boolean"
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"type": "string",
|
|
654
|
+
"const": "mentions"
|
|
655
|
+
}
|
|
656
|
+
]
|
|
657
|
+
},
|
|
658
|
+
"replyInThread": {
|
|
659
|
+
"type": "boolean"
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
},
|
|
664
|
+
"historyLimit": {
|
|
665
|
+
"type": "number"
|
|
666
|
+
},
|
|
667
|
+
"dmHistoryLimit": {
|
|
668
|
+
"type": "number"
|
|
669
|
+
},
|
|
670
|
+
"dms": {
|
|
671
|
+
"type": "object",
|
|
672
|
+
"properties": {
|
|
673
|
+
"historyLimit": {
|
|
674
|
+
"type": "number"
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
"textChunkLimit": {
|
|
679
|
+
"type": "number"
|
|
680
|
+
},
|
|
681
|
+
"chunkMode": {
|
|
682
|
+
"type": "string",
|
|
683
|
+
"enum": [
|
|
684
|
+
"newline",
|
|
685
|
+
"paragraph",
|
|
686
|
+
"none"
|
|
687
|
+
]
|
|
688
|
+
},
|
|
689
|
+
"blockStreamingCoalesce": {
|
|
690
|
+
"type": "object",
|
|
691
|
+
"properties": {
|
|
692
|
+
"minChars": {
|
|
693
|
+
"type": "number"
|
|
694
|
+
},
|
|
695
|
+
"maxChars": {
|
|
696
|
+
"type": "number"
|
|
697
|
+
},
|
|
698
|
+
"idleMs": {
|
|
699
|
+
"type": "number"
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
"mediaMaxMb": {
|
|
704
|
+
"type": "number"
|
|
705
|
+
},
|
|
706
|
+
"heartbeat": {
|
|
707
|
+
"type": "object",
|
|
708
|
+
"properties": {
|
|
709
|
+
"every": {
|
|
710
|
+
"type": "string"
|
|
711
|
+
},
|
|
712
|
+
"activeHours": {
|
|
713
|
+
"type": "object",
|
|
714
|
+
"properties": {
|
|
715
|
+
"start": {
|
|
716
|
+
"type": "string"
|
|
717
|
+
},
|
|
718
|
+
"end": {
|
|
719
|
+
"type": "string"
|
|
720
|
+
},
|
|
721
|
+
"timezone": {
|
|
722
|
+
"type": "string"
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
"target": {
|
|
727
|
+
"type": "string"
|
|
728
|
+
},
|
|
729
|
+
"to": {
|
|
730
|
+
"type": "string"
|
|
731
|
+
},
|
|
732
|
+
"prompt": {
|
|
733
|
+
"type": "string"
|
|
734
|
+
},
|
|
735
|
+
"accountId": {
|
|
736
|
+
"type": "string"
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
"replyMode": {
|
|
741
|
+
"anyOf": [
|
|
742
|
+
{
|
|
743
|
+
"type": "string",
|
|
744
|
+
"enum": [
|
|
745
|
+
"auto",
|
|
746
|
+
"static",
|
|
747
|
+
"streaming"
|
|
748
|
+
]
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"type": "object",
|
|
752
|
+
"properties": {
|
|
753
|
+
"default": {
|
|
754
|
+
"type": "string",
|
|
755
|
+
"enum": [
|
|
756
|
+
"auto",
|
|
757
|
+
"static",
|
|
758
|
+
"streaming"
|
|
759
|
+
]
|
|
760
|
+
},
|
|
761
|
+
"group": {
|
|
762
|
+
"type": "string",
|
|
763
|
+
"enum": [
|
|
764
|
+
"auto",
|
|
765
|
+
"static",
|
|
766
|
+
"streaming"
|
|
767
|
+
]
|
|
768
|
+
},
|
|
769
|
+
"direct": {
|
|
770
|
+
"type": "string",
|
|
771
|
+
"enum": [
|
|
772
|
+
"auto",
|
|
773
|
+
"static",
|
|
774
|
+
"streaming"
|
|
775
|
+
]
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
]
|
|
780
|
+
},
|
|
781
|
+
"streaming": {
|
|
782
|
+
"anyOf": [
|
|
783
|
+
{
|
|
784
|
+
"type": "boolean"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"type": "object",
|
|
788
|
+
"properties": {
|
|
789
|
+
"mode": {
|
|
790
|
+
"type": "string",
|
|
791
|
+
"enum": [
|
|
792
|
+
"off",
|
|
793
|
+
"partial",
|
|
794
|
+
"block",
|
|
795
|
+
"progress"
|
|
796
|
+
]
|
|
797
|
+
},
|
|
798
|
+
"block": {
|
|
799
|
+
"type": "object",
|
|
800
|
+
"properties": {
|
|
801
|
+
"enabled": {
|
|
802
|
+
"type": "boolean"
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
"additionalProperties": {}
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
"additionalProperties": {}
|
|
809
|
+
}
|
|
810
|
+
]
|
|
811
|
+
},
|
|
812
|
+
"blockStreaming": {
|
|
813
|
+
"type": "boolean"
|
|
814
|
+
},
|
|
815
|
+
"toolUseDisplay": {
|
|
816
|
+
"type": "object",
|
|
817
|
+
"properties": {
|
|
818
|
+
"showFullPaths": {
|
|
819
|
+
"type": "boolean"
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
"tools": {
|
|
824
|
+
"type": "object",
|
|
825
|
+
"properties": {
|
|
826
|
+
"doc": {
|
|
827
|
+
"type": "boolean"
|
|
828
|
+
},
|
|
829
|
+
"wiki": {
|
|
830
|
+
"type": "boolean"
|
|
831
|
+
},
|
|
832
|
+
"drive": {
|
|
833
|
+
"type": "boolean"
|
|
834
|
+
},
|
|
835
|
+
"perm": {
|
|
836
|
+
"type": "boolean"
|
|
837
|
+
},
|
|
838
|
+
"scopes": {
|
|
839
|
+
"type": "boolean"
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
"footer": {
|
|
844
|
+
"type": "object",
|
|
845
|
+
"properties": {
|
|
846
|
+
"status": {
|
|
847
|
+
"type": "boolean"
|
|
848
|
+
},
|
|
849
|
+
"elapsed": {
|
|
850
|
+
"type": "boolean"
|
|
851
|
+
},
|
|
852
|
+
"tokens": {
|
|
853
|
+
"type": "boolean"
|
|
854
|
+
},
|
|
855
|
+
"cache": {
|
|
856
|
+
"type": "boolean"
|
|
857
|
+
},
|
|
858
|
+
"context": {
|
|
859
|
+
"type": "boolean"
|
|
860
|
+
},
|
|
861
|
+
"model": {
|
|
862
|
+
"type": "boolean"
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
"markdown": {
|
|
867
|
+
"type": "object",
|
|
868
|
+
"properties": {
|
|
869
|
+
"tables": {
|
|
870
|
+
"type": "string",
|
|
871
|
+
"enum": [
|
|
872
|
+
"off",
|
|
873
|
+
"bullets",
|
|
874
|
+
"code"
|
|
875
|
+
]
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
"configWrites": {
|
|
880
|
+
"type": "boolean"
|
|
881
|
+
},
|
|
882
|
+
"capabilities": {
|
|
883
|
+
"type": "object",
|
|
884
|
+
"properties": {
|
|
885
|
+
"image": {
|
|
886
|
+
"type": "boolean"
|
|
887
|
+
},
|
|
888
|
+
"audio": {
|
|
889
|
+
"type": "boolean"
|
|
890
|
+
},
|
|
891
|
+
"video": {
|
|
892
|
+
"type": "boolean"
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
"dedup": {
|
|
897
|
+
"type": "object",
|
|
898
|
+
"properties": {
|
|
899
|
+
"ttlMs": {
|
|
900
|
+
"type": "number"
|
|
901
|
+
},
|
|
902
|
+
"maxEntries": {
|
|
903
|
+
"type": "number"
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
"reactionNotifications": {
|
|
908
|
+
"type": "string",
|
|
909
|
+
"enum": [
|
|
910
|
+
"off",
|
|
911
|
+
"own",
|
|
912
|
+
"all"
|
|
913
|
+
]
|
|
914
|
+
},
|
|
915
|
+
"threadSession": {
|
|
916
|
+
"type": "boolean"
|
|
917
|
+
},
|
|
918
|
+
"allowBots": {
|
|
919
|
+
"anyOf": [
|
|
920
|
+
{
|
|
921
|
+
"type": "boolean"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"type": "string",
|
|
925
|
+
"const": "mentions"
|
|
926
|
+
}
|
|
927
|
+
]
|
|
928
|
+
},
|
|
929
|
+
"replyInThread": {
|
|
930
|
+
"type": "boolean"
|
|
931
|
+
},
|
|
932
|
+
"uat": {
|
|
933
|
+
"type": "object",
|
|
934
|
+
"properties": {
|
|
935
|
+
"enabled": {
|
|
936
|
+
"type": "boolean"
|
|
937
|
+
},
|
|
938
|
+
"allowedScopes": {
|
|
939
|
+
"type": "array",
|
|
940
|
+
"items": {
|
|
941
|
+
"type": "string"
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
"blockedScopes": {
|
|
945
|
+
"type": "array",
|
|
946
|
+
"items": {
|
|
947
|
+
"type": "string"
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
13
956
|
},
|
|
14
957
|
"contracts": {
|
|
15
958
|
"tools": [
|
|
@@ -61,4 +1004,4 @@
|
|
|
61
1004
|
}
|
|
62
1005
|
}
|
|
63
1006
|
}
|
|
64
|
-
}
|
|
1007
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotwvpyym/openclaw-lark",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.10.3",
|
|
4
4
|
"description": "OpenClaw Lark/Feishu channel plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -23,11 +23,23 @@
|
|
|
23
23
|
"secret-contract-api.js",
|
|
24
24
|
"openclaw.plugin.json",
|
|
25
25
|
"README.md",
|
|
26
|
-
"LICENSE"
|
|
26
|
+
"LICENSE",
|
|
27
|
+
"README.zh.md"
|
|
27
28
|
],
|
|
29
|
+
"packageManager": "pnpm@10.32.1",
|
|
28
30
|
"engines": {
|
|
29
31
|
"node": ">=22"
|
|
30
32
|
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsdown",
|
|
35
|
+
"test": "vitest run",
|
|
36
|
+
"test:watch": "vitest",
|
|
37
|
+
"lint": "eslint src/ index.ts secret-contract-api.ts",
|
|
38
|
+
"lint:fix": "eslint src/ index.ts secret-contract-api.ts --fix",
|
|
39
|
+
"typecheck": "tsc --noEmit",
|
|
40
|
+
"format": "prettier --write src/**/*.ts",
|
|
41
|
+
"format:check": "prettier --check src/**/*.ts"
|
|
42
|
+
},
|
|
31
43
|
"dependencies": {
|
|
32
44
|
"@larksuiteoapi/node-sdk": "^1.64.0",
|
|
33
45
|
"@sinclair/typebox": "0.34.49",
|
|
@@ -54,7 +66,7 @@
|
|
|
54
66
|
"fs-extra": "^11.3.2",
|
|
55
67
|
"globals": "^16.2.0",
|
|
56
68
|
"minimist": "^1.2.8",
|
|
57
|
-
"openclaw": "2026.
|
|
69
|
+
"openclaw": "2026.10.3",
|
|
58
70
|
"prettier": "^3.8.1",
|
|
59
71
|
"tsdown": "^0.21.4",
|
|
60
72
|
"typescript": "^5.9.3",
|
|
@@ -88,19 +100,8 @@
|
|
|
88
100
|
"pluginApi": ">=2026.8.1"
|
|
89
101
|
},
|
|
90
102
|
"build": {
|
|
91
|
-
"openclawVersion": "2026.
|
|
103
|
+
"openclawVersion": "2026.10.3"
|
|
92
104
|
}
|
|
93
105
|
},
|
|
94
|
-
"license": "MIT"
|
|
95
|
-
|
|
96
|
-
"build": "tsdown",
|
|
97
|
-
"release": "node scripts/release.mjs",
|
|
98
|
-
"test": "vitest run",
|
|
99
|
-
"test:watch": "vitest",
|
|
100
|
-
"lint": "eslint src/ index.ts secret-contract-api.ts",
|
|
101
|
-
"lint:fix": "eslint src/ index.ts secret-contract-api.ts --fix",
|
|
102
|
-
"typecheck": "tsc --noEmit",
|
|
103
|
-
"format": "prettier --write src/**/*.ts",
|
|
104
|
-
"format:check": "prettier --check src/**/*.ts"
|
|
105
|
-
}
|
|
106
|
-
}
|
|
106
|
+
"license": "MIT"
|
|
107
|
+
}
|