@openclaw/feishu 2026.9.8 → 2026.10.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/dist/.setup/{channel-DV4hM2Uf.mjs → channel-CX62T71S.mjs} +146 -245
  2. package/dist/.setup/{channel.runtime-CXQcH5zZ.mjs → channel.runtime-COiaq-Rv.mjs} +6 -12
  3. package/dist/.setup/{chat-D8MlFAZi.mjs → chat-BdyvImsY.mjs} +6 -9
  4. package/dist/.setup/{client-BYG-_IZl.mjs → client-BsBVWJzN.mjs} +1 -1
  5. package/dist/.setup/{doctor-contract-3XC0vbIw.mjs → doctor-contract-B1B9ogdd.mjs} +212 -27
  6. package/dist/.setup/{monitor-D_rsHBZ6.mjs → monitor-7DvwUs4Y.mjs} +5 -6
  7. package/dist/.setup/{monitor.account-DvvY7i6k.mjs → monitor.account-7xVu7XWY.mjs} +190 -393
  8. package/dist/.setup/{probe-_ViqSi0j.mjs → probe-B9o7iey6.mjs} +13 -39
  9. package/dist/.setup/{reply-delivery-result-COAjaukc.mjs → reply-delivery-result-Bt-BWBEA.mjs} +151 -297
  10. package/dist/.setup/{setup-api-C4S5I3ac.mjs → setup-api-DmzX9S01.mjs} +1 -1
  11. package/dist/.setup/{subagent-hooks-BaFoMu8W.mjs → subagent-hooks-CUXg0pC-.mjs} +5 -11
  12. package/dist/.setup/{thread-bindings-EdLXPXzw.mjs → thread-bindings-jW2x5VuN.mjs} +23 -41
  13. package/dist/api.js +234 -297
  14. package/dist/channel-plugin-api.js +1 -1
  15. package/dist/doctor-contract-api.js +2 -2
  16. package/dist/session-binding-contract-api.js +1 -1
  17. package/dist/setup-api.js +1 -1
  18. package/dist/setup-entry.js +1 -1
  19. package/dist/subagent-hooks-api.js +1 -1
  20. package/node_modules/@openclaw/fs-safe/CHANGELOG.md +95 -0
  21. package/node_modules/@openclaw/fs-safe/README.md +70 -379
  22. package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +35 -51
  23. package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +2 -0
  24. package/node_modules/@openclaw/fs-safe/dist/advanced.js +1 -0
  25. package/node_modules/@openclaw/fs-safe/dist/archive-input.js +2 -0
  26. package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
  27. package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -1
  28. package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +9 -10
  29. package/node_modules/@openclaw/fs-safe/dist/archive.js +2 -5
  30. package/node_modules/@openclaw/fs-safe/dist/atomic-io.d.ts +51 -0
  31. package/node_modules/@openclaw/fs-safe/dist/atomic-io.js +242 -0
  32. package/node_modules/@openclaw/fs-safe/dist/config.d.ts +1 -1
  33. package/node_modules/@openclaw/fs-safe/dist/config.js +1 -1
  34. package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +1 -1
  35. package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +2 -2
  36. package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +2 -0
  37. package/node_modules/@openclaw/fs-safe/dist/create.js +12 -5
  38. package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +11 -0
  39. package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +4 -7
  40. package/node_modules/@openclaw/fs-safe/dist/entry-publication-types.d.ts +55 -0
  41. package/node_modules/@openclaw/fs-safe/dist/entry-publication-types.js +1 -0
  42. package/node_modules/@openclaw/fs-safe/dist/entry-publication.d.ts +8 -0
  43. package/node_modules/@openclaw/fs-safe/dist/entry-publication.js +262 -0
  44. package/node_modules/@openclaw/fs-safe/dist/exclusive-create.d.ts +3 -0
  45. package/node_modules/@openclaw/fs-safe/dist/exclusive-create.js +22 -0
  46. package/node_modules/@openclaw/fs-safe/dist/file-cleanup.d.ts +1 -6
  47. package/node_modules/@openclaw/fs-safe/dist/file-cleanup.js +3 -6
  48. package/node_modules/@openclaw/fs-safe/dist/file-identity.js +3 -6
  49. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.js +2 -2
  50. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.js +9 -0
  51. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.js +4 -6
  52. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +1 -1
  53. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +8 -0
  54. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +2 -0
  55. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +20 -18
  56. package/node_modules/@openclaw/fs-safe/dist/file-store.js +4 -10
  57. package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +2 -10
  58. package/node_modules/@openclaw/fs-safe/dist/fs.js +2 -10
  59. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +3 -4
  60. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +6 -18
  61. package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +1 -1
  62. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +0 -2
  63. package/node_modules/@openclaw/fs-safe/dist/guest.js +3 -9
  64. package/node_modules/@openclaw/fs-safe/dist/index.d.ts +1 -1
  65. package/node_modules/@openclaw/fs-safe/dist/index.js +1 -1
  66. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +1 -5
  67. package/node_modules/@openclaw/fs-safe/dist/json.js +19 -37
  68. package/node_modules/@openclaw/fs-safe/dist/move-path.js +2 -0
  69. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +1 -0
  70. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +9 -1
  71. package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +47 -2
  72. package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +1 -9
  73. package/node_modules/@openclaw/fs-safe/dist/native-config.js +6 -40
  74. package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +2 -0
  75. package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +5 -2
  76. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +11 -316
  77. package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.d.ts +7 -7
  78. package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.js +28 -175
  79. package/node_modules/@openclaw/fs-safe/dist/native-policy-parent.d.ts +15 -0
  80. package/node_modules/@openclaw/fs-safe/dist/native-policy-parent.js +418 -0
  81. package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.js +9 -4
  82. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +17 -13
  83. package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.js +6 -24
  84. package/node_modules/@openclaw/fs-safe/dist/native.js +5 -1
  85. package/node_modules/@openclaw/fs-safe/dist/path-case.js +10 -9
  86. package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.js +4 -1
  87. package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +1 -0
  88. package/node_modules/@openclaw/fs-safe/dist/path-segment-route.js +3 -0
  89. package/node_modules/@openclaw/fs-safe/dist/path.js +4 -1
  90. package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +0 -1
  91. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +1 -3
  92. package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +2 -0
  93. package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +9 -10
  94. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +3 -6
  95. package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +2 -2
  96. package/node_modules/@openclaw/fs-safe/dist/publish-file.js +4 -3
  97. package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.d.ts +3 -4
  98. package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.js +18 -32
  99. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +5 -17
  100. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +92 -230
  101. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +4 -15
  102. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +22 -63
  103. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +9 -34
  104. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +78 -83
  105. package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.d.ts +18 -20
  106. package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.js +64 -98
  107. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +16 -33
  108. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +61 -200
  109. package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +1 -6
  110. package/node_modules/@openclaw/fs-safe/dist/replace-file.js +76 -216
  111. package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +14 -24
  112. package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +1 -4
  113. package/node_modules/@openclaw/fs-safe/dist/root-context.js +4 -19
  114. package/node_modules/@openclaw/fs-safe/dist/root-create-native.d.ts +52 -0
  115. package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +350 -0
  116. package/node_modules/@openclaw/fs-safe/dist/root-directory-list-types.d.ts +35 -0
  117. package/node_modules/@openclaw/fs-safe/dist/root-directory-list-types.js +1 -0
  118. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +2 -27
  119. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +31 -28
  120. package/node_modules/@openclaw/fs-safe/dist/root-directory.js +1 -4
  121. package/node_modules/@openclaw/fs-safe/dist/root-errors.js +34 -0
  122. package/node_modules/@openclaw/fs-safe/dist/root-file.js +9 -21
  123. package/node_modules/@openclaw/fs-safe/dist/root-impl.js +105 -37
  124. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +7 -2
  125. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +67 -38
  126. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +1 -1
  127. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +0 -2
  128. package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +2 -3
  129. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +3 -1
  130. package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +68 -85
  131. package/node_modules/@openclaw/fs-safe/dist/root-path.js +6 -1
  132. package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +4 -0
  133. package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.js +1 -1
  134. package/node_modules/@openclaw/fs-safe/dist/root-paths.js +4 -9
  135. package/node_modules/@openclaw/fs-safe/dist/root-remove-native.d.ts +4 -0
  136. package/node_modules/@openclaw/fs-safe/dist/root-remove-native.js +311 -0
  137. package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +11 -0
  138. package/node_modules/@openclaw/fs-safe/dist/root-remove.js +3 -1
  139. package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +2 -2
  140. package/node_modules/@openclaw/fs-safe/dist/root-walk.js +1 -3
  141. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +3 -3
  142. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +8 -10
  143. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +0 -1
  144. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +0 -4
  145. package/node_modules/@openclaw/fs-safe/dist/secret-file.js +12 -9
  146. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +0 -2
  147. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +2 -0
  148. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +7 -4
  149. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +13 -6
  150. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +0 -3
  151. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +5 -23
  152. package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.d.ts +2 -1
  153. package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.js +11 -6
  154. package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.js +1 -8
  155. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +1 -1
  156. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +2 -9
  157. package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +1 -6
  158. package/node_modules/@openclaw/fs-safe/dist/trash.js +6 -2
  159. package/node_modules/@openclaw/fs-safe/dist/walk.js +100 -46
  160. package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +7 -0
  161. package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +235 -19
  162. package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +21 -2
  163. package/node_modules/@openclaw/fs-safe/dist/watch-native.js +21 -3
  164. package/node_modules/@openclaw/fs-safe/dist/watch-rescan.d.ts +6 -0
  165. package/node_modules/@openclaw/fs-safe/dist/watch-rescan.js +111 -0
  166. package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +13 -0
  167. package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +27 -4
  168. package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +2 -0
  169. package/node_modules/@openclaw/fs-safe/dist/watch.js +131 -40
  170. package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +8 -0
  171. package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +24 -6
  172. package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.d.ts +13 -0
  173. package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.js +51 -0
  174. package/node_modules/@openclaw/fs-safe/docs/advanced.md +4 -0
  175. package/node_modules/@openclaw/fs-safe/docs/atomic.md +4 -1
  176. package/node_modules/@openclaw/fs-safe/docs/config.md +6 -14
  177. package/node_modules/@openclaw/fs-safe/docs/contributing.md +4 -14
  178. package/node_modules/@openclaw/fs-safe/docs/durability.md +6 -29
  179. package/node_modules/@openclaw/fs-safe/docs/entry-publication.md +146 -0
  180. package/node_modules/@openclaw/fs-safe/docs/errors.md +16 -0
  181. package/node_modules/@openclaw/fs-safe/docs/file-store.md +28 -5
  182. package/node_modules/@openclaw/fs-safe/docs/index.md +2 -31
  183. package/node_modules/@openclaw/fs-safe/docs/install.md +10 -31
  184. package/node_modules/@openclaw/fs-safe/docs/json.md +1 -1
  185. package/node_modules/@openclaw/fs-safe/docs/local-roots.md +0 -1
  186. package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +12 -12
  187. package/node_modules/@openclaw/fs-safe/docs/native-helper.md +35 -96
  188. package/node_modules/@openclaw/fs-safe/docs/native.md +22 -20
  189. package/node_modules/@openclaw/fs-safe/docs/path.md +1 -1
  190. package/node_modules/@openclaw/fs-safe/docs/permissions.md +1 -2
  191. package/node_modules/@openclaw/fs-safe/docs/public-api.md +1 -2
  192. package/node_modules/@openclaw/fs-safe/docs/reading.md +1 -2
  193. package/node_modules/@openclaw/fs-safe/docs/root.md +26 -184
  194. package/node_modules/@openclaw/fs-safe/docs/secret-file.md +1 -1
  195. package/node_modules/@openclaw/fs-safe/docs/security-model.md +115 -3
  196. package/node_modules/@openclaw/fs-safe/docs/store.md +2 -2
  197. package/node_modules/@openclaw/fs-safe/docs/temp.md +29 -65
  198. package/node_modules/@openclaw/fs-safe/docs/testing.md +90 -58
  199. package/node_modules/@openclaw/fs-safe/docs/types.md +3 -16
  200. package/node_modules/@openclaw/fs-safe/docs/walk.md +33 -5
  201. package/node_modules/@openclaw/fs-safe/docs/watch.md +96 -14
  202. package/node_modules/@openclaw/fs-safe/docs/writing.md +172 -16
  203. package/node_modules/@openclaw/fs-safe/package.json +10 -10
  204. package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
  205. package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
  206. package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
  207. package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
  208. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
  209. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
  210. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
  211. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
  212. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
  213. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
  214. package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
  215. package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
  216. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
  217. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
  218. package/package.json +5 -5
  219. package/skills/feishu-wiki/SKILL.md +1 -1
  220. package/dist/.setup/accounts-wRqItHug.mjs +0 -206
  221. package/node_modules/@openclaw/fs-safe/dist/watch-alias.d.ts +0 -6
  222. package/node_modules/@openclaw/fs-safe/dist/watch-alias.js +0 -88
  223. package/node_modules/@openclaw/fs-safe/docs/mutation-policy-proof.md +0 -69
  224. package/node_modules/@openclaw/fs-safe/docs/private-file-store.md +0 -68
  225. package/node_modules/@openclaw/fs-safe/docs/test-hooks.md +0 -110
@@ -1,5 +1,5 @@
1
- import { Ct as resolveFeishuChatReadPreliminaryAuthorization, J as feishuExternalToolResult, Nt as resolveFeishuChatType, Q as assertFeishuApiSuccess, St as readFeishuChatInfoWithAuthorization, Z as resolveFeishuToolAccount, _t as authorizeFeishuChatMemberRead, gt as assertFeishuChatReadAllowed, q as registerFeishuTool, rt as formatFeishuApiError } from "./reply-delivery-result-COAjaukc.mjs";
2
- import { r as createFeishuClient } from "./client-BYG-_IZl.mjs";
1
+ import { Ct as readFeishuChatInfoWithAuthorization, J as feishuExternalToolResult, Pt as resolveFeishuChatType, Q as assertFeishuApiSuccess, Z as resolveFeishuToolAccount, _t as assertFeishuChatReadAllowed, q as registerFeishuTool, rt as formatFeishuApiError, vt as authorizeFeishuChatMemberRead, wt as resolveFeishuChatReadPreliminaryAuthorization } from "./reply-delivery-result-Bt-BWBEA.mjs";
2
+ import { r as createFeishuClient } from "./client-BsBVWJzN.mjs";
3
3
  import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
4
4
  import { readPositiveIntegerParam } from "openclaw/plugin-sdk/param-readers";
5
5
  import { Type } from "typebox";
@@ -30,12 +30,6 @@ const FeishuChatSchema = Type.Object({
30
30
  });
31
31
  //#endregion
32
32
  //#region extensions/feishu/src/chat.ts
33
- function readChatPageSize(params) {
34
- return readPositiveIntegerParam(params, "page_size", {
35
- max: 100,
36
- message: "page_size must be a positive integer between 1 and 100"
37
- });
38
- }
39
33
  function buildFeishuDirectChatMembers(authorization) {
40
34
  return {
41
35
  chat_id: authorization.chatId,
@@ -208,7 +202,10 @@ function registerFeishuChatTools(api) {
208
202
  memberId: p.action === "member_info" ? p.member_id : void 0,
209
203
  memberIdType: p.member_id_type
210
204
  });
211
- if (p.action === "members") return feishuExternalToolResult(authorization.kind === "direct" ? buildFeishuDirectChatMembers(authorization) : await getChatMembers(client, p.chat_id, readChatPageSize(p), p.page_token, p.member_id_type));
205
+ if (p.action === "members") return feishuExternalToolResult(authorization.kind === "direct" ? buildFeishuDirectChatMembers(authorization) : await getChatMembers(client, p.chat_id, readPositiveIntegerParam(p, "page_size", {
206
+ max: 100,
207
+ message: "page_size must be a positive integer between 1 and 100"
208
+ }), p.page_token, p.member_id_type));
212
209
  if (authorization.kind === "group") {
213
210
  const memberIdType = p.member_id_type ?? "open_id";
214
211
  await assertFeishuChatMember(client, p.chat_id, p.member_id, memberIdType);
@@ -1,4 +1,4 @@
1
- import { s as __exportAll } from "./doctor-contract-3XC0vbIw.mjs";
1
+ import { g as __exportAll } from "./doctor-contract-B1B9ogdd.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import { PlatformMessageNotDispatchedError } from "openclaw/plugin-sdk/error-runtime";
4
4
  import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
@@ -1,7 +1,10 @@
1
1
  import "node:module";
2
- import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
3
- import { ContextVisibilityModeSchema, DmPolicySchema, GroupPolicySchema, ReplyToModeSchema, buildChannelConfigSchema, buildGroupEntrySchema, buildMultiAccountChannelSchema } from "openclaw/plugin-sdk/channel-config-schema";
4
- import { buildSecretInputSchema, hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
2
+ import { DEFAULT_ACCOUNT_ID, createAccountListHelpers, hasConfiguredAccountValue, normalizeAccountId, normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-resolution";
3
+ import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
+ import { buildSecretInputSchema, coerceSecretRef, hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
5
+ import { canResolveEnvSecretRefInReadOnlyPath } from "openclaw/plugin-sdk/secret-ref-readonly";
6
+ import { normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/account-id";
7
+ import { ChannelDeliveryStreamingConfigSchema, ContextVisibilityModeSchema, DmPolicySchema, GroupPolicySchema, ReplyToModeSchema, buildChannelConfigSchema, buildGroupEntrySchema, buildMultiAccountChannelSchema } from "openclaw/plugin-sdk/channel-config-schema";
5
8
  import { z } from "zod";
6
9
  //#region \0rolldown/runtime.js
7
10
  var __defProp = Object.defineProperty;
@@ -29,6 +32,186 @@ var __copyProps = (to, from, except, desc) => {
29
32
  };
30
33
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
31
34
  //#endregion
35
+ //#region extensions/feishu/src/accounts.ts
36
+ var accounts_exports = /* @__PURE__ */ __exportAll({
37
+ FeishuSecretRefUnavailableError: () => FeishuSecretRefUnavailableError,
38
+ inspectFeishuCredentials: () => inspectFeishuCredentials,
39
+ listEnabledFeishuAccounts: () => listEnabledFeishuAccounts,
40
+ listFeishuAccountIds: () => listFeishuAccountIds,
41
+ mergeFeishuAccountConfig: () => mergeFeishuAccountConfig,
42
+ resolveDefaultFeishuAccountId: () => resolveDefaultFeishuAccountId,
43
+ resolveDefaultFeishuAccountSelection: () => resolveDefaultFeishuAccountSelection,
44
+ resolveFeishuAccount: () => resolveFeishuAccount,
45
+ resolveFeishuCredentials: () => resolveFeishuCredentials,
46
+ resolveFeishuRuntimeAccount: () => resolveFeishuRuntimeAccount
47
+ });
48
+ const { listAccountIds: listFeishuAccountIds, resolveDefaultAccountId: resolveDefaultFeishuAccountId, resolveAccountConfig: resolveMergedFeishuAccountConfig } = createAccountListHelpers("feishu", {
49
+ allowUnlistedDefaultAccount: true,
50
+ omitKeys: ["defaultAccount"],
51
+ nestedObjectKeys: ["tools"],
52
+ hasImplicitDefaultAccount: (cfg) => {
53
+ const feishu = cfg.channels?.feishu;
54
+ return hasConfiguredAccountValue(feishu?.appId) && hasConfiguredAccountValue(feishu?.appSecret);
55
+ }
56
+ });
57
+ var FeishuSecretRefUnavailableError = class extends Error {
58
+ constructor(path, ref) {
59
+ super(`${path}: unresolved SecretRef "${ref.source}:${ref.provider}:${ref.id}". Resolve this command against an active gateway runtime snapshot before reading it.`);
60
+ this.name = "FeishuSecretRefUnavailableError";
61
+ this.path = path;
62
+ }
63
+ };
64
+ function resolveFeishuSecretLike(params) {
65
+ const asString = normalizeOptionalString(params.value);
66
+ if (asString) return asString;
67
+ const ref = coerceSecretRef(params.value, params.cfg?.secrets?.defaults);
68
+ if (!ref) return;
69
+ if (params.mode === "inspect") {
70
+ if (ref.source === "env" && canResolveEnvSecretRefInReadOnlyPath({
71
+ cfg: params.cfg,
72
+ provider: ref.provider,
73
+ id: ref.id
74
+ })) return normalizeOptionalString(process.env[ref.id]);
75
+ return;
76
+ }
77
+ throw new FeishuSecretRefUnavailableError(params.path, ref);
78
+ }
79
+ function resolveFeishuBaseCredentials(cfg, mode, rootConfig) {
80
+ const appId = resolveFeishuSecretLike({
81
+ cfg: rootConfig,
82
+ value: cfg?.appId,
83
+ path: "channels.feishu.appId",
84
+ mode
85
+ });
86
+ const appSecret = resolveFeishuSecretLike({
87
+ cfg: rootConfig,
88
+ value: cfg?.appSecret,
89
+ path: "channels.feishu.appSecret",
90
+ mode
91
+ });
92
+ if (!appId || !appSecret) return null;
93
+ return {
94
+ appId,
95
+ appSecret,
96
+ domain: cfg?.domain?.replace(/^https:/i, "https:") ?? "feishu"
97
+ };
98
+ }
99
+ function resolveFeishuEventSecrets(cfg, mode, rootConfig) {
100
+ return {
101
+ encryptKey: (cfg?.connectionMode ?? "websocket") === "webhook" ? resolveFeishuSecretLike({
102
+ cfg: rootConfig,
103
+ value: cfg?.encryptKey,
104
+ path: "channels.feishu.encryptKey",
105
+ mode
106
+ }) : normalizeOptionalString(cfg?.encryptKey),
107
+ verificationToken: resolveFeishuSecretLike({
108
+ cfg: rootConfig,
109
+ value: cfg?.verificationToken,
110
+ path: "channels.feishu.verificationToken",
111
+ mode
112
+ })
113
+ };
114
+ }
115
+ function resolveDefaultFeishuAccountSelection(cfg) {
116
+ const preferred = normalizeOptionalAccountId((cfg.channels?.feishu)?.defaultAccount);
117
+ if (preferred) return {
118
+ accountId: preferred,
119
+ source: "explicit-default"
120
+ };
121
+ const ids = listFeishuAccountIds(cfg);
122
+ if (ids.includes(DEFAULT_ACCOUNT_ID)) return {
123
+ accountId: DEFAULT_ACCOUNT_ID,
124
+ source: "mapped-default"
125
+ };
126
+ return {
127
+ accountId: ids[0] ?? DEFAULT_ACCOUNT_ID,
128
+ source: "fallback"
129
+ };
130
+ }
131
+ function mergeFeishuAccountConfig(cfg, accountId) {
132
+ const feishuCfg = cfg.channels?.feishu;
133
+ const merged = resolveMergedFeishuAccountConfig(cfg, accountId);
134
+ const topTools = feishuCfg?.tools;
135
+ if (merged.tools === void 0 && topTools !== void 0) return {
136
+ ...merged,
137
+ tools: topTools
138
+ };
139
+ if (topTools?.bitable === false) return {
140
+ ...merged,
141
+ tools: {
142
+ ...merged.tools,
143
+ bitable: false
144
+ }
145
+ };
146
+ return merged;
147
+ }
148
+ function resolveFeishuCredentials(cfg, options) {
149
+ const mode = options?.mode ?? "strict";
150
+ const base = resolveFeishuBaseCredentials(cfg, mode, options?.rootConfig);
151
+ if (!base) return null;
152
+ return {
153
+ ...base,
154
+ ...resolveFeishuEventSecrets(cfg, mode, options?.rootConfig)
155
+ };
156
+ }
157
+ function inspectFeishuCredentials(cfg, rootConfig) {
158
+ return resolveFeishuCredentials(cfg, {
159
+ mode: "inspect",
160
+ rootConfig
161
+ });
162
+ }
163
+ function buildResolvedFeishuAccount(params) {
164
+ const hasExplicitAccountId = typeof params.accountId === "string" && params.accountId.trim() !== "";
165
+ const defaultSelection = hasExplicitAccountId ? null : resolveDefaultFeishuAccountSelection(params.cfg);
166
+ const accountId = hasExplicitAccountId ? normalizeAccountId(params.accountId) : defaultSelection?.accountId ?? DEFAULT_ACCOUNT_ID;
167
+ const selectionSource = hasExplicitAccountId ? "explicit" : defaultSelection?.source ?? "fallback";
168
+ const feishuCfg = params.cfg.channels?.feishu;
169
+ const merged = mergeFeishuAccountConfig(params.cfg, accountId);
170
+ const baseCreds = resolveFeishuBaseCredentials(merged, params.baseMode, params.cfg);
171
+ const eventSecrets = resolveFeishuEventSecrets(merged, params.eventSecretMode, params.cfg);
172
+ return {
173
+ accountId,
174
+ selectionSource,
175
+ enabled: feishuCfg?.enabled !== false && merged.enabled !== false,
176
+ configured: Boolean(baseCreds),
177
+ name: normalizeOptionalString(merged.name),
178
+ appId: baseCreds?.appId,
179
+ appSecret: baseCreds?.appSecret,
180
+ encryptKey: eventSecrets.encryptKey,
181
+ verificationToken: eventSecrets.verificationToken,
182
+ domain: baseCreds?.domain ?? "feishu",
183
+ config: merged
184
+ };
185
+ }
186
+ /**
187
+ * Resolve a read-only Feishu account snapshot for CLI/config surfaces.
188
+ * Unresolved SecretRefs are treated as unavailable instead of throwing.
189
+ */
190
+ function resolveFeishuAccount(params) {
191
+ return buildResolvedFeishuAccount({
192
+ ...params,
193
+ baseMode: "inspect",
194
+ eventSecretMode: "inspect"
195
+ });
196
+ }
197
+ /**
198
+ * Resolve a runtime Feishu account.
199
+ * Required app credentials stay strict; event-only secrets can be required by callers.
200
+ */
201
+ function resolveFeishuRuntimeAccount(params, options) {
202
+ return buildResolvedFeishuAccount({
203
+ ...params,
204
+ baseMode: "strict",
205
+ eventSecretMode: options?.requireEventSecrets ? "strict" : "inspect"
206
+ });
207
+ }
208
+ function listEnabledFeishuAccounts(cfg) {
209
+ return listFeishuAccountIds(cfg).map((accountId) => resolveFeishuAccount({
210
+ cfg,
211
+ accountId
212
+ })).filter((account) => account.enabled && account.configured);
213
+ }
214
+ //#endregion
32
215
  //#region extensions/feishu/src/external-keys.ts
33
216
  const FEISHU_EXTERNAL_KEY_PATTERN = /^(?!\s)(?![\s\S]*\s$)(?![\s\S]*\.\.)[^\p{Cc}\p{Cs}/\\]{1,512}$/u;
34
217
  function normalizeFeishuExternalKey(value) {
@@ -113,18 +296,9 @@ const RenderModeSchema = z.enum([
113
296
  "raw",
114
297
  "card"
115
298
  ]).optional();
116
- const BlockStreamingCoalesceSchema = z.object({
117
- minChars: z.number().int().positive().optional(),
118
- maxChars: z.number().int().positive().optional(),
119
- idleMs: z.number().int().nonnegative().optional()
120
- }).strict().optional();
121
299
  const FeishuStreamingSchema = z.object({
122
300
  mode: z.enum(["off", "partial"]).optional(),
123
- chunkMode: z.enum(["length", "newline"]).optional(),
124
- block: z.object({
125
- enabled: z.boolean().optional(),
126
- coalesce: BlockStreamingCoalesceSchema
127
- }).strict().optional()
301
+ ...ChannelDeliveryStreamingConfigSchema.shape
128
302
  }).strict().optional();
129
303
  const ChannelHeartbeatVisibilitySchema = z.object({
130
304
  visibility: z.enum(["visible", "hidden"]).optional(),
@@ -289,7 +463,7 @@ const FeishuConfigSchema = buildMultiAccountChannelSchema(FeishuConfigSchemaBase
289
463
  }).superRefine((value, ctx) => {
290
464
  const defaultAccount = value.defaultAccount?.trim();
291
465
  if (defaultAccount && value.accounts && Object.keys(value.accounts).length > 0) {
292
- const normalizedDefaultAccount = normalizeAccountId(defaultAccount);
466
+ const normalizedDefaultAccount = normalizeAccountId$1(defaultAccount);
293
467
  if (!Object.hasOwn(value.accounts, normalizedDefaultAccount)) ctx.addIssue({
294
468
  code: z.ZodIssueCode.custom,
295
469
  path: ["defaultAccount"],
@@ -347,18 +521,18 @@ const FeishuChannelConfigSchema = buildChannelConfigSchema(FeishuConfigSchema, {
347
521
  //#endregion
348
522
  //#region packages/normalization-core/src/record-coerce.ts
349
523
  /** Type guard for non-array object records at browser-safe boundaries. */
350
- function isRecord(value) {
524
+ function isRecord$1(value) {
351
525
  return value !== null && typeof value === "object" && !Array.isArray(value);
352
526
  }
353
527
  /** Returns a non-array record or null. */
354
- function asNullableRecord(value) {
355
- return isRecord(value) ? value : null;
528
+ function asNullableRecord$1(value) {
529
+ return isRecord$1(value) ? value : null;
356
530
  }
357
531
  //#endregion
358
532
  //#region src/config/channel-config-normalization.ts
359
533
  /** Applies one channel-specific doctor migration to every object-shaped account. */
360
534
  function normalizeChannelAccounts(params) {
361
- const rawAccounts = asNullableRecord(params.entry.accounts);
535
+ const rawAccounts = asNullableRecord$1(params.entry.accounts);
362
536
  if (!rawAccounts) return {
363
537
  entry: params.entry,
364
538
  changed: false
@@ -366,7 +540,7 @@ function normalizeChannelAccounts(params) {
366
540
  let changed = false;
367
541
  const accounts = { ...rawAccounts };
368
542
  for (const [accountId, value] of Object.entries(rawAccounts)) {
369
- const account = asNullableRecord(value);
543
+ const account = asNullableRecord$1(value);
370
544
  if (!account) continue;
371
545
  const normalized = params.normalizeAccount({
372
546
  account,
@@ -394,7 +568,7 @@ function normalizeChannelAccounts(params) {
394
568
  function normalizeChannelConfigEntries$1(params) {
395
569
  const changes = params.changes ?? [];
396
570
  const channels = params.cfg.channels;
397
- const entry = asNullableRecord(channels?.[params.channelId]);
571
+ const entry = asNullableRecord$1(channels?.[params.channelId]);
398
572
  if (!entry) return {
399
573
  config: params.cfg,
400
574
  changes
@@ -437,26 +611,32 @@ function normalizeChannelConfigEntries$1(params) {
437
611
  function createLegacyWebhookListenerDoctorContract(params) {
438
612
  const portKey = params.portKey ?? "webhookPort";
439
613
  const hostKey = params.hostKey === void 0 ? "webhookHost" : params.hostKey;
440
- const source = (entry) => params.webhookKey ? asNullableRecord(entry[params.webhookKey]) : entry;
614
+ const source = (entry) => params.webhookKey ? asNullableRecord$1(entry[params.webhookKey]) : entry;
441
615
  const hasLegacy = (value) => {
442
- const entry = asNullableRecord(value);
616
+ const entry = asNullableRecord$1(value);
443
617
  const listener = entry && source(entry);
444
618
  return Boolean(listener && (Object.hasOwn(listener, portKey) || hostKey && Object.hasOwn(listener, hostKey)));
445
619
  };
446
620
  const prefix = `channels.${params.channelKey}`;
447
621
  return {
622
+ historicalWebhookListener: {
623
+ channelId: params.channelKey,
624
+ port: params.defaultPort,
625
+ preserveAuthoredActivation: params.preserveAuthoredActivation,
626
+ ...params.defaultHost === void 0 ? {} : { host: params.defaultHost }
627
+ },
448
628
  legacyConfigRules: [{
449
629
  path: ["channels", params.channelKey],
450
630
  message: `${prefix} webhook listeners moved to Gateway routes. Run "openclaw doctor --fix" to preserve explicitly configured listener settings as legacyWebhook.`,
451
631
  match: (value) => {
452
- const accounts = asNullableRecord(asNullableRecord(value)?.accounts);
632
+ const accounts = asNullableRecord$1(asNullableRecord$1(value)?.accounts);
453
633
  return hasLegacy(value) || Object.values(accounts ?? {}).some(hasLegacy);
454
634
  }
455
635
  }],
456
636
  normalizeCompatibilityConfig: ({ cfg }) => {
457
- const root = asNullableRecord(asNullableRecord(cfg.channels)?.[params.channelKey]);
637
+ const root = asNullableRecord$1(asNullableRecord$1(cfg.channels)?.[params.channelKey]);
458
638
  const inherited = root && source(root);
459
- const canonicalRoot = asNullableRecord(root?.legacyWebhook);
639
+ const canonicalRoot = asNullableRecord$1(root?.legacyWebhook);
460
640
  return normalizeChannelConfigEntries$1({
461
641
  cfg,
462
642
  channelId: params.channelKey,
@@ -508,6 +688,7 @@ const webhookListenerMigration = createLegacyWebhookListenerDoctorContract({
508
688
  defaultPort: 3e3,
509
689
  defaultHost: "127.0.0.1"
510
690
  });
691
+ const { historicalWebhookListener } = webhookListenerMigration;
511
692
  const streamingAliasMigration = (0, runtime_doctor_migrations_exports.defineChannelAliasMigration)({
512
693
  channelId: "feishu",
513
694
  streaming: { defaultMode: "partial" },
@@ -654,8 +835,12 @@ function normalizeCompatibilityConfig({ cfg }) {
654
835
  const stray = feishuStrayEntryConfigMigration.normalizeConfig({ cfg: entries });
655
836
  return {
656
837
  config: stray.config,
657
- changes: [...changes, ...stray.changes]
838
+ changes: [...changes, ...stray.changes],
839
+ historicalWebhookAccountIds: stray.config.channels?.feishu?.enabled === false ? [] : listFeishuAccountIds(stray.config).filter((accountId) => {
840
+ const account = mergeFeishuAccountConfig(stray.config, accountId);
841
+ return account.enabled !== false && account.connectionMode === "webhook";
842
+ })
658
843
  };
659
844
  }
660
845
  //#endregion
661
- export { normalizeFeishuWebhookPath as a, __reExport as c, DEFAULT_FEISHU_WEBHOOK_PATH as i, normalizeCompatibilityConfig as n, normalizeFeishuExternalKey as o, FeishuChannelConfigSchema as r, __exportAll as s, legacyConfigRules as t };
846
+ export { __reExport as _, DEFAULT_FEISHU_WEBHOOK_PATH as a, accounts_exports as c, listFeishuAccountIds as d, mergeFeishuAccountConfig as f, __exportAll as g, resolveFeishuRuntimeAccount as h, FeishuChannelConfigSchema as i, inspectFeishuCredentials as l, resolveFeishuAccount as m, legacyConfigRules as n, normalizeFeishuWebhookPath as o, resolveDefaultFeishuAccountId as p, normalizeCompatibilityConfig as r, normalizeFeishuExternalKey as s, historicalWebhookListener as t, listEnabledFeishuAccounts as u };
@@ -1,6 +1,6 @@
1
- import { c as resolveFeishuRuntimeAccount, r as listEnabledFeishuAccounts } from "./accounts-wRqItHug.mjs";
1
+ import { h as resolveFeishuRuntimeAccount, u as listEnabledFeishuAccounts } from "./doctor-contract-B1B9ogdd.mjs";
2
2
  import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.mjs";
3
- import { r as registerFeishuAiAgent, t as probeFeishu } from "./probe-_ViqSi0j.mjs";
3
+ import { r as registerFeishuAiAgent, t as probeFeishu } from "./probe-B9o7iey6.mjs";
4
4
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
5
5
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
6
6
  import { clampTimerTimeoutMs, parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
@@ -108,7 +108,7 @@ async function readProviderBotIdentityCache(params) {
108
108
  }
109
109
  async function fetchBotIdentityForMonitor(account, options = {}) {
110
110
  if (options.abortSignal?.aborted) return {};
111
- const timeoutMs = options.timeoutMs ?? FEISHU_STARTUP_BOT_INFO_TIMEOUT_MS;
111
+ const timeoutMs = FEISHU_STARTUP_BOT_INFO_TIMEOUT_MS;
112
112
  const result = await probeFeishu(account, {
113
113
  timeoutMs,
114
114
  abortSignal: options.abortSignal
@@ -144,7 +144,7 @@ async function fetchBotIdentityForMonitor(account, options = {}) {
144
144
  }
145
145
  //#endregion
146
146
  //#region extensions/feishu/src/monitor.ts
147
- const loadMonitorAccountRuntime = createLazyRuntimeModule(() => import("./monitor.account-DvvY7i6k.mjs"));
147
+ const loadMonitorAccountRuntime = createLazyRuntimeModule(() => import("./monitor.account-7xVu7XWY.mjs"));
148
148
  async function monitorFeishuProvider(opts = {}) {
149
149
  const cfg = opts.config;
150
150
  if (!cfg) throw new Error("Config is required for Feishu monitor");
@@ -175,7 +175,7 @@ async function monitorFeishuProvider(opts = {}) {
175
175
  log("feishu: abort signal received during startup preflight; stopping startup");
176
176
  break;
177
177
  }
178
- const { botOpenId, botName, source } = await fetchBotIdentityForMonitor(account, {
178
+ const { botOpenId, source } = await fetchBotIdentityForMonitor(account, {
179
179
  runtime: opts.runtime,
180
180
  abortSignal: opts.abortSignal
181
181
  });
@@ -192,7 +192,6 @@ async function monitorFeishuProvider(opts = {}) {
192
192
  botOpenIdSource: {
193
193
  kind: "prefetched",
194
194
  botOpenId,
195
- botName,
196
195
  source
197
196
  },
198
197
  ...opts.statusSink ? { statusSink: opts.statusSink } : {}