@openclaw/feishu 2026.7.1-beta.2 → 2026.7.1-beta.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.
Files changed (461) hide show
  1. package/dist/{accounts-Cfzht2Hc.js → accounts-Bs5uJ4h0.js} +4 -3
  2. package/dist/api.js +56 -65
  3. package/dist/{app-registration-DuEyfVY1.js → app-registration-BwQ-aGTe.js} +22 -10
  4. package/dist/{channel-Bwm5rvHg.js → channel-DwCydAeD.js} +63 -37
  5. package/dist/channel-plugin-api.js +1 -1
  6. package/dist/{channel.runtime-C6SITclp.js → channel.runtime-COT2fcCf.js} +66 -129
  7. package/dist/contract-api.js +1 -1
  8. package/dist/{conversation-id-DuL575sn.js → conversation-id-CdLdoot3.js} +5 -1
  9. package/dist/{drive-djUl8IRC.js → drive-BupYOoHa.js} +46 -42
  10. package/dist/json-response-CheljwGr.js +9 -0
  11. package/dist/{monitor-Ckch4qvr.js → monitor-5gbbXIO-.js} +2 -2
  12. package/dist/{monitor.account-GXGIJrgw.js → monitor.account-lMwQ5v1Q.js} +146 -65
  13. package/dist/runtime-api.js +1 -1
  14. package/dist/{send-BJTjDWKi.js → send-DzLGqjEt.js} +17 -35
  15. package/dist/send-result-BMQw-YhV.js +287 -0
  16. package/dist/{session-conversation-CZSMgac-.js → session-conversation-BYuoVJwl.js} +1 -1
  17. package/dist/session-key-api.js +1 -1
  18. package/dist/setup-api.js +1 -1
  19. package/dist/{subagent-hooks-1pqt5tAA.js → subagent-hooks-B2iWPYJ1.js} +1 -1
  20. package/dist/subagent-hooks-api.js +1 -1
  21. package/node_modules/@larksuiteoapi/node-sdk/README.md +40 -0
  22. package/node_modules/@larksuiteoapi/node-sdk/README.zh.md +38 -0
  23. package/node_modules/@larksuiteoapi/node-sdk/es/index.js +183 -24
  24. package/node_modules/@larksuiteoapi/node-sdk/lib/index.js +186 -23
  25. package/node_modules/@larksuiteoapi/node-sdk/package.json +1 -72
  26. package/node_modules/@larksuiteoapi/node-sdk/types/index.d.ts +105 -1
  27. package/node_modules/@types/node/README.md +1 -1
  28. package/node_modules/@types/node/assert/strict.d.ts +10 -1
  29. package/node_modules/@types/node/assert.d.ts +144 -17
  30. package/node_modules/@types/node/async_hooks.d.ts +9 -9
  31. package/node_modules/@types/node/buffer.d.ts +64 -30
  32. package/node_modules/@types/node/child_process.d.ts +17 -21
  33. package/node_modules/@types/node/cluster.d.ts +13 -13
  34. package/node_modules/@types/node/console.d.ts +1 -1
  35. package/node_modules/@types/node/crypto.d.ts +471 -575
  36. package/node_modules/@types/node/diagnostics_channel.d.ts +274 -32
  37. package/node_modules/@types/node/dns.d.ts +15 -15
  38. package/node_modules/@types/node/events.d.ts +3 -3
  39. package/node_modules/@types/node/ffi.d.ts +486 -0
  40. package/node_modules/@types/node/fs/promises.d.ts +7 -4
  41. package/node_modules/@types/node/fs.d.ts +24 -18
  42. package/node_modules/@types/node/globals.d.ts +4 -4
  43. package/node_modules/@types/node/http.d.ts +30 -5
  44. package/node_modules/@types/node/http2.d.ts +5 -1
  45. package/node_modules/@types/node/index.d.ts +1 -3
  46. package/node_modules/@types/node/inspector.d.ts +1 -1
  47. package/node_modules/@types/node/module.d.ts +16 -45
  48. package/node_modules/@types/node/net.d.ts +1 -1
  49. package/node_modules/@types/node/os.d.ts +2 -2
  50. package/node_modules/@types/node/package.json +4 -4
  51. package/node_modules/@types/node/perf_hooks.d.ts +1 -9
  52. package/node_modules/@types/node/process.d.ts +25 -12
  53. package/node_modules/@types/node/quic.d.ts +92 -11
  54. package/node_modules/@types/node/readline.d.ts +12 -11
  55. package/node_modules/@types/node/repl.d.ts +10 -10
  56. package/node_modules/@types/node/sqlite.d.ts +56 -1
  57. package/node_modules/@types/node/stream/iter.d.ts +150 -0
  58. package/node_modules/@types/node/stream/promises.d.ts +2 -2
  59. package/node_modules/@types/node/stream/web.d.ts +1 -1
  60. package/node_modules/@types/node/stream.d.ts +37 -5
  61. package/node_modules/@types/node/test/reporters.d.ts +1 -1
  62. package/node_modules/@types/node/test.d.ts +120 -10
  63. package/node_modules/@types/node/tls.d.ts +1 -1
  64. package/node_modules/@types/node/ts5.6/index.d.ts +2 -4
  65. package/node_modules/@types/node/ts5.7/index.d.ts +1 -3
  66. package/node_modules/@types/node/url.d.ts +3 -3
  67. package/node_modules/@types/node/util/types.d.ts +1 -1
  68. package/node_modules/@types/node/util.d.ts +22 -22
  69. package/node_modules/@types/node/v8.d.ts +85 -3
  70. package/node_modules/@types/node/vm.d.ts +9 -9
  71. package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
  72. package/node_modules/@types/node/worker_threads.d.ts +10 -12
  73. package/node_modules/@types/node/zlib.d.ts +3 -3
  74. package/node_modules/side-channel/CHANGELOG.md +10 -0
  75. package/node_modules/side-channel/README.md +1 -1
  76. package/node_modules/side-channel/index.js +5 -2
  77. package/node_modules/side-channel/package.json +10 -10
  78. package/node_modules/side-channel/test/index.js +16 -0
  79. package/node_modules/typebox/build/compile/validator.d.mts +2 -7
  80. package/node_modules/typebox/build/compile/validator.mjs +6 -36
  81. package/node_modules/typebox/build/error/errors.d.mts +1 -7
  82. package/node_modules/typebox/build/format/_idna.mjs +36 -6
  83. package/node_modules/typebox/build/format/_puny.mjs +4 -1
  84. package/node_modules/typebox/build/format/uuid.d.mts +2 -2
  85. package/node_modules/typebox/build/format/uuid.mjs +3 -3
  86. package/node_modules/typebox/build/guard/emit.d.mts +0 -4
  87. package/node_modules/typebox/build/guard/emit.mjs +0 -8
  88. package/node_modules/typebox/build/guard/guard.d.mts +4 -8
  89. package/node_modules/typebox/build/guard/guard.mjs +5 -13
  90. package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
  91. package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
  92. package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
  93. package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
  94. package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
  95. package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
  96. package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
  97. package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
  98. package/node_modules/typebox/build/schema/types/index.mjs +0 -1
  99. package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
  100. package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
  101. package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
  102. package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
  103. package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
  104. package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
  105. package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
  106. package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
  107. package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
  108. package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
  109. package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
  110. package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
  111. package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
  112. package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
  113. package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
  114. package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
  115. package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
  116. package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
  117. package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
  118. package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
  119. package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
  120. package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
  121. package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
  122. package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
  123. package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
  124. package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
  125. package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
  126. package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
  127. package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
  128. package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
  129. package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
  130. package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
  131. package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
  132. package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
  133. package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
  134. package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
  135. package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
  136. package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
  137. package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
  138. package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
  139. package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
  140. package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
  141. package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
  142. package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
  143. package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  144. package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  145. package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  146. package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  147. package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  148. package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  149. package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  150. package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  151. package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  152. package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  153. package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  154. package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  155. package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
  156. package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
  157. package/node_modules/typebox/build/type/action/index.d.mts +7 -4
  158. package/node_modules/typebox/build/type/action/index.mjs +7 -4
  159. package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
  160. package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
  161. package/node_modules/typebox/build/type/action/module.d.mts +8 -7
  162. package/node_modules/typebox/build/type/action/module.mjs +7 -6
  163. package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
  164. package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
  165. package/node_modules/typebox/build/type/action/with.d.mts +11 -0
  166. package/node_modules/typebox/build/type/action/with.mjs +11 -0
  167. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  168. package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
  169. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
  170. package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
  171. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
  172. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
  173. package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
  174. package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
  175. package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
  176. package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
  177. package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
  178. package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
  179. package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
  180. package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
  181. package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
  182. package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
  183. package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
  184. package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
  185. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
  186. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
  187. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
  188. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
  189. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
  190. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
  191. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
  192. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
  193. package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
  194. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
  195. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
  196. package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
  197. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  198. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
  199. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  200. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  201. package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
  202. package/node_modules/typebox/build/type/engine/index.mjs +2 -2
  203. package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
  204. package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
  205. package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
  206. package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
  207. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
  208. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
  209. package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
  210. package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
  211. package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
  212. package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
  213. package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
  214. package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
  215. package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
  216. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
  217. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
  218. package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
  219. package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
  220. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
  221. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
  222. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
  223. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
  224. package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
  225. package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
  226. package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
  227. package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
  228. package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
  229. package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
  230. package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  231. package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
  232. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
  233. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  234. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  235. package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
  236. package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
  237. package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
  238. package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
  239. package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
  240. package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
  241. package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
  242. package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
  243. package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
  244. package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
  245. package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
  246. package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  247. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
  248. package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
  249. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  250. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
  251. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  252. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  253. package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
  254. package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
  255. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  256. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  257. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
  258. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
  259. package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
  260. package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
  261. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
  262. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
  263. package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
  264. package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
  265. package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
  266. package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
  267. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
  268. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
  269. package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
  270. package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
  271. package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
  272. package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
  273. package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
  274. package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
  275. package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
  276. package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
  277. package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
  278. package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
  279. package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
  280. package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
  281. package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
  282. package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  283. package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
  284. package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
  285. package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
  286. package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
  287. package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
  288. package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
  289. package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
  290. package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
  291. package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
  292. package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
  293. package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
  294. package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
  295. package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
  296. package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  297. package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
  298. package/node_modules/typebox/build/type/extends/object.mjs +25 -3
  299. package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
  300. package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
  301. package/node_modules/typebox/build/type/extends/record.mjs +23 -0
  302. package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
  303. package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
  304. package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
  305. package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
  306. package/node_modules/typebox/build/type/extends/union.mjs +2 -2
  307. package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
  308. package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
  309. package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
  310. package/node_modules/typebox/build/type/script/parser.mjs +22 -22
  311. package/node_modules/typebox/build/type/script/script.d.mts +3 -4
  312. package/node_modules/typebox/build/type/script/script.mjs +3 -2
  313. package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
  314. package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  315. package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
  316. package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
  317. package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
  318. package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
  319. package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
  320. package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
  321. package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
  322. package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
  323. package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
  324. package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
  325. package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
  326. package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
  327. package/node_modules/typebox/build/type/types/call.d.mts +3 -3
  328. package/node_modules/typebox/build/type/types/call.mjs +3 -2
  329. package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
  330. package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  331. package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
  332. package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
  333. package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
  334. package/node_modules/typebox/build/type/types/enum.mjs +5 -0
  335. package/node_modules/typebox/build/type/types/index.d.mts +1 -4
  336. package/node_modules/typebox/build/type/types/index.mjs +1 -4
  337. package/node_modules/typebox/build/type/types/number.d.mts +1 -1
  338. package/node_modules/typebox/build/type/types/number.mjs +1 -1
  339. package/node_modules/typebox/build/type/types/record.d.mts +13 -7
  340. package/node_modules/typebox/build/type/types/record.mjs +15 -9
  341. package/node_modules/typebox/build/type/types/static.d.mts +2 -5
  342. package/node_modules/typebox/build/typebox.d.mts +4 -8
  343. package/node_modules/typebox/build/typebox.mjs +4 -8
  344. package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
  345. package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
  346. package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
  347. package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
  348. package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
  349. package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
  350. package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
  351. package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
  352. package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
  353. package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
  354. package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
  355. package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
  356. package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
  357. package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
  358. package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
  359. package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
  360. package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
  361. package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
  362. package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
  363. package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  364. package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
  365. package/node_modules/typebox/build/value/index.d.mts +0 -1
  366. package/node_modules/typebox/build/value/index.mjs +0 -1
  367. package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
  368. package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
  369. package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
  370. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
  371. package/node_modules/typebox/build/value/value.d.mts +0 -1
  372. package/node_modules/typebox/build/value/value.mjs +0 -1
  373. package/node_modules/typebox/package.json +25 -25
  374. package/node_modules/typebox/readme.md +97 -80
  375. package/node_modules/undici-types/agent.d.ts +0 -2
  376. package/node_modules/undici-types/client.d.ts +25 -19
  377. package/node_modules/undici-types/dispatcher.d.ts +7 -33
  378. package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
  379. package/node_modules/undici-types/fetch.d.ts +24 -4
  380. package/node_modules/undici-types/h2c-client.d.ts +6 -6
  381. package/node_modules/undici-types/handlers.d.ts +1 -2
  382. package/node_modules/undici-types/header.d.ts +5 -0
  383. package/node_modules/undici-types/index.d.ts +3 -1
  384. package/node_modules/undici-types/interceptors.d.ts +1 -1
  385. package/node_modules/undici-types/package.json +1 -1
  386. package/node_modules/undici-types/pool.d.ts +0 -2
  387. package/node_modules/undici-types/proxy-agent.d.ts +2 -2
  388. package/node_modules/undici-types/round-robin-pool.d.ts +0 -2
  389. package/node_modules/undici-types/snapshot-agent.d.ts +4 -0
  390. package/node_modules/undici-types/socks5-proxy-agent.d.ts +2 -2
  391. package/node_modules/undici-types/webidl.d.ts +0 -1
  392. package/npm-shrinkwrap.json +23 -23
  393. package/package.json +6 -6
  394. package/skills/feishu-drive/SKILL.md +17 -3
  395. package/dist/send-result-DSsIa4-p.js +0 -140
  396. package/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  397. package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
  398. package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
  399. package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
  400. package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
  401. package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
  402. package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
  403. package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
  404. package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
  405. package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
  406. package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
  407. package/node_modules/typebox/build/type/action/options.d.mts +0 -11
  408. package/node_modules/typebox/build/type/action/options.mjs +0 -11
  409. package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
  410. package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
  411. package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
  412. package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
  413. package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
  414. package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
  415. package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
  416. package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
  417. package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
  418. package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
  419. package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
  420. package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
  421. package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
  422. package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
  423. package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
  424. package/node_modules/typebox/build/type/types/base.d.mts +0 -50
  425. package/node_modules/typebox/build/type/types/base.mjs +0 -84
  426. package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
  427. package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
  428. package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
  429. package/node_modules/typebox/build/type/types/promise.mjs +0 -29
  430. package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
  431. package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
  432. package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
  433. package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
  434. package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
  435. package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
  436. package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
  437. package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
  438. package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
  439. package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
  440. package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
  441. package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
  442. package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
  443. package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
  444. package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
  445. package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
  446. package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
  447. package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
  448. package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
  449. package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
  450. package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
  451. package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
  452. package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
  453. package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
  454. package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
  455. package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
  456. package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
  457. package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
  458. package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
  459. package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
  460. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
  461. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
@@ -1,9 +1,10 @@
1
- import { o as resolveFeishuAccount, s as resolveFeishuRuntimeAccount, v as parseFeishuCommentTarget } from "./accounts-Cfzht2Hc.js";
2
- import { h as listFeishuDirectoryPeers, m as listFeishuDirectoryGroups, o as buildFeishuPresentationCardElements } from "./channel-Bwm5rvHg.js";
1
+ import { o as resolveFeishuAccount, s as resolveFeishuRuntimeAccount, v as parseFeishuCommentTarget } from "./accounts-Bs5uJ4h0.js";
2
+ import { h as listFeishuDirectoryPeers, m as listFeishuDirectoryGroups, o as buildFeishuPresentationCardElements } from "./channel-DwCydAeD.js";
3
+ import { a as readNativeFeishuCardJson, o as resolveFeishuCardTemplate, s as sanitizeNativeFeishuCard } from "./send-result-BMQw-YhV.js";
3
4
  import { r as createFeishuClient } from "./client-BwgAJuvo.js";
4
- import { c as getChatInfo, l as getChatMembers, r as cleanupAmbientCommentTypingReaction, t as deliverCommentThreadText, u as getFeishuMemberInfo } from "./drive-djUl8IRC.js";
5
+ import { c as getChatMembers, l as getFeishuMemberInfo, r as cleanupAmbientCommentTypingReaction, s as getChatInfo, t as deliverCommentThreadText } from "./drive-BupYOoHa.js";
5
6
  import { chunkTextForOutbound } from "./runtime-api.js";
6
- import { a as sendCardFeishu, c as sendStructuredCardFeishu, g as shouldSuppressFeishuTextForVoiceMedia, h as sendMediaFeishu, i as resolveFeishuCardTemplate, n as getMessageFeishu, o as sendMarkdownCardFeishu, s as sendMessageFeishu, t as editMessageFeishu, y as resolveFeishuIdentityHeaderTitle } from "./send-BJTjDWKi.js";
7
+ import { a as sendMarkdownCardFeishu, h as shouldSuppressFeishuTextForVoiceMedia, i as sendCardFeishu, m as sendMediaFeishu, n as getMessageFeishu, o as sendMessageFeishu, s as sendStructuredCardFeishu, t as editMessageFeishu, v as resolveFeishuIdentityHeaderTitle } from "./send-DzLGqjEt.js";
7
8
  import { t as probeFeishu } from "./probe-Cv2M2Ivr.js";
8
9
  import { interactiveReplyToPresentation, normalizeInteractiveReply, normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
9
10
  import { isRecord, normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -109,115 +110,25 @@ function markRenderedFeishuCard(card) {
109
110
  });
110
111
  return card;
111
112
  }
112
- function escapeFeishuCardMarkdownText(text) {
113
- return text.replace(/[&<>]/g, (char) => {
114
- switch (char) {
115
- case "&": return "&amp;";
116
- case "<": return "&lt;";
117
- case ">": return "&gt;";
118
- default: return char;
119
- }
120
- });
121
- }
122
- function resolveSafeFeishuButtonUrl(url) {
123
- const trimmed = typeof url === "string" ? url.trim() : "";
124
- if (!trimmed) return;
125
- try {
126
- const parsed = new URL(trimmed);
127
- return parsed.protocol === "https:" || parsed.protocol === "http:" ? trimmed : void 0;
128
- } catch {
129
- return;
130
- }
131
- }
132
- function sanitizeNativeFeishuButtonBehavior(behavior) {
133
- if (!isRecord(behavior)) return;
134
- if (behavior.type === "open_url") {
135
- const safeUrl = resolveSafeFeishuButtonUrl(behavior.default_url) ?? resolveSafeFeishuButtonUrl(behavior.url);
136
- return safeUrl ? {
137
- type: "open_url",
138
- default_url: safeUrl
139
- } : void 0;
140
- }
141
- if (behavior.type === "callback" && isRecord(behavior.value) && behavior.value.oc === "ocf1") return {
142
- type: "callback",
143
- value: behavior.value
144
- };
145
- }
146
- function sanitizeNativeFeishuCardButton(button) {
147
- if (!isRecord(button)) return;
148
- const text = isRecord(button.text) && typeof button.text.content === "string" ? button.text.content : void 0;
149
- if (!text?.trim()) return;
150
- const style = button.type === "danger" ? "danger" : button.type === "primary" || button.type === "success" ? "primary" : void 0;
151
- const behaviors = Array.isArray(button.behaviors) ? button.behaviors.map((behavior) => sanitizeNativeFeishuButtonBehavior(behavior)).filter((behavior) => Boolean(behavior)) : [];
152
- const rootSafeUrl = resolveSafeFeishuButtonUrl(button.url);
153
- if (rootSafeUrl) behaviors.push({
154
- type: "open_url",
155
- default_url: rootSafeUrl
156
- });
157
- if (isRecord(button.value) && button.value.oc === "ocf1") behaviors.push({
158
- type: "callback",
159
- value: button.value
160
- });
161
- if (behaviors.length === 0) return;
162
- return {
163
- tag: "button",
164
- text: {
165
- tag: "plain_text",
166
- content: text
167
- },
168
- type: style === "danger" ? "danger" : style === "primary" || style === "success" ? "primary" : "default",
169
- behaviors
170
- };
171
- }
172
- function sanitizeNativeFeishuCardElements(element) {
173
- if (!isRecord(element) || typeof element.tag !== "string") return [];
174
- if (element.tag === "hr") return [{ tag: "hr" }];
175
- if (element.tag === "markdown" && typeof element.content === "string") return [{
176
- tag: "markdown",
177
- content: escapeFeishuCardMarkdownText(element.content)
178
- }];
179
- if (element.tag === "button") {
180
- const button = sanitizeNativeFeishuCardButton(element);
181
- return button ? [button] : [];
182
- }
183
- if (element.tag === "action" && Array.isArray(element.actions)) return element.actions.map((action) => sanitizeNativeFeishuCardButton(action)).filter((action) => Boolean(action));
184
- return [];
185
- }
186
- function sanitizeNativeFeishuCard(card) {
187
- const body = isRecord(card.body) ? card.body : void 0;
188
- const elements = (Array.isArray(body?.elements) ? body.elements : []).flatMap((element) => sanitizeNativeFeishuCardElements(element)).filter((element) => Boolean(element));
189
- if (elements.length === 0) return;
190
- const header = isRecord(card.header) ? card.header : void 0;
191
- const title = isRecord(header?.title) && typeof header.title.content === "string" ? header.title.content : void 0;
192
- return markRenderedFeishuCard({
193
- schema: "2.0",
194
- config: { width_mode: "fill" },
195
- ...title?.trim() ? { header: {
196
- title: {
197
- tag: "plain_text",
198
- content: title
199
- },
200
- template: resolveFeishuCardTemplate(typeof header?.template === "string" ? header.template : void 0) ?? "blue"
201
- } } : {},
202
- body: { elements }
203
- });
204
- }
205
113
  function readNativeFeishuCard(payload) {
206
114
  const feishuData = payload.channelData?.feishu;
207
115
  if (!isRecord(feishuData)) return;
208
116
  const card = feishuData.card ?? feishuData.interactiveCard;
209
117
  if (!isRecord(card)) return;
210
118
  if (card[RENDERED_FEISHU_CARD] === true) return card;
211
- return sanitizeNativeFeishuCard(card);
119
+ const sanitizedCard = sanitizeNativeFeishuCard(card);
120
+ return sanitizedCard ? markRenderedFeishuCard(sanitizedCard) : void 0;
212
121
  }
213
122
  function buildFeishuPayloadCard(params) {
214
123
  const nativeCard = readNativeFeishuCard(params.payload);
215
124
  if (nativeCard) return nativeCard;
125
+ const rawText = params.text ?? params.payload.text;
126
+ const textCard = readNativeFeishuCardJson(rawText);
216
127
  const interactive = normalizeInteractiveReply(params.payload.interactive);
217
128
  const presentation = normalizeMessagePresentation(params.payload.presentation) ?? (interactive ? interactiveReplyToPresentation(interactive) : void 0);
218
- if (!presentation && !interactive) return;
219
- const text = resolveInteractiveTextFallback({
220
- text: params.text ?? params.payload.text,
129
+ if (!presentation && !interactive) return textCard ? markRenderedFeishuCard(textCard) : void 0;
130
+ const text = textCard ? void 0 : resolveInteractiveTextFallback({
131
+ text: rawText,
221
132
  interactive
222
133
  });
223
134
  const elements = presentation ? buildFeishuPresentationCardElements({
@@ -396,7 +307,7 @@ const feishuOutbound = {
396
307
  return interactive ? interactiveReplyToPresentation(interactive) : void 0;
397
308
  })();
398
309
  const presentationFallbackText = renderMessagePresentationFallbackText({
399
- text: ctx.payload.text,
310
+ text: normalizedPresentation && readNativeFeishuCardJson(ctx.payload.text) ? void 0 : ctx.payload.text,
400
311
  presentation: normalizedPresentation
401
312
  });
402
313
  const text = hasVisibleFallbackCommand(normalizedPresentation?.blocks) || isRecord(ctx.payload.channelData?.feishu) && ctx.payload.channelData.feishu.fallbackHasCommand === true ? `${presentationFallbackText}\n\n> Interactive buttons are unavailable in Feishu document comments. You can type the command shown above manually.` : presentationFallbackText;
@@ -419,6 +330,9 @@ const feishuOutbound = {
419
330
  return attachChannelToResult("feishu", await sendPayloadMediaSequenceAndFinalize({
420
331
  text: ctx.payload.text ?? "",
421
332
  mediaUrls,
333
+ onResult: async (deliveryResult) => {
334
+ await ctx.onDeliveryResult?.(attachChannelToResult("feishu", deliveryResult));
335
+ },
422
336
  send: async ({ mediaUrl }) => await sendMediaFeishu({
423
337
  cfg: ctx.cfg,
424
338
  to: ctx.to,
@@ -467,6 +381,15 @@ const feishuOutbound = {
467
381
  replyToMessageId,
468
382
  replyInThread
469
383
  });
384
+ const card = readNativeFeishuCardJson(text);
385
+ if (card) return await sendCardFeishu({
386
+ cfg,
387
+ to,
388
+ card: markRenderedFeishuCard(card),
389
+ accountId: accountId ?? void 0,
390
+ replyToMessageId,
391
+ replyInThread
392
+ });
470
393
  const renderMode = resolveFeishuAccount({
471
394
  cfg,
472
395
  accountId: accountId ?? void 0
@@ -495,7 +418,7 @@ const feishuOutbound = {
495
418
  replyInThread
496
419
  });
497
420
  },
498
- sendMedia: async ({ cfg, to, text, mediaUrl, audioAsVoice, accountId, mediaLocalRoots, replyToId, threadId }) => {
421
+ sendMedia: async ({ cfg, to, text, mediaUrl, audioAsVoice, accountId, mediaLocalRoots, replyToId, threadId, onDeliveryResult }) => {
499
422
  const { replyToMessageId, replyInThread } = resolveFeishuMediaReplyMode({
500
423
  replyToId,
501
424
  threadId
@@ -512,26 +435,12 @@ const feishuOutbound = {
512
435
  mediaUrl,
513
436
  audioAsVoice
514
437
  });
515
- if (text?.trim() && !suppressTextForVoiceMedia) await sendOutboundText({
516
- cfg,
517
- to,
518
- text,
519
- accountId: accountId ?? void 0,
520
- replyToMessageId,
521
- replyInThread
522
- });
523
- if (mediaUrl) try {
524
- const result = await sendMediaFeishu({
525
- cfg,
526
- to,
527
- mediaUrl,
528
- accountId: accountId ?? void 0,
529
- mediaLocalRoots,
530
- replyToMessageId,
531
- replyInThread,
532
- ...audioAsVoice === true ? { audioAsVoice: true } : {}
533
- });
534
- if (result.voiceIntentDegradedToFile && text?.trim()) await sendOutboundText({
438
+ const reportDelivery = async (result) => {
439
+ await onDeliveryResult?.(attachChannelToResult("feishu", result));
440
+ };
441
+ let textSent = false;
442
+ if (text?.trim() && !suppressTextForVoiceMedia) {
443
+ const textResult = await sendOutboundText({
535
444
  cfg,
536
445
  to,
537
446
  text,
@@ -539,17 +448,45 @@ const feishuOutbound = {
539
448
  replyToMessageId,
540
449
  replyInThread
541
450
  });
542
- return result;
543
- } catch (err) {
544
- console.error(`[feishu] sendMediaFeishu failed:`, err);
545
- return await sendOutboundText({
451
+ textSent = true;
452
+ await reportDelivery(textResult);
453
+ }
454
+ if (mediaUrl) {
455
+ let mediaResult;
456
+ try {
457
+ mediaResult = await sendMediaFeishu({
458
+ cfg,
459
+ to,
460
+ mediaUrl,
461
+ accountId: accountId ?? void 0,
462
+ mediaLocalRoots,
463
+ replyToMessageId,
464
+ replyInThread,
465
+ ...audioAsVoice === true ? { audioAsVoice: true } : {}
466
+ });
467
+ } catch (err) {
468
+ console.error(`[feishu] sendMediaFeishu failed:`, err);
469
+ const fallbackResult = await sendOutboundText({
470
+ cfg,
471
+ to,
472
+ text: [textSent ? void 0 : text?.trim(), `📎 ${mediaUrl}`].filter(Boolean).join("\n\n"),
473
+ accountId: accountId ?? void 0,
474
+ replyToMessageId,
475
+ replyInThread
476
+ });
477
+ await reportDelivery(fallbackResult);
478
+ return fallbackResult;
479
+ }
480
+ await onDeliveryResult?.(attachChannelToResult("feishu", mediaResult));
481
+ if (mediaResult.voiceIntentDegradedToFile && text?.trim()) await reportDelivery(await sendOutboundText({
546
482
  cfg,
547
483
  to,
548
- text: [text?.trim(), `📎 ${mediaUrl}`].filter(Boolean).join("\n\n"),
484
+ text,
549
485
  accountId: accountId ?? void 0,
550
486
  replyToMessageId,
551
487
  replyInThread
552
- });
488
+ }));
489
+ return mediaResult;
553
490
  }
554
491
  return await sendOutboundText({
555
492
  cfg,
@@ -1,4 +1,4 @@
1
- import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
1
+ import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-CdLdoot3.js";
2
2
  import { t as messageActionTargetAliases } from "./security-audit-BIeA3W3Q.js";
3
3
  import { t as collectFeishuSecurityAuditFindings } from "./security-audit-shared-BIHeF-S_.js";
4
4
  export { buildFeishuConversationId, collectFeishuSecurityAuditFindings, messageActionTargetAliases, parseFeishuConversationId, parseFeishuDirectConversationId, parseFeishuTargetId };
@@ -1,5 +1,9 @@
1
1
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
2
2
  //#region extensions/feishu/src/conversation-id.ts
3
+ function resolveConfiguredFeishuGroupSessionScope(params) {
4
+ const legacyTopicSessionMode = params.groupConfig?.topicSessionMode ?? params.feishuCfg?.topicSessionMode ?? "disabled";
5
+ return params.groupConfig?.groupSessionScope ?? params.feishuCfg?.groupSessionScope ?? (legacyTopicSessionMode === "enabled" ? "group_topic" : "group");
6
+ }
3
7
  function normalizeText(value) {
4
8
  if (typeof value !== "string") return;
5
9
  return value.trim() || void 0;
@@ -136,4 +140,4 @@ function buildFeishuModelOverrideParentCandidates(parentConversationId) {
136
140
  return [];
137
141
  }
138
142
  //#endregion
139
- export { parseFeishuTargetId as a, parseFeishuDirectConversationId as i, buildFeishuModelOverrideParentCandidates as n, parseFeishuConversationId as r, buildFeishuConversationId as t };
143
+ export { parseFeishuTargetId as a, parseFeishuDirectConversationId as i, buildFeishuModelOverrideParentCandidates as n, resolveConfiguredFeishuGroupSessionScope as o, parseFeishuConversationId as r, buildFeishuConversationId as t };
@@ -1,8 +1,9 @@
1
- import { c as encodeQuery, d as isRecord$1, i as listFeishuAccountIds, l as extractReplyText, m as readString, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount, u as formatFeishuApiError, v as parseFeishuCommentTarget } from "./accounts-Cfzht2Hc.js";
1
+ import { c as encodeQuery, d as isRecord$1, i as listFeishuAccountIds, l as extractReplyText, m as readString, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount, u as formatFeishuApiError, v as parseFeishuCommentTarget } from "./accounts-Bs5uJ4h0.js";
2
2
  import { r as createFeishuClient } from "./client-BwgAJuvo.js";
3
3
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
5
5
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
6
+ import { jsonResult } from "openclaw/plugin-sdk/tool-results";
6
7
  import { Type } from "typebox";
7
8
  import { readPositiveIntegerParam } from "openclaw/plugin-sdk/param-readers";
8
9
  //#region extensions/feishu/src/tools-config.ts
@@ -127,15 +128,6 @@ const FeishuChatSchema = Type.Object({
127
128
  });
128
129
  //#endregion
129
130
  //#region extensions/feishu/src/chat.ts
130
- function json(data) {
131
- return {
132
- content: [{
133
- type: "text",
134
- text: JSON.stringify(data, null, 2)
135
- }],
136
- details: data
137
- };
138
- }
139
131
  function readChatPageSize(params) {
140
132
  return readPositiveIntegerParam(params, "page_size", {
141
133
  max: 100,
@@ -244,38 +236,29 @@ function registerFeishuChatTools(api) {
244
236
  const client = getClient();
245
237
  switch (p.action) {
246
238
  case "members":
247
- if (!p.chat_id) return json({ error: "chat_id is required for action members" });
248
- return json(await getChatMembers(client, p.chat_id, readChatPageSize(rawParams), p.page_token, p.member_id_type));
239
+ if (!p.chat_id) return jsonResult({ error: "chat_id is required for action members" });
240
+ return jsonResult(await getChatMembers(client, p.chat_id, readChatPageSize(rawParams), p.page_token, p.member_id_type));
249
241
  case "info":
250
- if (!p.chat_id) return json({ error: "chat_id is required for action info" });
251
- return json(await getChatInfo(client, p.chat_id));
242
+ if (!p.chat_id) return jsonResult({ error: "chat_id is required for action info" });
243
+ return jsonResult(await getChatInfo(client, p.chat_id));
252
244
  case "member_info":
253
- if (!p.member_id) return json({ error: "member_id is required for action member_info" });
254
- return json(await getFeishuMemberInfo(client, p.member_id, p.member_id_type ?? "open_id"));
255
- default: return json({ error: `Unknown action: ${String(p.action)}` });
245
+ if (!p.member_id) return jsonResult({ error: "member_id is required for action member_info" });
246
+ return jsonResult(await getFeishuMemberInfo(client, p.member_id, p.member_id_type ?? "open_id"));
247
+ default: return jsonResult({ error: `Unknown action: ${String(p.action)}` });
256
248
  }
257
249
  } catch (err) {
258
- return json({ error: formatFeishuApiError(err, { includeNestedErrorLogId: true }) });
250
+ return jsonResult({ error: formatFeishuApiError(err, { includeNestedErrorLogId: true }) });
259
251
  }
260
252
  }
261
253
  }, { name: "feishu_chat" });
262
254
  }
263
255
  //#endregion
264
256
  //#region extensions/feishu/src/tool-result.ts
265
- function jsonToolResult(data) {
266
- return {
267
- content: [{
268
- type: "text",
269
- text: JSON.stringify(data, null, 2)
270
- }],
271
- details: data
272
- };
273
- }
274
257
  function unknownToolActionResult(action) {
275
- return jsonToolResult({ error: `Unknown action: ${String(action)}` });
258
+ return jsonResult({ error: `Unknown action: ${String(action)}` });
276
259
  }
277
260
  function toolExecutionErrorResult(error) {
278
- return jsonToolResult({ error: formatErrorMessage(error) });
261
+ return jsonResult({ error: formatErrorMessage(error) });
279
262
  }
280
263
  //#endregion
281
264
  //#region extensions/feishu/src/comment-reaction.ts
@@ -445,7 +428,13 @@ const CommentFileType = Type.Union([
445
428
  const FeishuDriveSchema = Type.Union([
446
429
  Type.Object({
447
430
  action: Type.Literal("list"),
448
- folder_token: Type.Optional(Type.String({ description: "Folder token (optional, omit for root directory)" }))
431
+ folder_token: Type.Optional(Type.String({ description: "Folder token (optional, omit for root directory)" })),
432
+ page_size: Type.Optional(Type.Integer({
433
+ minimum: 1,
434
+ maximum: 200,
435
+ description: "Items per folder page (1-200; requires folder_token)"
436
+ })),
437
+ page_token: Type.Optional(Type.String({ description: "Continuation token from a prior list result (requires the same folder_token)" }))
449
438
  }),
450
439
  Type.Object({
451
440
  action: Type.Literal("info"),
@@ -639,9 +628,20 @@ async function getRootFolderToken(client) {
639
628
  if (!token) throw new Error("Root folder token not found");
640
629
  return token;
641
630
  }
642
- async function listFolder(client, folderToken) {
631
+ async function listFolder(client, params = {}) {
632
+ const folderToken = typeof params.folder_token === "string" ? params.folder_token.trim() : void 0;
643
633
  const validFolderToken = folderToken && folderToken !== "0" ? folderToken : void 0;
644
- const res = await client.drive.file.list({ params: validFolderToken ? { folder_token: validFolderToken } : {} });
634
+ const pageSize = readPositiveIntegerParam(params, "page_size", {
635
+ max: 200,
636
+ message: "page_size must be a positive integer between 1 and 200"
637
+ });
638
+ const pageToken = typeof params.page_token === "string" ? params.page_token.trim() : void 0;
639
+ const listParams = validFolderToken ? {
640
+ folder_token: validFolderToken,
641
+ ...pageSize ? { page_size: pageSize } : {},
642
+ ...pageToken ? { page_token: pageToken } : {}
643
+ } : {};
644
+ const res = await client.drive.file.list({ params: listParams });
645
645
  if (res.code !== 0) throw new Error(res.msg);
646
646
  return {
647
647
  files: res.data?.files?.map((f) => ({
@@ -878,17 +878,21 @@ function registerFeishuDriveTools(api) {
878
878
  }
879
879
  });
880
880
  switch (p.action) {
881
- case "list": return jsonToolResult(await listFolder(client, p.folder_token));
882
- case "info": return jsonToolResult(await getFileInfo(client, p.file_token));
883
- case "create_folder": return jsonToolResult(await createFolder(client, p.name, p.folder_token));
884
- case "move": return jsonToolResult(await moveFile(client, p.file_token, p.type, p.folder_token));
885
- case "delete": return jsonToolResult(await deleteFile(client, p.file_token, p.type));
886
- case "list_comments": return jsonToolResult(await listComments(client, applyCommentFileTypeDefault(applyAmbientCommentDefaults(p, ctx), "list_comments")));
887
- case "list_comment_replies": return jsonToolResult(await listCommentReplies(client, applyCommentFileTypeDefault(applyAmbientCommentDefaults(p, ctx), "list_comment_replies")));
881
+ case "list": return jsonResult(await listFolder(client, {
882
+ folder_token: p.folder_token,
883
+ page_size: p.page_size,
884
+ page_token: p.page_token
885
+ }));
886
+ case "info": return jsonResult(await getFileInfo(client, p.file_token));
887
+ case "create_folder": return jsonResult(await createFolder(client, p.name, p.folder_token));
888
+ case "move": return jsonResult(await moveFile(client, p.file_token, p.type, p.folder_token));
889
+ case "delete": return jsonResult(await deleteFile(client, p.file_token, p.type));
890
+ case "list_comments": return jsonResult(await listComments(client, applyCommentFileTypeDefault(applyAmbientCommentDefaults(p, ctx), "list_comments")));
891
+ case "list_comment_replies": return jsonResult(await listCommentReplies(client, applyCommentFileTypeDefault(applyAmbientCommentDefaults(p, ctx), "list_comment_replies")));
888
892
  case "add_comment": {
889
893
  const resolved = applyAddCommentDefaults(applyAddCommentAmbientDefaults(p, ctx));
890
894
  try {
891
- return jsonToolResult(await addComment(client, resolved));
895
+ return jsonResult(await addComment(client, resolved));
892
896
  } finally {
893
897
  cleanupAmbientCommentTypingReaction({
894
898
  client: getDriveInternalClient(client),
@@ -899,7 +903,7 @@ function registerFeishuDriveTools(api) {
899
903
  case "reply_comment": {
900
904
  const resolved = applyCommentFileTypeDefault(applyAmbientCommentDefaults(p, ctx), "reply_comment");
901
905
  try {
902
- return jsonToolResult(await deliverCommentThreadText(client, resolved));
906
+ return jsonResult(await deliverCommentThreadText(client, resolved));
903
907
  } finally {
904
908
  cleanupAmbientCommentTypingReaction({
905
909
  client: getDriveInternalClient(client),
@@ -917,4 +921,4 @@ function registerFeishuDriveTools(api) {
917
921
  }, { name: "feishu_drive" });
918
922
  }
919
923
  //#endregion
920
- export { jsonToolResult as a, getChatInfo as c, registerFeishuChatTools as d, createFeishuToolClient as f, resolveToolsConfig as h, createCommentTypingReactionLifecycle as i, getChatMembers as l, resolveFeishuToolAccount as m, registerFeishuDriveTools as n, toolExecutionErrorResult as o, resolveAnyEnabledFeishuToolsConfig as p, cleanupAmbientCommentTypingReaction as r, unknownToolActionResult as s, deliverCommentThreadText as t, getFeishuMemberInfo as u };
924
+ export { toolExecutionErrorResult as a, getChatMembers as c, createFeishuToolClient as d, resolveAnyEnabledFeishuToolsConfig as f, createCommentTypingReactionLifecycle as i, getFeishuMemberInfo as l, resolveToolsConfig as m, registerFeishuDriveTools as n, unknownToolActionResult as o, resolveFeishuToolAccount as p, cleanupAmbientCommentTypingReaction as r, getChatInfo as s, deliverCommentThreadText as t, registerFeishuChatTools as u };
@@ -0,0 +1,9 @@
1
+ import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
2
+ //#region extensions/feishu/src/json-response.ts
3
+ /** Feishu control-plane JSON responses are tiny; 16 MiB leaves ample headroom. */
4
+ const FEISHU_JSON_MAX_BYTES = 16 * 1024 * 1024;
5
+ async function readFeishuJsonResponse(response, label = "feishu.api") {
6
+ return readProviderJsonResponse(response, label, { maxBytes: FEISHU_JSON_MAX_BYTES });
7
+ }
8
+ //#endregion
9
+ export { readFeishuJsonResponse as t };
@@ -1,8 +1,8 @@
1
- import { r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-Cfzht2Hc.js";
1
+ import { r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-Bs5uJ4h0.js";
2
2
  import { f as fetchBotIdentityForMonitor } from "./monitor.state-R4ZgNpac.js";
3
3
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
4
4
  //#region extensions/feishu/src/monitor.ts
5
- const loadMonitorAccountRuntime = createLazyRuntimeModule(() => import("./monitor.account-GXGIJrgw.js"));
5
+ const loadMonitorAccountRuntime = createLazyRuntimeModule(() => import("./monitor.account-lMwQ5v1Q.js"));
6
6
  async function monitorFeishuProvider(opts = {}) {
7
7
  const cfg = opts.config;
8
8
  if (!cfg) throw new Error("Config is required for Feishu monitor");