@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,11 +1,12 @@
1
- import { a as resolveDefaultFeishuAccountId, d as isRecord$2, i as listFeishuAccountIds, n as inspectFeishuCredentials, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-Cfzht2Hc.js";
2
- import { n as looksLikeFeishuId, r as normalizeFeishuTarget, t as detectIdType } from "./targets-BUjQ1TcA.js";
3
- import { n as createFeishuSendReceipt, s as createFeishuCardInteractionEnvelope } from "./send-result-DSsIa4-p.js";
4
- import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
1
+ import { a as resolveDefaultFeishuAccountId, d as isRecord$1, i as listFeishuAccountIds, n as inspectFeishuCredentials, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-Bs5uJ4h0.js";
2
+ import { i as resolveReceiveIdType, n as looksLikeFeishuId, r as normalizeFeishuTarget, t as detectIdType } from "./targets-BUjQ1TcA.js";
3
+ import { a as readNativeFeishuCardJson, n as createFeishuSendReceipt, u as createFeishuCardInteractionEnvelope } from "./send-result-BMQw-YhV.js";
4
+ import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, o as resolveConfiguredFeishuGroupSessionScope, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-CdLdoot3.js";
5
5
  import { t as messageActionTargetAliases } from "./security-audit-BIeA3W3Q.js";
6
6
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DLaBl9m4.js";
7
7
  import { t as collectFeishuSecurityAuditFindings } from "./security-audit-shared-BIHeF-S_.js";
8
- import { t as resolveFeishuSessionConversation } from "./session-conversation-CZSMgac-.js";
8
+ import { t as resolveFeishuSessionConversation } from "./session-conversation-BYuoVJwl.js";
9
+ import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
9
10
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
10
11
  import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
11
12
  import { adaptScopedAccountAccessor, createHybridChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
@@ -15,17 +16,16 @@ import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing
15
16
  import { createAllowlistProviderGroupPolicyWarningCollector, projectConfigAccountIdWarningCollector } from "openclaw/plugin-sdk/channel-policy";
16
17
  import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime";
17
18
  import { createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter, listDirectoryGroupEntriesFromMapKeysAndAllowFrom, listDirectoryUserEntriesFromAllowFromAndMapKeys } from "openclaw/plugin-sdk/directory-runtime";
18
- import { normalizeMessagePresentation, renderMessagePresentationFallbackText } from "openclaw/plugin-sdk/interactive-runtime";
19
- import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
19
+ import { interactiveReplyToPresentation, normalizeInteractiveReply, normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
20
20
  import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
21
21
  import { buildProbeChannelStatusSummary, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
22
- import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
22
+ import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
23
+ import { chunkTextForOutbound, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
23
24
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2, normalizeAccountId, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
24
25
  import { createResolvedApproverActionAuthAdapter, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
25
26
  import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
26
27
  import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives";
27
28
  import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
28
- import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
29
29
  import { normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/account-id";
30
30
  import { z } from "zod";
31
31
  import { buildSecretInputSchema, hasConfiguredSecretInput as hasConfiguredSecretInput$2 } from "openclaw/plugin-sdk/secret-input";
@@ -383,11 +383,8 @@ const SESSION_FILE_INSPECTION_MAX_BYTES = 16 * 1024 * 1024;
383
383
  function timestampForPath(now = /* @__PURE__ */ new Date()) {
384
384
  return now.toISOString().replaceAll(":", "-");
385
385
  }
386
- function isRecord$1(value) {
387
- return Boolean(value && typeof value === "object" && !Array.isArray(value));
388
- }
389
386
  function toFeishuSessionEntry(value) {
390
- if (!isRecord$1(value)) return {};
387
+ if (!isRecord(value)) return {};
391
388
  return {
392
389
  sessionId: value.sessionId,
393
390
  sessionFile: value.sessionFile
@@ -450,12 +447,12 @@ function normalizeMetadataString(value) {
450
447
  function isFeishuSessionEntry(key, value) {
451
448
  if (isFeishuAcpBindingSessionKey(key)) return false;
452
449
  if (isFeishuSessionStoreKey(key)) return true;
453
- if (!isRecord$1(value)) return false;
450
+ if (!isRecord(value)) return false;
454
451
  if (normalizeMetadataString(value.channel) === "feishu" || normalizeMetadataString(value.lastChannel) === "feishu") return true;
455
- if (normalizeMetadataString((isRecord$1(value.route) ? value.route : null)?.channel) === "feishu") return true;
456
- if (normalizeMetadataString((isRecord$1(value.deliveryContext) ? value.deliveryContext : null)?.channel) === "feishu") return true;
457
- if (normalizeMetadataString((isRecord$1(value.pendingFinalDeliveryContext) ? value.pendingFinalDeliveryContext : null)?.channel) === "feishu") return true;
458
- const origin = isRecord$1(value.origin) ? value.origin : null;
452
+ if (normalizeMetadataString((isRecord(value.route) ? value.route : null)?.channel) === "feishu") return true;
453
+ if (normalizeMetadataString((isRecord(value.deliveryContext) ? value.deliveryContext : null)?.channel) === "feishu") return true;
454
+ if (normalizeMetadataString((isRecord(value.pendingFinalDeliveryContext) ? value.pendingFinalDeliveryContext : null)?.channel) === "feishu") return true;
455
+ const origin = isRecord(value.origin) ? value.origin : null;
459
456
  const originProvider = normalizeMetadataString(origin?.provider);
460
457
  const originSurface = normalizeMetadataString(origin?.surface);
461
458
  const originFrom = normalizeMetadataString(origin?.from);
@@ -547,17 +544,17 @@ function resolveSessionTranscriptCandidates(params) {
547
544
  return [...candidates].toSorted();
548
545
  }
549
546
  function isSessionHeader(value) {
550
- return isRecord$1(value) && value.type === "session" && typeof value.id === "string";
547
+ return isRecord(value) && value.type === "session" && typeof value.id === "string";
551
548
  }
552
549
  function isBlankUserMessage(value) {
553
- if (!isRecord$1(value) || value.type !== "message" || !isRecord$1(value.message)) return false;
550
+ if (!isRecord(value) || value.type !== "message" || !isRecord(value.message)) return false;
554
551
  if (value.message.role !== "user") return false;
555
552
  const content = value.message.content;
556
553
  if (typeof content === "string") return content.trim().length === 0;
557
554
  return Array.isArray(content) && content.length === 0;
558
555
  }
559
556
  function isUserMessage(value) {
560
- return isRecord$1(value) && value.type === "message" && isRecord$1(value.message) && value.message.role === "user";
557
+ return isRecord(value) && value.type === "message" && isRecord(value.message) && value.message.role === "user";
561
558
  }
562
559
  function inspectSessionTranscript(params) {
563
560
  let stat;
@@ -1223,36 +1220,35 @@ function buildFeishuPresentationCard(params) {
1223
1220
  //#endregion
1224
1221
  //#region extensions/feishu/src/session-route.ts
1225
1222
  function resolveFeishuOutboundSessionRoute(params) {
1226
- let trimmed = stripChannelTargetPrefix(params.target, "feishu", "lark");
1227
- if (!trimmed) return null;
1228
- const lower = normalizeLowercaseStringOrEmpty(trimmed);
1229
- let isGroup = false;
1230
- let typeExplicit = false;
1231
- if (lower.startsWith("group:") || lower.startsWith("chat:") || lower.startsWith("channel:")) {
1232
- trimmed = trimmed.replace(/^(group|chat|channel):/i, "").trim();
1233
- isGroup = true;
1234
- typeExplicit = true;
1235
- } else if (lower.startsWith("user:") || lower.startsWith("dm:")) {
1236
- trimmed = trimmed.replace(/^(user|dm):/i, "").trim();
1237
- isGroup = false;
1238
- typeExplicit = true;
1239
- }
1240
- if (!typeExplicit) {
1241
- const idLower = normalizeLowercaseStringOrEmpty(trimmed);
1242
- if (idLower.startsWith("ou_") || idLower.startsWith("on_")) isGroup = false;
1243
- }
1223
+ const rawTarget = stripChannelTargetPrefix(params.target, "feishu", "lark");
1224
+ const target = normalizeFeishuTarget(rawTarget);
1225
+ if (!target) return null;
1226
+ const isGroup = resolveReceiveIdType(rawTarget) === "chat_id";
1227
+ const account = resolveFeishuAccount({
1228
+ cfg: params.cfg,
1229
+ accountId: params.accountId
1230
+ });
1231
+ const groupSessionScope = isGroup ? resolveConfiguredFeishuGroupSessionScope({
1232
+ groupConfig: resolveFeishuGroupConfig({
1233
+ cfg: account.config,
1234
+ groupId: target
1235
+ }),
1236
+ feishuCfg: account.config
1237
+ }) : void 0;
1238
+ const recipientSessionExact = isGroup ? target.startsWith("oc_") && groupSessionScope === "group" : target.startsWith("ou_");
1244
1239
  return buildChannelOutboundSessionRoute({
1245
1240
  cfg: params.cfg,
1246
1241
  agentId: params.agentId,
1247
1242
  channel: "feishu",
1248
1243
  accountId: params.accountId,
1244
+ recipientSessionExact,
1249
1245
  peer: {
1250
1246
  kind: isGroup ? "group" : "direct",
1251
- id: trimmed
1247
+ id: target
1252
1248
  },
1253
1249
  chatType: isGroup ? "group" : "direct",
1254
- from: isGroup ? `feishu:group:${trimmed}` : `feishu:${trimmed}`,
1255
- to: trimmed
1250
+ from: isGroup ? `feishu:group:${target}` : `feishu:${target}`,
1251
+ to: target
1256
1252
  });
1257
1253
  }
1258
1254
  //#endregion
@@ -1431,11 +1427,7 @@ function applyNewAppSecurityPolicy(cfg, accountId, openId, groupPolicy) {
1431
1427
  next = patchFeishuConfig(next, accountId, groupPatch);
1432
1428
  return next;
1433
1429
  }
1434
- let appRegistrationModulePromise = null;
1435
- const loadAppRegistrationModule = async () => {
1436
- appRegistrationModulePromise ??= import("./app-registration-DapxBG7t.js");
1437
- return await appRegistrationModulePromise;
1438
- };
1430
+ const loadAppRegistrationModule = createLazyRuntimeModule(() => import("./app-registration-BwQ-aGTe.js"));
1439
1431
  async function promptFeishuDomain(params) {
1440
1432
  return await params.prompter.select({
1441
1433
  message: t("wizard.feishu.domainPrompt"),
@@ -1715,13 +1707,13 @@ function readBooleanParam(params, keys) {
1715
1707
  }
1716
1708
  }
1717
1709
  function hasLegacyFeishuCardCommandValue(actionValue) {
1718
- return isRecord$2(actionValue) && actionValue.oc !== "ocf1" && (Boolean(typeof actionValue.command === "string" && actionValue.command.trim()) || Boolean(typeof actionValue.text === "string" && actionValue.text.trim()));
1710
+ return isRecord$1(actionValue) && actionValue.oc !== "ocf1" && (Boolean(typeof actionValue.command === "string" && actionValue.command.trim()) || Boolean(typeof actionValue.text === "string" && actionValue.text.trim()));
1719
1711
  }
1720
1712
  function containsLegacyFeishuCardCommandValue(node) {
1721
1713
  if (Array.isArray(node)) return node.some((item) => containsLegacyFeishuCardCommandValue(item));
1722
- if (!isRecord$2(node)) return false;
1714
+ if (!isRecord$1(node)) return false;
1723
1715
  if (node.tag === "button" && hasLegacyFeishuCardCommandValue(node.value)) return true;
1724
- if (node.tag === "button" && Array.isArray(node.behaviors) && node.behaviors.some((behavior) => isRecord$2(behavior) && hasLegacyFeishuCardCommandValue(behavior.value))) return true;
1716
+ if (node.tag === "button" && Array.isArray(node.behaviors) && node.behaviors.some((behavior) => isRecord$1(behavior) && hasLegacyFeishuCardCommandValue(behavior.value))) return true;
1725
1717
  return Object.values(node).some((value) => containsLegacyFeishuCardCommandValue(value));
1726
1718
  }
1727
1719
  const meta = {
@@ -1735,7 +1727,7 @@ const meta = {
1735
1727
  order: 70,
1736
1728
  preferSessionLookupForAnnounceTarget: true
1737
1729
  };
1738
- const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-Cjc4wDNg.js"), "feishuChannelRuntime");
1730
+ const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-COT2fcCf.js"), "feishuChannelRuntime");
1739
1731
  function toFeishuMessageSendResult(result, kind) {
1740
1732
  const receipt = result.receipt ?? createFeishuSendReceipt({
1741
1733
  messageId: result.messageId,
@@ -1757,12 +1749,24 @@ const feishuMessageAdapter = defineChannelMessageAdapter({
1757
1749
  text: async (ctx) => {
1758
1750
  const sendText = (await loadFeishuChannelRuntime()).feishuOutbound.sendText;
1759
1751
  if (!sendText) throw new Error("Feishu text sending is not available.");
1760
- return toFeishuMessageSendResult(await sendText(ctx), "text");
1752
+ const { onDeliveryResult, ...outboundCtx } = ctx;
1753
+ return toFeishuMessageSendResult(await sendText({
1754
+ ...outboundCtx,
1755
+ ...onDeliveryResult ? { onDeliveryResult: async (progress) => {
1756
+ await onDeliveryResult(toFeishuMessageSendResult(progress, "text"));
1757
+ } } : {}
1758
+ }), "text");
1761
1759
  },
1762
1760
  media: async (ctx) => {
1763
1761
  const sendMedia = (await loadFeishuChannelRuntime()).feishuOutbound.sendMedia;
1764
1762
  if (!sendMedia) throw new Error("Feishu media sending is not available.");
1765
- return toFeishuMessageSendResult(await sendMedia(ctx), "media");
1763
+ const { onDeliveryResult, ...outboundCtx } = ctx;
1764
+ return toFeishuMessageSendResult(await sendMedia({
1765
+ ...outboundCtx,
1766
+ ...onDeliveryResult ? { onDeliveryResult: async (progress) => {
1767
+ await onDeliveryResult(toFeishuMessageSendResult(progress, "media"));
1768
+ } } : {}
1769
+ }), "media");
1766
1770
  }
1767
1771
  }
1768
1772
  });
@@ -1794,7 +1798,7 @@ function describeFeishuMessageTool({ cfg, accountId }) {
1794
1798
  actions: [],
1795
1799
  capabilities: enabled ? ["presentation"] : []
1796
1800
  };
1797
- const actions = new Set([
1801
+ const actions = /* @__PURE__ */ new Set([
1798
1802
  "send",
1799
1803
  "read",
1800
1804
  "edit",
@@ -1973,6 +1977,15 @@ function readFirstString(params, keys, fallback) {
1973
1977
  }
1974
1978
  if (typeof fallback === "string" && fallback.trim()) return fallback.trim();
1975
1979
  }
1980
+ const UNRESOLVED_RESPONSE_PREFIX_VAR_PATTERN = /\{[a-zA-Z][a-zA-Z0-9.]*\}/;
1981
+ function resolveFeishuMessageActionResponsePrefix(ctx) {
1982
+ const configured = ctx.cfg.messages?.responsePrefix;
1983
+ if (!configured) return;
1984
+ const agentId = (ctx.agentId?.trim() || "main").toLowerCase();
1985
+ const identityName = ctx.cfg.agents?.list?.find((agent) => agent.id.trim().toLowerCase() === agentId)?.identity?.name?.trim();
1986
+ const resolved = configured === "auto" ? identityName ? `[${identityName}]` : void 0 : configured.replace(/\{(?:identity\.name|identityname)\}/gi, identityName ?? "$&");
1987
+ return resolved && !UNRESOLVED_RESPONSE_PREFIX_VAR_PATTERN.test(resolved) ? resolved : void 0;
1988
+ }
1976
1989
  function readOptionalPositiveInteger(params, keys) {
1977
1990
  for (const key of keys) {
1978
1991
  const parsed = parseStrictPositiveInteger(params[key]);
@@ -2134,14 +2147,19 @@ const feishuPlugin = createChatChannelPlugin({
2134
2147
  if (!to) throw new Error(`Feishu ${ctx.action} requires a target (to).`);
2135
2148
  const { replyToMessageId, replyInThread } = buildFeishuSendReplyAnchor(ctx);
2136
2149
  if (ctx.action === "thread-reply" && !replyToMessageId) throw new Error("Feishu thread-reply requires messageId.");
2137
- const presentation = normalizeMessagePresentation(ctx.params.presentation);
2138
2150
  const text = readFirstString(ctx.params, ["text", "message"]);
2151
+ const textCard = readNativeFeishuCardJson(text, { responsePrefix: resolveFeishuMessageActionResponsePrefix(ctx) });
2152
+ const interactive = normalizeInteractiveReply(ctx.params.interactive);
2153
+ const presentation = normalizeMessagePresentation(ctx.params.presentation) ?? (interactive ? interactiveReplyToPresentation(interactive) : void 0);
2139
2154
  const mediaUrl = readFeishuMediaParam(ctx.params);
2140
2155
  const audioAsVoice = readBooleanParam(ctx.params, ["asVoice", "audioAsVoice"]);
2141
2156
  const card = presentation ? buildFeishuPresentationCard({
2142
2157
  presentation,
2143
- fallbackText: text
2144
- }) : void 0;
2158
+ fallbackText: textCard ? void 0 : resolveInteractiveTextFallback({
2159
+ text,
2160
+ interactive
2161
+ })
2162
+ }) : textCard;
2145
2163
  if (card && mediaUrl) throw new Error(`Feishu ${ctx.action} does not support card with media.`);
2146
2164
  if (!card && !text && !mediaUrl) throw new Error(`Feishu ${ctx.action} requires text/message, media, or card.`);
2147
2165
  const runtime = await loadFeishuChannelRuntime();
@@ -2551,7 +2569,7 @@ const feishuPlugin = createChatChannelPlugin({
2551
2569
  })
2552
2570
  }),
2553
2571
  gateway: { startAccount: async (ctx) => {
2554
- const { monitorFeishuProvider } = await import("./monitor-CQo4C7q9.js");
2572
+ const { monitorFeishuProvider } = await import("./monitor-5gbbXIO-.js");
2555
2573
  const account = resolveFeishuRuntimeAccount({
2556
2574
  cfg: ctx.cfg,
2557
2575
  accountId: ctx.accountId
@@ -2600,6 +2618,7 @@ const feishuPlugin = createChatChannelPlugin({
2600
2618
  chunker: chunkTextForOutbound,
2601
2619
  chunkerMode: "markdown",
2602
2620
  textChunkLimit: 4e3,
2621
+ sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text),
2603
2622
  presentationCapabilities: {
2604
2623
  supported: true,
2605
2624
  buttons: true,
@@ -1,2 +1,2 @@
1
- import { t as feishuPlugin } from "./channel-C1Uun9zo.js";
1
+ import { t as feishuPlugin } from "./channel-DwCydAeD.js";
2
2
  export { feishuPlugin };
@@ -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-C1Uun9zo.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-BcPh0I15.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({
@@ -246,6 +157,9 @@ function buildFeishuPayloadCard(params) {
246
157
  body: { elements }
247
158
  });
248
159
  }
160
+ function hasVisibleFallbackCommand(blocks) {
161
+ return blocks?.some((block) => block.type === "buttons" && block.buttons.some((button) => !button.disabled && button.action?.type === "command" && !button.url && !button.webApp?.url && !button.web_app?.url)) ?? false;
162
+ }
249
163
  function renderFeishuPresentationPayload({ payload, presentation, ctx }) {
250
164
  const card = buildFeishuPayloadCard({
251
165
  payload,
@@ -254,6 +168,7 @@ function renderFeishuPresentationPayload({ payload, presentation, ctx }) {
254
168
  });
255
169
  if (!card) return null;
256
170
  const existingFeishuData = isRecord(payload.channelData?.feishu) ? payload.channelData.feishu : void 0;
171
+ const fallbackHasCommand = hasVisibleFallbackCommand(presentation?.blocks);
257
172
  return {
258
173
  ...payload,
259
174
  text: renderMessagePresentationFallbackText({
@@ -264,7 +179,8 @@ function renderFeishuPresentationPayload({ payload, presentation, ctx }) {
264
179
  ...payload.channelData,
265
180
  feishu: {
266
181
  ...existingFeishuData,
267
- card
182
+ card,
183
+ ...fallbackHasCommand ? { fallbackHasCommand: true } : {}
268
184
  }
269
185
  }
270
186
  };
@@ -385,30 +301,38 @@ const feishuOutbound = {
385
301
  replyToId: ctx.replyToId,
386
302
  threadId: ctx.threadId
387
303
  });
388
- if (parseFeishuCommentTarget(ctx.to)) return await sendTextMediaPayload({
389
- channel: "feishu",
390
- ctx: {
391
- ...ctx,
392
- payload: {
393
- ...ctx.payload,
394
- text: renderMessagePresentationFallbackText({
395
- text: ctx.payload.text,
396
- presentation: normalizeMessagePresentation(ctx.payload.presentation) ?? (() => {
397
- const interactive = normalizeInteractiveReply(ctx.payload.interactive);
398
- return interactive ? interactiveReplyToPresentation(interactive) : void 0;
399
- })()
400
- }),
401
- interactive: void 0,
402
- presentation: void 0,
403
- channelData: void 0
404
- }
405
- },
406
- adapter: feishuOutbound
407
- });
304
+ if (parseFeishuCommentTarget(ctx.to)) {
305
+ const normalizedPresentation = normalizeMessagePresentation(ctx.payload.presentation) ?? (() => {
306
+ const interactive = normalizeInteractiveReply(ctx.payload.interactive);
307
+ return interactive ? interactiveReplyToPresentation(interactive) : void 0;
308
+ })();
309
+ const presentationFallbackText = renderMessagePresentationFallbackText({
310
+ text: normalizedPresentation && readNativeFeishuCardJson(ctx.payload.text) ? void 0 : ctx.payload.text,
311
+ presentation: normalizedPresentation
312
+ });
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;
314
+ return await sendTextMediaPayload({
315
+ channel: "feishu",
316
+ ctx: {
317
+ ...ctx,
318
+ payload: {
319
+ ...ctx.payload,
320
+ text,
321
+ interactive: void 0,
322
+ presentation: void 0,
323
+ channelData: void 0
324
+ }
325
+ },
326
+ adapter: feishuOutbound
327
+ });
328
+ }
408
329
  const mediaUrls = normalizeStringEntries(resolvePayloadMediaUrls(ctx.payload));
409
330
  return attachChannelToResult("feishu", await sendPayloadMediaSequenceAndFinalize({
410
331
  text: ctx.payload.text ?? "",
411
332
  mediaUrls,
333
+ onResult: async (deliveryResult) => {
334
+ await ctx.onDeliveryResult?.(attachChannelToResult("feishu", deliveryResult));
335
+ },
412
336
  send: async ({ mediaUrl }) => await sendMediaFeishu({
413
337
  cfg: ctx.cfg,
414
338
  to: ctx.to,
@@ -457,6 +381,15 @@ const feishuOutbound = {
457
381
  replyToMessageId,
458
382
  replyInThread
459
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
+ });
460
393
  const renderMode = resolveFeishuAccount({
461
394
  cfg,
462
395
  accountId: accountId ?? void 0
@@ -485,7 +418,7 @@ const feishuOutbound = {
485
418
  replyInThread
486
419
  });
487
420
  },
488
- sendMedia: async ({ cfg, to, text, mediaUrl, audioAsVoice, accountId, mediaLocalRoots, replyToId, threadId }) => {
421
+ sendMedia: async ({ cfg, to, text, mediaUrl, audioAsVoice, accountId, mediaLocalRoots, replyToId, threadId, onDeliveryResult }) => {
489
422
  const { replyToMessageId, replyInThread } = resolveFeishuMediaReplyMode({
490
423
  replyToId,
491
424
  threadId
@@ -502,26 +435,12 @@ const feishuOutbound = {
502
435
  mediaUrl,
503
436
  audioAsVoice
504
437
  });
505
- if (text?.trim() && !suppressTextForVoiceMedia) await sendOutboundText({
506
- cfg,
507
- to,
508
- text,
509
- accountId: accountId ?? void 0,
510
- replyToMessageId,
511
- replyInThread
512
- });
513
- if (mediaUrl) try {
514
- const result = await sendMediaFeishu({
515
- cfg,
516
- to,
517
- mediaUrl,
518
- accountId: accountId ?? void 0,
519
- mediaLocalRoots,
520
- replyToMessageId,
521
- replyInThread,
522
- ...audioAsVoice === true ? { audioAsVoice: true } : {}
523
- });
524
- 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({
525
444
  cfg,
526
445
  to,
527
446
  text,
@@ -529,17 +448,45 @@ const feishuOutbound = {
529
448
  replyToMessageId,
530
449
  replyInThread
531
450
  });
532
- return result;
533
- } catch (err) {
534
- console.error(`[feishu] sendMediaFeishu failed:`, err);
535
- 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({
536
482
  cfg,
537
483
  to,
538
- text: [text?.trim(), `📎 ${mediaUrl}`].filter(Boolean).join("\n\n"),
484
+ text,
539
485
  accountId: accountId ?? void 0,
540
486
  replyToMessageId,
541
487
  replyInThread
542
- });
488
+ }));
489
+ return mediaResult;
543
490
  }
544
491
  return await sendOutboundText({
545
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 };