@openclaw/feishu 2026.7.1-beta.1 → 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-DapxBG7t.js → app-registration-BwQ-aGTe.js} +23 -15
  4. package/dist/{channel-C1Uun9zo.js → channel-DwCydAeD.js} +77 -58
  5. package/dist/channel-plugin-api.js +1 -1
  6. package/dist/{channel.runtime-Cjc4wDNg.js → channel.runtime-COT2fcCf.js} +96 -149
  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-CQo4C7q9.js → monitor-5gbbXIO-.js} +3 -6
  12. package/dist/{monitor.account-08br3nkU.js → monitor.account-lMwQ5v1Q.js} +149 -67
  13. package/dist/runtime-api.js +1 -1
  14. package/dist/{send-BcPh0I15.js → send-DzLGqjEt.js} +33 -40
  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 +2 -5
  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,14 +1,15 @@
1
- import { _ as normalizeCommentFileType, c as encodeQuery, d as isRecord$1, f as normalizeString, g as buildFeishuCommentTarget, h as requestFeishuApi, l as extractReplyText, m as readString, o as resolveFeishuAccount, p as parseCommentContentElements, s as resolveFeishuRuntimeAccount } from "./accounts-Cfzht2Hc.js";
1
+ import { _ as normalizeCommentFileType, c as encodeQuery, d as isRecord$1, f as normalizeString, g as buildFeishuCommentTarget, h as requestFeishuApi, l as extractReplyText, m as readString, o as resolveFeishuAccount, p as parseCommentContentElements, s as resolveFeishuRuntimeAccount } from "./accounts-Bs5uJ4h0.js";
2
2
  import { i as resolveReceiveIdType } from "./targets-BUjQ1TcA.js";
3
- import { c as normalizeFeishuAllowEntry, d as resolveFeishuGroupConversationIngressAccess, f as resolveFeishuGroupSenderActivationIngressAccess, l as resolveFeishuDmIngressAccess, p as resolveFeishuReplyPolicy, s as hasExplicitFeishuGroupConfig, u as resolveFeishuGroupConfig } from "./channel-C1Uun9zo.js";
4
- import { c as decodeFeishuCardAction, o as buildFeishuCardActionTextFallback, s as createFeishuCardInteractionEnvelope } from "./send-result-DSsIa4-p.js";
5
- import { t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
3
+ import { c as normalizeFeishuAllowEntry, d as resolveFeishuGroupConversationIngressAccess, f as resolveFeishuGroupSenderActivationIngressAccess, l as resolveFeishuDmIngressAccess, p as resolveFeishuReplyPolicy, s as hasExplicitFeishuGroupConfig, u as resolveFeishuGroupConfig } from "./channel-DwCydAeD.js";
4
+ import { d as decodeFeishuCardAction, l as buildFeishuCardActionTextFallback, o as resolveFeishuCardTemplate, u as createFeishuCardInteractionEnvelope } from "./send-result-BMQw-YhV.js";
5
+ import { o as resolveConfiguredFeishuGroupSessionScope, t as buildFeishuConversationId } from "./conversation-id-CdLdoot3.js";
6
6
  import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.js";
7
7
  import { a as getFeishuUserAgent, i as createFeishuWSClient, n as createEventDispatcher, r as createFeishuClient } from "./client-BwgAJuvo.js";
8
- import { c as getChatInfo, i as createCommentTypingReactionLifecycle, t as deliverCommentThreadText } from "./drive-djUl8IRC.js";
8
+ import { i as createCommentTypingReactionLifecycle, s as getChatInfo, t as deliverCommentThreadText } from "./drive-BupYOoHa.js";
9
9
  import { t as createFeishuThreadBindingManager } from "./thread-bindings-V0bwk0A1.js";
10
10
  import { createReplyPrefixContext, evaluateSupplementalContextVisibility, getSessionEntry, normalizeAgentId as normalizeAgentId$2, resolveChannelContextVisibilityMode } from "./runtime-api.js";
11
- import { _ as normalizeFeishuExternalKey, a as sendCardFeishu, c as sendStructuredCardFeishu, d as isFeishuBroadcastMention, f as isMentionForwardRequest, g as shouldSuppressFeishuTextForVoiceMedia, h as sendMediaFeishu, i as resolveFeishuCardTemplate, l as parsePostContent, m as saveMessageResourceFeishu, n as getMessageFeishu, p as isFeishuGroupChatType, r as listFeishuThreadMessages, s as sendMessageFeishu, u as extractMentionTargets, v as resolveFeishuIdentityEmoji } from "./send-BcPh0I15.js";
11
+ import { t as readFeishuJsonResponse } from "./json-response-CheljwGr.js";
12
+ import { _ as resolveFeishuIdentityEmoji, c as parsePostContent, d as isMentionForwardRequest, f as isFeishuGroupChatType, g as normalizeFeishuExternalKey, h as shouldSuppressFeishuTextForVoiceMedia, i as sendCardFeishu, l as extractMentionTargets, m as sendMediaFeishu, n as getMessageFeishu, o as sendMessageFeishu, p as saveMessageResourceFeishu, r as listFeishuThreadMessages, s as sendStructuredCardFeishu, u as isFeishuBroadcastMention } from "./send-DzLGqjEt.js";
12
13
  import { i as waitForAbortableDelay, r as raceWithTimeoutAndAbort } from "./probe-Cv2M2Ivr.js";
13
14
  import { a as clearFeishuBotIdentityState, c as httpServers, d as wsClients, f as fetchBotIdentityForMonitor, i as botOpenIds, l as recordWebhookStatus, n as FEISHU_WEBHOOK_MAX_BODY_BYTES, o as closeTrackedFeishuHttpServer, r as botNames, s as feishuWebhookRateLimiter, t as FEISHU_WEBHOOK_BODY_TIMEOUT_MS, u as setFeishuBotIdentityState } from "./monitor.state-R4ZgNpac.js";
14
15
  import { createChannelMessageReplyPipeline, formatChannelProgressDraftLineForEntry, isChannelProgressDraftWorkToolName, resolveAgentOutboundIdentity } from "openclaw/plugin-sdk/channel-outbound";
@@ -29,7 +30,7 @@ import { applyBasicWebhookRequestGuards, resolveRequestClientIp } from "openclaw
29
30
  import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
30
31
  import { resolveSendableOutboundReplyParts, resolveTextChunksWithFallback, sendMediaWithLeadingCaption } from "openclaw/plugin-sdk/reply-payload";
31
32
  import { resolvePinnedMainDmOwnerFromAllowlist, safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
32
- import { buildChannelInboundEventContext, toInboundMediaFacts } from "openclaw/plugin-sdk/channel-inbound";
33
+ import { buildChannelInboundEventContext, formatInboundMediaUnavailableText, toInboundMediaFacts } from "openclaw/plugin-sdk/channel-inbound";
33
34
  import { DEFAULT_GROUP_HISTORY_LIMIT, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
34
35
  import { resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
35
36
  import { sliceUtf16Safe, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
@@ -97,22 +98,7 @@ function parseMessageContent(content, messageType) {
97
98
  try {
98
99
  const parsed = JSON.parse(content);
99
100
  if (messageType === "text") return parsed.text || "";
100
- if ([
101
- "image",
102
- "file",
103
- "audio",
104
- "video",
105
- "media",
106
- "sticker"
107
- ].includes(messageType)) {
108
- if (messageType === "audio") {
109
- const speechToText = typeof parsed.speech_to_text === "string" ? parsed.speech_to_text.trim() : "";
110
- if (speechToText) return speechToText;
111
- }
112
- const placeholder = inferPlaceholder(messageType);
113
- const fileName = typeof parsed.file_name === "string" ? parsed.file_name.trim() : "";
114
- return fileName ? `${placeholder} (${fileName})` : placeholder;
115
- }
101
+ if (FEISHU_MEDIA_MESSAGE_TYPES.has(messageType)) return formatFeishuMediaContent(parsed, messageType).body;
116
102
  if (messageType === "share_chat") {
117
103
  if (parsed && typeof parsed === "object") {
118
104
  const share = parsed;
@@ -128,6 +114,43 @@ function parseMessageContent(content, messageType) {
128
114
  return content;
129
115
  }
130
116
  }
117
+ const FEISHU_MEDIA_MESSAGE_TYPES = /* @__PURE__ */ new Set([
118
+ "image",
119
+ "file",
120
+ "audio",
121
+ "video",
122
+ "media",
123
+ "sticker"
124
+ ]);
125
+ function formatFeishuMediaContent(parsed, messageType) {
126
+ const speechToText = messageType === "audio" && typeof parsed.speech_to_text === "string" ? parsed.speech_to_text.trim() : "";
127
+ if (speechToText) return { body: speechToText };
128
+ const placeholder = inferPlaceholder(messageType);
129
+ const fileName = typeof parsed.file_name === "string" ? parsed.file_name.trim() : "";
130
+ return {
131
+ body: fileName ? `${placeholder} (${fileName})` : placeholder,
132
+ mediaPlaceholder: placeholder,
133
+ unavailableBody: fileName || void 0
134
+ };
135
+ }
136
+ function resolveFeishuMediaFailurePresentation(content, messageType) {
137
+ if (messageType === "post") return { unavailableBody: parsePostContent(content, {
138
+ renderMediaPlaceholders: false,
139
+ emptyTextFallback: ""
140
+ }).textContent };
141
+ if (!FEISHU_MEDIA_MESSAGE_TYPES.has(messageType)) return {};
142
+ try {
143
+ const parsed = JSON.parse(content);
144
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
145
+ const presentation = formatFeishuMediaContent(parsed, messageType);
146
+ return {
147
+ mediaPlaceholder: presentation.mediaPlaceholder,
148
+ unavailableBody: presentation.unavailableBody
149
+ };
150
+ } catch {
151
+ return {};
152
+ }
153
+ }
131
154
  function formatSubMessageContent(content, contentType) {
132
155
  try {
133
156
  const parsed = JSON.parse(content);
@@ -248,11 +271,18 @@ async function resolveFeishuMediaList(params) {
248
271
  "media",
249
272
  "sticker",
250
273
  "post"
251
- ].includes(messageType)) return [];
274
+ ].includes(messageType)) return {
275
+ media: [],
276
+ unavailableCount: 0
277
+ };
252
278
  const out = [];
279
+ let unavailableCount = 0;
253
280
  if (messageType === "post") {
254
281
  const { imageKeys, mediaKeys } = parsePostContent(content);
255
- if (imageKeys.length === 0 && mediaKeys.length === 0) return [];
282
+ if (imageKeys.length === 0 && mediaKeys.length === 0) return {
283
+ media: [],
284
+ unavailableCount: 0
285
+ };
256
286
  if (imageKeys.length > 0) log?.(`feishu: post message contains ${imageKeys.length} embedded image(s)`);
257
287
  if (mediaKeys.length > 0) log?.(`feishu: post message contains ${mediaKeys.length} embedded media file(s)`);
258
288
  for (const imageKey of imageKeys) try {
@@ -274,6 +304,7 @@ async function resolveFeishuMediaList(params) {
274
304
  });
275
305
  log?.(`feishu: downloaded embedded image ${imageKey}, saved to ${saved.path}`);
276
306
  } catch (err) {
307
+ unavailableCount += 1;
277
308
  log?.(`feishu: failed to download embedded image ${imageKey}: ${String(err)}`);
278
309
  }
279
310
  for (const media of mediaKeys) try {
@@ -297,15 +328,25 @@ async function resolveFeishuMediaList(params) {
297
328
  });
298
329
  log?.(`feishu: downloaded embedded media ${media.fileKey}, saved to ${saved.path}`);
299
330
  } catch (err) {
331
+ unavailableCount += 1;
300
332
  log?.(`feishu: failed to download embedded media ${media.fileKey}: ${String(err)}`);
301
333
  }
302
- return out;
334
+ return {
335
+ media: out,
336
+ unavailableCount
337
+ };
303
338
  }
304
339
  const mediaKeys = parseMediaKeys(content, messageType);
305
- if (!mediaKeys.imageKey && !mediaKeys.fileKey) return [];
340
+ if (!mediaKeys.imageKey && !mediaKeys.fileKey) return {
341
+ media: [],
342
+ unavailableCount: 1
343
+ };
306
344
  try {
307
345
  const fileKey = mediaKeys.fileKey || mediaKeys.imageKey;
308
- if (!fileKey) return [];
346
+ if (!fileKey) return {
347
+ media: [],
348
+ unavailableCount: 1
349
+ };
309
350
  const saved = await resolveSavedFeishuMedia({
310
351
  result: await saveMessageResourceFeishu({
311
352
  cfg,
@@ -326,9 +367,13 @@ async function resolveFeishuMediaList(params) {
326
367
  });
327
368
  log?.(`feishu: downloaded ${messageType} media, saved to ${saved.path}`);
328
369
  } catch (err) {
370
+ unavailableCount += 1;
329
371
  log?.(`feishu: failed to download ${messageType} media: ${String(err)}`);
330
372
  }
331
- return out;
373
+ return {
374
+ media: out,
375
+ unavailableCount
376
+ };
332
377
  }
333
378
  //#endregion
334
379
  //#region extensions/feishu/src/bot-sender-name.ts
@@ -881,7 +926,7 @@ function resolveAllowedHostnames(domain) {
881
926
  }
882
927
  return ["open.feishu.cn"];
883
928
  }
884
- async function getToken(creds) {
929
+ async function getToken(creds, deps) {
885
930
  const key = `${creds.domain ?? "feishu"}|${creds.appId}`;
886
931
  const cached = tokenCache.get(key);
887
932
  const rawNow = Date.now();
@@ -902,15 +947,18 @@ async function getToken(creds) {
902
947
  app_secret: creds.appSecret
903
948
  })
904
949
  },
950
+ fetchImpl: deps?.fetchImpl,
951
+ lookupFn: deps?.lookupFn,
905
952
  policy: { allowedHostnames: resolveAllowedHostnames(creds.domain) },
906
953
  auditContext: "feishu.streaming-card.token"
907
954
  });
908
- if (!response.ok) {
955
+ let data;
956
+ try {
957
+ if (!response.ok) throw new Error(`Token request failed with HTTP ${response.status}`);
958
+ data = await readFeishuJsonResponse(response, "feishu.streaming-card.token");
959
+ } finally {
909
960
  await release();
910
- throw new Error(`Token request failed with HTTP ${response.status}`);
911
961
  }
912
- const data = await response.json();
913
- await release();
914
962
  if (data.code !== 0 || !data.tenant_access_token) throw new Error(`Token error: ${data.msg}`);
915
963
  tokenCache.set(key, {
916
964
  token: data.tenant_access_token,
@@ -951,7 +999,7 @@ function resolveStreamingCardSendMode(options) {
951
999
  }
952
1000
  /** Streaming card session manager */
953
1001
  var FeishuStreamingSession = class {
954
- constructor(client, creds, log) {
1002
+ constructor(client, creds, log, deps) {
955
1003
  this.state = null;
956
1004
  this.queue = Promise.resolve();
957
1005
  this.closed = false;
@@ -962,6 +1010,8 @@ var FeishuStreamingSession = class {
962
1010
  this.client = client;
963
1011
  this.creds = creds;
964
1012
  this.log = log;
1013
+ this.fetchImpl = deps?.fetchImpl;
1014
+ this.lookupFn = deps?.lookupFn;
965
1015
  }
966
1016
  async start(receiveId, receiveIdType = "chat_id", options) {
967
1017
  if (this.state) return;
@@ -1003,7 +1053,10 @@ var FeishuStreamingSession = class {
1003
1053
  init: {
1004
1054
  method: "POST",
1005
1055
  headers: {
1006
- Authorization: `Bearer ${await getToken(this.creds)}`,
1056
+ Authorization: `Bearer ${await getToken(this.creds, {
1057
+ fetchImpl: this.fetchImpl,
1058
+ lookupFn: this.lookupFn
1059
+ })}`,
1007
1060
  "Content-Type": "application/json",
1008
1061
  "User-Agent": getFeishuUserAgent()
1009
1062
  },
@@ -1012,15 +1065,18 @@ var FeishuStreamingSession = class {
1012
1065
  data: JSON.stringify(cardJson)
1013
1066
  })
1014
1067
  },
1068
+ fetchImpl: this.fetchImpl,
1069
+ lookupFn: this.lookupFn,
1015
1070
  policy: { allowedHostnames: resolveAllowedHostnames(this.creds.domain) },
1016
1071
  auditContext: "feishu.streaming-card.create"
1017
1072
  });
1018
- if (!createRes.ok) {
1073
+ let createData;
1074
+ try {
1075
+ if (!createRes.ok) throw new Error(`Create card request failed with HTTP ${createRes.status}`);
1076
+ createData = await readFeishuJsonResponse(createRes, "feishu.streaming-card.create");
1077
+ } finally {
1019
1078
  await releaseCreate();
1020
- throw new Error(`Create card request failed with HTTP ${createRes.status}`);
1021
1079
  }
1022
- const createData = await createRes.json();
1023
- await releaseCreate();
1024
1080
  if (createData.code !== 0 || !createData.data?.card_id) throw new Error(`Create card failed: ${createData.msg}`);
1025
1081
  const cardId = createData.data.card_id;
1026
1082
  const cardContent = JSON.stringify({
@@ -1075,7 +1131,10 @@ var FeishuStreamingSession = class {
1075
1131
  init: {
1076
1132
  method: "PUT",
1077
1133
  headers: {
1078
- Authorization: `Bearer ${await getToken(this.creds)}`,
1134
+ Authorization: `Bearer ${await getToken(this.creds, {
1135
+ fetchImpl: this.fetchImpl,
1136
+ lookupFn: this.lookupFn
1137
+ })}`,
1079
1138
  "Content-Type": "application/json",
1080
1139
  "User-Agent": getFeishuUserAgent()
1081
1140
  },
@@ -1085,6 +1144,8 @@ var FeishuStreamingSession = class {
1085
1144
  uuid: `s_${this.state.cardId}_${this.state.sequence}`
1086
1145
  })
1087
1146
  },
1147
+ fetchImpl: this.fetchImpl,
1148
+ lookupFn: this.lookupFn,
1088
1149
  policy: { allowedHostnames: resolveAllowedHostnames(this.creds.domain) },
1089
1150
  auditContext: "feishu.streaming-card.update"
1090
1151
  });
@@ -1109,7 +1170,10 @@ var FeishuStreamingSession = class {
1109
1170
  init: {
1110
1171
  method: "PUT",
1111
1172
  headers: {
1112
- Authorization: `Bearer ${await getToken(this.creds)}`,
1173
+ Authorization: `Bearer ${await getToken(this.creds, {
1174
+ fetchImpl: this.fetchImpl,
1175
+ lookupFn: this.lookupFn
1176
+ })}`,
1113
1177
  "Content-Type": "application/json",
1114
1178
  "User-Agent": getFeishuUserAgent()
1115
1179
  },
@@ -1123,6 +1187,8 @@ var FeishuStreamingSession = class {
1123
1187
  uuid: `r_${this.state.cardId}_${this.state.sequence}`
1124
1188
  })
1125
1189
  },
1190
+ fetchImpl: this.fetchImpl,
1191
+ lookupFn: this.lookupFn,
1126
1192
  policy: { allowedHostnames: resolveAllowedHostnames(this.creds.domain) },
1127
1193
  auditContext: "feishu.streaming-card.replace"
1128
1194
  });
@@ -1150,7 +1216,7 @@ var FeishuStreamingSession = class {
1150
1216
  this.flushTimer = null;
1151
1217
  const pending = this.pendingText;
1152
1218
  if (!pending || this.closed) return;
1153
- this.update(pending);
1219
+ this.update(pending).catch((error) => this.log?.(`Scheduled flush update failed: ${String(error)}`));
1154
1220
  }, delayMs);
1155
1221
  }
1156
1222
  async update(text) {
@@ -1187,7 +1253,10 @@ var FeishuStreamingSession = class {
1187
1253
  init: {
1188
1254
  method: "PUT",
1189
1255
  headers: {
1190
- Authorization: `Bearer ${await getToken(this.creds)}`,
1256
+ Authorization: `Bearer ${await getToken(this.creds, {
1257
+ fetchImpl: this.fetchImpl,
1258
+ lookupFn: this.lookupFn
1259
+ })}`,
1191
1260
  "Content-Type": "application/json",
1192
1261
  "User-Agent": getFeishuUserAgent()
1193
1262
  },
@@ -1197,6 +1266,8 @@ var FeishuStreamingSession = class {
1197
1266
  uuid: `n_${this.state.cardId}_${this.state.sequence}`
1198
1267
  })
1199
1268
  },
1269
+ fetchImpl: this.fetchImpl,
1270
+ lookupFn: this.lookupFn,
1200
1271
  policy: { allowedHostnames: resolveAllowedHostnames(this.creds.domain) },
1201
1272
  auditContext: "feishu.streaming-card.note-update"
1202
1273
  }).then(async ({ release }) => {
@@ -1227,7 +1298,10 @@ var FeishuStreamingSession = class {
1227
1298
  init: {
1228
1299
  method: "PATCH",
1229
1300
  headers: {
1230
- Authorization: `Bearer ${await getToken(this.creds)}`,
1301
+ Authorization: `Bearer ${await getToken(this.creds, {
1302
+ fetchImpl: this.fetchImpl,
1303
+ lookupFn: this.lookupFn
1304
+ })}`,
1231
1305
  "Content-Type": "application/json; charset=utf-8",
1232
1306
  "User-Agent": getFeishuUserAgent()
1233
1307
  },
@@ -1240,6 +1314,8 @@ var FeishuStreamingSession = class {
1240
1314
  uuid: `c_${this.state.cardId}_${this.state.sequence}`
1241
1315
  })
1242
1316
  },
1317
+ fetchImpl: this.fetchImpl,
1318
+ lookupFn: this.lookupFn,
1243
1319
  policy: { allowedHostnames: resolveAllowedHostnames(this.creds.domain) },
1244
1320
  auditContext: "feishu.streaming-card.close"
1245
1321
  }).then(async ({ release }) => {
@@ -1287,7 +1363,7 @@ const TYPING_EMOJI = "Typing";
1287
1363
  *
1288
1364
  * @see https://open.feishu.cn/document/server-docs/api-call-guide/generic-error-code
1289
1365
  */
1290
- const FEISHU_BACKOFF_CODES = new Set([
1366
+ const FEISHU_BACKOFF_CODES = /* @__PURE__ */ new Set([
1291
1367
  99991400,
1292
1368
  99991403,
1293
1369
  429
@@ -1996,10 +2072,6 @@ function shouldSendNoVisibleReplyFallback(dispatchResult) {
1996
2072
  const queuedFinalFailed = dispatchResult.queuedFinal === true && failedFinalCount > 0;
1997
2073
  return dispatchResult.sendPolicyDenied !== true && dispatchResult.sourceReplyDeliveryMode !== "message_tool_only" && (emptyEligibleDispatch || queuedFinalFailed);
1998
2074
  }
1999
- function resolveConfiguredFeishuGroupSessionScope(params) {
2000
- const legacyTopicSessionMode = params.groupConfig?.topicSessionMode ?? params.feishuCfg?.topicSessionMode ?? "disabled";
2001
- return params.groupConfig?.groupSessionScope ?? params.feishuCfg?.groupSessionScope ?? (legacyTopicSessionMode === "enabled" ? "group_topic" : "group");
2002
- }
2003
2075
  function isFeishuTopicSessionScope(scope) {
2004
2076
  return scope === "group_topic" || scope === "group_topic_sender";
2005
2077
  }
@@ -2116,8 +2188,9 @@ function parseFeishuMessageEvent(event, botOpenId, _botName) {
2116
2188
  content,
2117
2189
  contentType: event.message.message_type
2118
2190
  };
2119
- if (isMentionForwardRequest(event, botOpenId)) {
2120
- const mentionTargets = extractMentionTargets(event, botOpenId);
2191
+ const mentionForwardBotOpenId = botOpenId?.trim();
2192
+ if (mentionForwardBotOpenId && isMentionForwardRequest(event, mentionForwardBotOpenId)) {
2193
+ const mentionTargets = extractMentionTargets(event, mentionForwardBotOpenId);
2121
2194
  if (mentionTargets.length > 0) ctx.mentionTargets = mentionTargets;
2122
2195
  }
2123
2196
  return ctx;
@@ -2576,7 +2649,7 @@ async function handleFeishuMessage(params) {
2576
2649
  });
2577
2650
  log(`feishu[${account.accountId}]: ${inboundLabel}: ${preview}`);
2578
2651
  const mediaMaxBytes = (feishuCfg?.mediaMaxMb ?? 30) * 1024 * 1024;
2579
- const mediaList = await resolveFeishuMediaList({
2652
+ const mediaResolution = await resolveFeishuMediaList({
2580
2653
  cfg,
2581
2654
  messageId: ctx.messageId,
2582
2655
  messageType: event.message.message_type,
@@ -2585,6 +2658,13 @@ async function handleFeishuMessage(params) {
2585
2658
  log,
2586
2659
  accountId: account.accountId
2587
2660
  });
2661
+ const mediaList = mediaResolution.media;
2662
+ const mediaFailurePresentation = resolveFeishuMediaFailurePresentation(event.message.content, event.message.message_type);
2663
+ const mediaFailureContent = mediaResolution.unavailableCount > 0 ? formatInboundMediaUnavailableText({
2664
+ body: mediaFailurePresentation.unavailableBody ?? ctx.content,
2665
+ mediaPlaceholder: mediaFailurePresentation.mediaPlaceholder,
2666
+ notice: `[feishu ${mediaResolution.unavailableCount > 1 ? `${mediaResolution.unavailableCount} attachments` : "attachment"} unavailable]`
2667
+ }) : ctx.content;
2588
2668
  let quotedMessageInfo = null;
2589
2669
  let quotedContent;
2590
2670
  if (ctx.parentId) try {
@@ -2610,7 +2690,7 @@ async function handleFeishuMessage(params) {
2610
2690
  } catch (err) {
2611
2691
  log(`feishu[${account.accountId}]: failed to fetch quoted message: ${String(err)}`);
2612
2692
  }
2613
- if (!ctx.content.trim() && mediaList.length === 0 && !quotedContent?.trim()) {
2693
+ if (!mediaFailureContent.trim() && mediaList.length === 0 && !quotedContent?.trim()) {
2614
2694
  log(`feishu[${account.accountId}]: skipping empty message (no text, no media, no quoted) from ${ctx.senderOpenId}`);
2615
2695
  return;
2616
2696
  }
@@ -2623,10 +2703,11 @@ async function handleFeishuMessage(params) {
2623
2703
  });
2624
2704
  const preflightAudioIndex = audioTranscript === void 0 ? -1 : mediaList.findIndex((media) => media.contentType?.startsWith("audio/"));
2625
2705
  const inboundMedia = toInboundMediaFacts(mediaList, { transcribed: (_media, index) => index === preflightAudioIndex });
2626
- const agentFacingContent = audioTranscript ?? ctx.content;
2627
- const agentFacingCtx = audioTranscript === void 0 ? ctx : {
2706
+ const agentFacingContent = audioTranscript ?? mediaFailureContent;
2707
+ const commandFacingContent = audioTranscript ?? ctx.content;
2708
+ const agentFacingCtx = agentFacingContent === ctx.content ? ctx : {
2628
2709
  ...ctx,
2629
- content: audioTranscript
2710
+ content: agentFacingContent
2630
2711
  };
2631
2712
  const effectiveCommandProbeBody = audioTranscript === void 0 ? commandProbeBody : isGroup ? normalizeFeishuCommandProbeBody(audioTranscript) : audioTranscript;
2632
2713
  const commandAuthorized = (audioTranscript === void 0 ? effectiveShouldComputeCommandAuthorized : core.channel.commands.shouldComputeCommandAuthorized(effectiveCommandProbeBody, effectiveCfg)) ? isDirect && audioTranscript === void 0 && effectiveDmIngress ? effectiveDmIngress.commandAccess.authorized : isGroup ? (await resolveFeishuGroupSenderActivationIngressAccess({
@@ -2845,13 +2926,14 @@ async function handleFeishuMessage(params) {
2845
2926
  body: combinedBody,
2846
2927
  bodyForAgent: messageBody,
2847
2928
  inboundHistory,
2848
- rawBody: agentFacingContent,
2849
- commandBody: agentFacingContent
2929
+ rawBody: commandFacingContent,
2930
+ commandBody: commandFacingContent
2850
2931
  },
2851
2932
  access: {
2852
2933
  mentions: {
2853
2934
  canDetectMention: isGroup,
2854
- wasMentioned
2935
+ wasMentioned,
2936
+ requireMention
2855
2937
  },
2856
2938
  commands: { authorized: commandAuthorized }
2857
2939
  },
@@ -3357,7 +3439,7 @@ function pruneChatTypeCache(now) {
3357
3439
  }
3358
3440
  }
3359
3441
  function sanitizeLogValue(v) {
3360
- return v.replace(/[\r\n]/g, " ").slice(0, 500);
3442
+ return truncateUtf16Safe(v.replace(/[\r\n]/g, " "), 500);
3361
3443
  }
3362
3444
  function resolveFeishuApprovalCardExpiresAt(nowRaw = Date.now()) {
3363
3445
  const now = asDateTimestampMs(nowRaw);
@@ -3636,7 +3718,7 @@ function startBotIdentityRecovery(params) {
3636
3718
  //#endregion
3637
3719
  //#region extensions/feishu/src/card-ux-launcher.ts
3638
3720
  const FEISHU_QUICK_ACTION_CARD_TTL_MS = 10 * 6e4;
3639
- const QUICK_ACTION_MENU_KEYS = new Set([
3721
+ const QUICK_ACTION_MENU_KEYS = /* @__PURE__ */ new Set([
3640
3722
  "quick-actions",
3641
3723
  "quick_actions",
3642
3724
  "launcher"
@@ -4151,7 +4233,7 @@ function selectCommentThreadPromptReplies(replies, targetReplyId) {
4151
4233
  if (replies.length <= FEISHU_COMMENT_THREAD_PROMPT_LIMIT) return replies;
4152
4234
  const targetIndex = replies.findIndex((reply) => reply.replyId === targetReplyId);
4153
4235
  const currentIndex = targetIndex >= 0 ? targetIndex : replies.length - 1;
4154
- const selected = new Set([
4236
+ const selected = /* @__PURE__ */ new Set([
4155
4237
  0,
4156
4238
  currentIndex,
4157
4239
  replies.length - 1
@@ -4183,7 +4265,7 @@ function selectWholeCommentTimelineEntries(params) {
4183
4265
  if (params.entries.length <= FEISHU_WHOLE_COMMENT_PROMPT_LIMIT) return params.entries;
4184
4266
  const currentIndex = params.entries.findIndex((entry) => entry.commentId === params.currentCommentId);
4185
4267
  if (currentIndex < 0) return params.entries.slice(-12);
4186
- const selected = new Set([currentIndex]);
4268
+ const selected = /* @__PURE__ */ new Set([currentIndex]);
4187
4269
  const nearestBotAfter = params.entries.findIndex((entry, index) => index > currentIndex && entry.isBotAuthored);
4188
4270
  if (nearestBotAfter >= 0) selected.add(nearestBotAfter);
4189
4271
  for (let index = currentIndex - 1; index >= 0; index -= 1) if (params.entries[index]?.isBotAuthored) {
@@ -4424,7 +4506,7 @@ async function resolveDriveCommentEventCore(params) {
4424
4506
  return null;
4425
4507
  }
4426
4508
  const context = await fetchDriveCommentContext({
4427
- client: createClient ? createClient(account ?? { accountId }) : createFeishuClient((await import("./accounts-Cfzht2Hc.js").then((n) => n.t)).resolveFeishuAccount({
4509
+ client: createClient ? createClient(account ?? { accountId }) : createFeishuClient((await import("./accounts-Bs5uJ4h0.js").then((n) => n.t)).resolveFeishuAccount({
4428
4510
  cfg,
4429
4511
  accountId
4430
4512
  })),
@@ -5158,7 +5240,7 @@ function formatFeishuWsErrorForLog(err) {
5158
5240
  }).join("").replace(/:\/\/[^:@/\s]+:[^@/\s]+@/g, "://[redacted]@").replace(/\b(authorization\s*[:=]\s*Bearer\s+)[^\s,;]+/gi, "$1[redacted]").replace(/\b(Bearer\s+)[A-Za-z0-9._~+/-]+=*/g, "$1[redacted]").replace(/\b((?:app[_-]?secret|tenant[_-]?access[_-]?token|access[_-]?token|refresh[_-]?token|token|secret|password)\s*[:=]\s*)[^\s&;,]+/gi, "$1[redacted]").replace(/\s+/g, " ").trim();
5159
5241
  if (!redacted) return "unknown error";
5160
5242
  if (redacted.length <= FEISHU_WS_LOG_ERROR_MAX_LENGTH) return redacted;
5161
- return `${redacted.slice(0, FEISHU_WS_LOG_ERROR_MAX_LENGTH)}...`;
5243
+ return `${truncateUtf16Safe(redacted, FEISHU_WS_LOG_ERROR_MAX_LENGTH)}...`;
5162
5244
  }
5163
5245
  function isFeishuWsTerminalError(err) {
5164
5246
  const message = err.message.trim();
@@ -5440,7 +5522,7 @@ async function resolveReactionSyntheticEvent(params) {
5440
5522
  const senderId = event.user_id?.open_id;
5441
5523
  const senderUserId = event.user_id?.user_id;
5442
5524
  if (!emoji || !messageId || !senderId) return null;
5443
- const { resolveFeishuAccount } = await import("./accounts-Cfzht2Hc.js").then((n) => n.t);
5525
+ const { resolveFeishuAccount } = await import("./accounts-Bs5uJ4h0.js").then((n) => n.t);
5444
5526
  const reactionNotifications = resolveFeishuAccount({
5445
5527
  cfg,
5446
5528
  accountId
@@ -1,8 +1,8 @@
1
1
  import { n as setFeishuRuntime } from "./runtime-C5JxBWZp.js";
2
2
  import { createReplyPrefixContext } from "openclaw/plugin-sdk/channel-outbound";
3
3
  import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
4
- import { PAIRING_APPROVED_MESSAGE, buildProbeChannelStatusSummary, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/channel-status";
5
4
  import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
5
+ import { PAIRING_APPROVED_MESSAGE, buildProbeChannelStatusSummary, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/channel-status";
6
6
  import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
7
7
  import { getSessionEntry } from "openclaw/plugin-sdk/session-store-runtime";
8
8
  import { DEFAULT_ACCOUNT_ID, buildChannelConfigSchema, createActionGate, createDedupeCache } from "openclaw/plugin-sdk/core";