@openclaw/feishu 2026.7.1-beta.2 → 2026.7.1-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (461) hide show
  1. package/dist/{accounts-Cfzht2Hc.js → accounts-Bs5uJ4h0.js} +4 -3
  2. package/dist/api.js +56 -65
  3. package/dist/{app-registration-DuEyfVY1.js → app-registration-BwQ-aGTe.js} +22 -10
  4. package/dist/{channel-Bwm5rvHg.js → channel-DwCydAeD.js} +63 -37
  5. package/dist/channel-plugin-api.js +1 -1
  6. package/dist/{channel.runtime-C6SITclp.js → channel.runtime-COT2fcCf.js} +66 -129
  7. package/dist/contract-api.js +1 -1
  8. package/dist/{conversation-id-DuL575sn.js → conversation-id-CdLdoot3.js} +5 -1
  9. package/dist/{drive-djUl8IRC.js → drive-BupYOoHa.js} +46 -42
  10. package/dist/json-response-CheljwGr.js +9 -0
  11. package/dist/{monitor-Ckch4qvr.js → monitor-5gbbXIO-.js} +2 -2
  12. package/dist/{monitor.account-GXGIJrgw.js → monitor.account-lMwQ5v1Q.js} +146 -65
  13. package/dist/runtime-api.js +1 -1
  14. package/dist/{send-BJTjDWKi.js → send-DzLGqjEt.js} +17 -35
  15. package/dist/send-result-BMQw-YhV.js +287 -0
  16. package/dist/{session-conversation-CZSMgac-.js → session-conversation-BYuoVJwl.js} +1 -1
  17. package/dist/session-key-api.js +1 -1
  18. package/dist/setup-api.js +1 -1
  19. package/dist/{subagent-hooks-1pqt5tAA.js → subagent-hooks-B2iWPYJ1.js} +1 -1
  20. package/dist/subagent-hooks-api.js +1 -1
  21. package/node_modules/@larksuiteoapi/node-sdk/README.md +40 -0
  22. package/node_modules/@larksuiteoapi/node-sdk/README.zh.md +38 -0
  23. package/node_modules/@larksuiteoapi/node-sdk/es/index.js +183 -24
  24. package/node_modules/@larksuiteoapi/node-sdk/lib/index.js +186 -23
  25. package/node_modules/@larksuiteoapi/node-sdk/package.json +1 -72
  26. package/node_modules/@larksuiteoapi/node-sdk/types/index.d.ts +105 -1
  27. package/node_modules/@types/node/README.md +1 -1
  28. package/node_modules/@types/node/assert/strict.d.ts +10 -1
  29. package/node_modules/@types/node/assert.d.ts +144 -17
  30. package/node_modules/@types/node/async_hooks.d.ts +9 -9
  31. package/node_modules/@types/node/buffer.d.ts +64 -30
  32. package/node_modules/@types/node/child_process.d.ts +17 -21
  33. package/node_modules/@types/node/cluster.d.ts +13 -13
  34. package/node_modules/@types/node/console.d.ts +1 -1
  35. package/node_modules/@types/node/crypto.d.ts +471 -575
  36. package/node_modules/@types/node/diagnostics_channel.d.ts +274 -32
  37. package/node_modules/@types/node/dns.d.ts +15 -15
  38. package/node_modules/@types/node/events.d.ts +3 -3
  39. package/node_modules/@types/node/ffi.d.ts +486 -0
  40. package/node_modules/@types/node/fs/promises.d.ts +7 -4
  41. package/node_modules/@types/node/fs.d.ts +24 -18
  42. package/node_modules/@types/node/globals.d.ts +4 -4
  43. package/node_modules/@types/node/http.d.ts +30 -5
  44. package/node_modules/@types/node/http2.d.ts +5 -1
  45. package/node_modules/@types/node/index.d.ts +1 -3
  46. package/node_modules/@types/node/inspector.d.ts +1 -1
  47. package/node_modules/@types/node/module.d.ts +16 -45
  48. package/node_modules/@types/node/net.d.ts +1 -1
  49. package/node_modules/@types/node/os.d.ts +2 -2
  50. package/node_modules/@types/node/package.json +4 -4
  51. package/node_modules/@types/node/perf_hooks.d.ts +1 -9
  52. package/node_modules/@types/node/process.d.ts +25 -12
  53. package/node_modules/@types/node/quic.d.ts +92 -11
  54. package/node_modules/@types/node/readline.d.ts +12 -11
  55. package/node_modules/@types/node/repl.d.ts +10 -10
  56. package/node_modules/@types/node/sqlite.d.ts +56 -1
  57. package/node_modules/@types/node/stream/iter.d.ts +150 -0
  58. package/node_modules/@types/node/stream/promises.d.ts +2 -2
  59. package/node_modules/@types/node/stream/web.d.ts +1 -1
  60. package/node_modules/@types/node/stream.d.ts +37 -5
  61. package/node_modules/@types/node/test/reporters.d.ts +1 -1
  62. package/node_modules/@types/node/test.d.ts +120 -10
  63. package/node_modules/@types/node/tls.d.ts +1 -1
  64. package/node_modules/@types/node/ts5.6/index.d.ts +2 -4
  65. package/node_modules/@types/node/ts5.7/index.d.ts +1 -3
  66. package/node_modules/@types/node/url.d.ts +3 -3
  67. package/node_modules/@types/node/util/types.d.ts +1 -1
  68. package/node_modules/@types/node/util.d.ts +22 -22
  69. package/node_modules/@types/node/v8.d.ts +85 -3
  70. package/node_modules/@types/node/vm.d.ts +9 -9
  71. package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
  72. package/node_modules/@types/node/worker_threads.d.ts +10 -12
  73. package/node_modules/@types/node/zlib.d.ts +3 -3
  74. package/node_modules/side-channel/CHANGELOG.md +10 -0
  75. package/node_modules/side-channel/README.md +1 -1
  76. package/node_modules/side-channel/index.js +5 -2
  77. package/node_modules/side-channel/package.json +10 -10
  78. package/node_modules/side-channel/test/index.js +16 -0
  79. package/node_modules/typebox/build/compile/validator.d.mts +2 -7
  80. package/node_modules/typebox/build/compile/validator.mjs +6 -36
  81. package/node_modules/typebox/build/error/errors.d.mts +1 -7
  82. package/node_modules/typebox/build/format/_idna.mjs +36 -6
  83. package/node_modules/typebox/build/format/_puny.mjs +4 -1
  84. package/node_modules/typebox/build/format/uuid.d.mts +2 -2
  85. package/node_modules/typebox/build/format/uuid.mjs +3 -3
  86. package/node_modules/typebox/build/guard/emit.d.mts +0 -4
  87. package/node_modules/typebox/build/guard/emit.mjs +0 -8
  88. package/node_modules/typebox/build/guard/guard.d.mts +4 -8
  89. package/node_modules/typebox/build/guard/guard.mjs +5 -13
  90. package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
  91. package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
  92. package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
  93. package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
  94. package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
  95. package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
  96. package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
  97. package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
  98. package/node_modules/typebox/build/schema/types/index.mjs +0 -1
  99. package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
  100. package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
  101. package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
  102. package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
  103. package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
  104. package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
  105. package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
  106. package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
  107. package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
  108. package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
  109. package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
  110. package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
  111. package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
  112. package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
  113. package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
  114. package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
  115. package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
  116. package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
  117. package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
  118. package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
  119. package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
  120. package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
  121. package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
  122. package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
  123. package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
  124. package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
  125. package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
  126. package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
  127. package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
  128. package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
  129. package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
  130. package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
  131. package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
  132. package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
  133. package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
  134. package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
  135. package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
  136. package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
  137. package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
  138. package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
  139. package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
  140. package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
  141. package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
  142. package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
  143. package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  144. package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  145. package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  146. package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  147. package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  148. package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  149. package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  150. package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  151. package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  152. package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  153. package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  154. package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  155. package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
  156. package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
  157. package/node_modules/typebox/build/type/action/index.d.mts +7 -4
  158. package/node_modules/typebox/build/type/action/index.mjs +7 -4
  159. package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
  160. package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
  161. package/node_modules/typebox/build/type/action/module.d.mts +8 -7
  162. package/node_modules/typebox/build/type/action/module.mjs +7 -6
  163. package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
  164. package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
  165. package/node_modules/typebox/build/type/action/with.d.mts +11 -0
  166. package/node_modules/typebox/build/type/action/with.mjs +11 -0
  167. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  168. package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
  169. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
  170. package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
  171. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
  172. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
  173. package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
  174. package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
  175. package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
  176. package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
  177. package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
  178. package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
  179. package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
  180. package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
  181. package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
  182. package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
  183. package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
  184. package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
  185. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
  186. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
  187. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
  188. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
  189. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
  190. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
  191. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
  192. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
  193. package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
  194. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
  195. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
  196. package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
  197. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  198. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
  199. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  200. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  201. package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
  202. package/node_modules/typebox/build/type/engine/index.mjs +2 -2
  203. package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
  204. package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
  205. package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
  206. package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
  207. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
  208. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
  209. package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
  210. package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
  211. package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
  212. package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
  213. package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
  214. package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
  215. package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
  216. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
  217. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
  218. package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
  219. package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
  220. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
  221. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
  222. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
  223. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
  224. package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
  225. package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
  226. package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
  227. package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
  228. package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
  229. package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
  230. package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  231. package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
  232. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
  233. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  234. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  235. package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
  236. package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
  237. package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
  238. package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
  239. package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
  240. package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
  241. package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
  242. package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
  243. package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
  244. package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
  245. package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
  246. package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  247. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
  248. package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
  249. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  250. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
  251. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  252. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  253. package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
  254. package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
  255. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  256. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  257. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
  258. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
  259. package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
  260. package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
  261. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
  262. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
  263. package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
  264. package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
  265. package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
  266. package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
  267. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
  268. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
  269. package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
  270. package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
  271. package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
  272. package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
  273. package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
  274. package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
  275. package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
  276. package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
  277. package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
  278. package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
  279. package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
  280. package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
  281. package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
  282. package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  283. package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
  284. package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
  285. package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
  286. package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
  287. package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
  288. package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
  289. package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
  290. package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
  291. package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
  292. package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
  293. package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
  294. package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
  295. package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
  296. package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  297. package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
  298. package/node_modules/typebox/build/type/extends/object.mjs +25 -3
  299. package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
  300. package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
  301. package/node_modules/typebox/build/type/extends/record.mjs +23 -0
  302. package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
  303. package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
  304. package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
  305. package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
  306. package/node_modules/typebox/build/type/extends/union.mjs +2 -2
  307. package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
  308. package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
  309. package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
  310. package/node_modules/typebox/build/type/script/parser.mjs +22 -22
  311. package/node_modules/typebox/build/type/script/script.d.mts +3 -4
  312. package/node_modules/typebox/build/type/script/script.mjs +3 -2
  313. package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
  314. package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  315. package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
  316. package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
  317. package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
  318. package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
  319. package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
  320. package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
  321. package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
  322. package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
  323. package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
  324. package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
  325. package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
  326. package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
  327. package/node_modules/typebox/build/type/types/call.d.mts +3 -3
  328. package/node_modules/typebox/build/type/types/call.mjs +3 -2
  329. package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
  330. package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  331. package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
  332. package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
  333. package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
  334. package/node_modules/typebox/build/type/types/enum.mjs +5 -0
  335. package/node_modules/typebox/build/type/types/index.d.mts +1 -4
  336. package/node_modules/typebox/build/type/types/index.mjs +1 -4
  337. package/node_modules/typebox/build/type/types/number.d.mts +1 -1
  338. package/node_modules/typebox/build/type/types/number.mjs +1 -1
  339. package/node_modules/typebox/build/type/types/record.d.mts +13 -7
  340. package/node_modules/typebox/build/type/types/record.mjs +15 -9
  341. package/node_modules/typebox/build/type/types/static.d.mts +2 -5
  342. package/node_modules/typebox/build/typebox.d.mts +4 -8
  343. package/node_modules/typebox/build/typebox.mjs +4 -8
  344. package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
  345. package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
  346. package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
  347. package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
  348. package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
  349. package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
  350. package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
  351. package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
  352. package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
  353. package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
  354. package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
  355. package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
  356. package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
  357. package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
  358. package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
  359. package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
  360. package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
  361. package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
  362. package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
  363. package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  364. package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
  365. package/node_modules/typebox/build/value/index.d.mts +0 -1
  366. package/node_modules/typebox/build/value/index.mjs +0 -1
  367. package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
  368. package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
  369. package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
  370. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
  371. package/node_modules/typebox/build/value/value.d.mts +0 -1
  372. package/node_modules/typebox/build/value/value.mjs +0 -1
  373. package/node_modules/typebox/package.json +25 -25
  374. package/node_modules/typebox/readme.md +97 -80
  375. package/node_modules/undici-types/agent.d.ts +0 -2
  376. package/node_modules/undici-types/client.d.ts +25 -19
  377. package/node_modules/undici-types/dispatcher.d.ts +7 -33
  378. package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
  379. package/node_modules/undici-types/fetch.d.ts +24 -4
  380. package/node_modules/undici-types/h2c-client.d.ts +6 -6
  381. package/node_modules/undici-types/handlers.d.ts +1 -2
  382. package/node_modules/undici-types/header.d.ts +5 -0
  383. package/node_modules/undici-types/index.d.ts +3 -1
  384. package/node_modules/undici-types/interceptors.d.ts +1 -1
  385. package/node_modules/undici-types/package.json +1 -1
  386. package/node_modules/undici-types/pool.d.ts +0 -2
  387. package/node_modules/undici-types/proxy-agent.d.ts +2 -2
  388. package/node_modules/undici-types/round-robin-pool.d.ts +0 -2
  389. package/node_modules/undici-types/snapshot-agent.d.ts +4 -0
  390. package/node_modules/undici-types/socks5-proxy-agent.d.ts +2 -2
  391. package/node_modules/undici-types/webidl.d.ts +0 -1
  392. package/npm-shrinkwrap.json +23 -23
  393. package/package.json +6 -6
  394. package/skills/feishu-drive/SKILL.md +17 -3
  395. package/dist/send-result-DSsIa4-p.js +0 -140
  396. package/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  397. package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
  398. package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
  399. package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
  400. package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
  401. package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
  402. package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
  403. package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
  404. package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
  405. package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
  406. package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
  407. package/node_modules/typebox/build/type/action/options.d.mts +0 -11
  408. package/node_modules/typebox/build/type/action/options.mjs +0 -11
  409. package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
  410. package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
  411. package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
  412. package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
  413. package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
  414. package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
  415. package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
  416. package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
  417. package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
  418. package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
  419. package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
  420. package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
  421. package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
  422. package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
  423. package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
  424. package/node_modules/typebox/build/type/types/base.d.mts +0 -50
  425. package/node_modules/typebox/build/type/types/base.mjs +0 -84
  426. package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
  427. package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
  428. package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
  429. package/node_modules/typebox/build/type/types/promise.mjs +0 -29
  430. package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
  431. package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
  432. package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
  433. package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
  434. package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
  435. package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
  436. package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
  437. package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
  438. package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
  439. package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
  440. package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
  441. package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
  442. package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
  443. package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
  444. package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
  445. package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
  446. package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
  447. package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
  448. package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
  449. package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
  450. package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
  451. package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
  452. package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
  453. package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
  454. package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
  455. package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
  456. package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
  457. package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
  458. package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
  459. package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
  460. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
  461. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
@@ -71,7 +71,7 @@ function formatFeishuApiFailure(error, errorPrefix, options = {}) {
71
71
  function createFeishuApiError(error, errorPrefix, options = {}) {
72
72
  return new Error(formatFeishuApiFailure(error, errorPrefix, options), { cause: error });
73
73
  }
74
- const FEISHU_SEND_RATE_LIMIT_CODES = new Set([230020, 11232]);
74
+ const FEISHU_SEND_RATE_LIMIT_CODES = /* @__PURE__ */ new Set([230020, 11232]);
75
75
  const FEISHU_SEND_MAX_RETRIES = 2;
76
76
  const FEISHU_SEND_RETRY_BASE_MS = 500;
77
77
  /**
@@ -138,7 +138,8 @@ function readDocsLinkUrl(element) {
138
138
  }
139
139
  function readMentionUserId(element) {
140
140
  const mention = isRecord$1(element.mention) ? element.mention : void 0;
141
- return normalizeString((isRecord$1(element.person) ? element.person : void 0)?.user_id) || normalizeString(mention?.user_id) || normalizeString(mention?.open_id) || normalizeString(element.mention_user) || normalizeString(element.user_id) || void 0;
141
+ const person = isRecord$1(element.person) ? element.person : void 0;
142
+ return normalizeString(person?.user_id) || normalizeString(mention?.user_id) || normalizeString(mention?.open_id) || normalizeString(element.mention_user) || normalizeString(element.user_id) || void 0;
142
143
  }
143
144
  function readMentionDisplayText(element, userId) {
144
145
  const mention = isRecord$1(element.mention) ? element.mention : void 0;
@@ -156,7 +157,7 @@ function readElementTextPreservingWhitespace(element) {
156
157
  }
157
158
  const FEISHU_LINK_TOKEN_MIN_LENGTH = 22;
158
159
  const FEISHU_LINK_TOKEN_MAX_LENGTH = 28;
159
- const COMMENT_LINK_KIND_ALIASES = new Map([
160
+ const COMMENT_LINK_KIND_ALIASES = /* @__PURE__ */ new Map([
160
161
  ["doc", "doc"],
161
162
  ["docs", "doc"],
162
163
  ["docx", "docx"],
package/dist/api.js CHANGED
@@ -1,11 +1,11 @@
1
- import { r as listEnabledFeishuAccounts } from "./accounts-Cfzht2Hc.js";
2
- import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./channel-Bwm5rvHg.js";
3
- import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
1
+ import { r as listEnabledFeishuAccounts } from "./accounts-Bs5uJ4h0.js";
2
+ import { a as setFeishuNamedAccountEnabled, i as feishuSetupAdapter, n as feishuSetupWizard, r as runFeishuLogin, t as feishuPlugin } from "./channel-DwCydAeD.js";
3
+ import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-CdLdoot3.js";
4
4
  import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.js";
5
5
  import { r as createFeishuClient } from "./client-BwgAJuvo.js";
6
- import { a as jsonToolResult, d as registerFeishuChatTools, f as createFeishuToolClient, h as resolveToolsConfig, m as resolveFeishuToolAccount, n as registerFeishuDriveTools, o as toolExecutionErrorResult, p as resolveAnyEnabledFeishuToolsConfig, s as unknownToolActionResult } from "./drive-djUl8IRC.js";
6
+ import { a as toolExecutionErrorResult, d as createFeishuToolClient, f as resolveAnyEnabledFeishuToolsConfig, m as resolveToolsConfig, n as registerFeishuDriveTools, o as unknownToolActionResult, p as resolveFeishuToolAccount, u as registerFeishuChatTools } from "./drive-BupYOoHa.js";
7
7
  import { n as getFeishuThreadBindingManager, r as testing, t as createFeishuThreadBindingManager } from "./thread-bindings-V0bwk0A1.js";
8
- import { n as handleFeishuSubagentEnded, r as handleFeishuSubagentSpawning, t as handleFeishuSubagentDeliveryTarget } from "./subagent-hooks-1pqt5tAA.js";
8
+ import { n as handleFeishuSubagentEnded, r as handleFeishuSubagentSpawning, t as handleFeishuSubagentDeliveryTarget } from "./subagent-hooks-B2iWPYJ1.js";
9
9
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
10
10
  import { optionalPositiveIntegerSchema } from "openclaw/plugin-sdk/channel-actions";
11
11
  import { existsSync } from "node:fs";
@@ -13,6 +13,7 @@ import { homedir } from "node:os";
13
13
  import { basename, isAbsolute, resolve } from "node:path";
14
14
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
15
15
  import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
16
+ import { jsonResult } from "openclaw/plugin-sdk/tool-results";
16
17
  import { Type } from "typebox";
17
18
  import { readPositiveIntegerParam } from "openclaw/plugin-sdk/param-readers";
18
19
  import { createClackPrompter } from "openclaw/plugin-sdk/setup-runtime";
@@ -563,15 +564,6 @@ async function updateColorText(client, docToken, blockId, content) {
563
564
  }
564
565
  //#endregion
565
566
  //#region extensions/feishu/src/docx.ts
566
- function json$1(data) {
567
- return {
568
- content: [{
569
- type: "text",
570
- text: JSON.stringify(data, null, 2)
571
- }],
572
- details: data
573
- };
574
- }
575
567
  function resolveDocToolLocalRoots(ctx) {
576
568
  if (ctx.fsPolicy?.workspaceOnly !== true) return;
577
569
  const workspaceDir = ctx.workspaceDir?.trim();
@@ -609,7 +601,7 @@ const BLOCK_TYPE_NAMES = {
609
601
  31: "Table",
610
602
  32: "TableCell"
611
603
  };
612
- const UNSUPPORTED_CREATE_TYPES = new Set([31, 32]);
604
+ const UNSUPPORTED_CREATE_TYPES = /* @__PURE__ */ new Set([31, 32]);
613
605
  /** Clean blocks for insertion (remove unsupported types and read-only fields) */
614
606
  function cleanBlocksForInsert(blocks) {
615
607
  const skipped = [];
@@ -1049,7 +1041,7 @@ async function uploadFileBlock(client, docToken, maxBytes, localRoots, url, file
1049
1041
  note: "File uploaded to drive. Use the file_token to reference it. Direct file block creation is not supported by the Feishu API."
1050
1042
  };
1051
1043
  }
1052
- const STRUCTURED_BLOCK_TYPES = new Set([
1044
+ const STRUCTURED_BLOCK_TYPES = /* @__PURE__ */ new Set([
1053
1045
  14,
1054
1046
  18,
1055
1047
  21,
@@ -1428,33 +1420,33 @@ function registerFeishuDocTools(api) {
1428
1420
  try {
1429
1421
  const client = getClient(p, defaultAccountId);
1430
1422
  switch (p.action) {
1431
- case "read": return json$1(await readDoc(client, p.doc_token));
1432
- case "write": return json$1(await writeDoc(client, p.doc_token, p.content, getMediaMaxBytes(p, defaultAccountId), api.logger));
1433
- case "append": return json$1(await appendDoc(client, p.doc_token, p.content, getMediaMaxBytes(p, defaultAccountId), api.logger));
1434
- case "insert": return json$1(await insertDoc(client, p.doc_token, p.content, p.after_block_id, getMediaMaxBytes(p, defaultAccountId), api.logger));
1435
- case "create": return json$1(await createDoc(client, p.title, p.folder_token, {
1423
+ case "read": return jsonResult(await readDoc(client, p.doc_token));
1424
+ case "write": return jsonResult(await writeDoc(client, p.doc_token, p.content, getMediaMaxBytes(p, defaultAccountId), api.logger));
1425
+ case "append": return jsonResult(await appendDoc(client, p.doc_token, p.content, getMediaMaxBytes(p, defaultAccountId), api.logger));
1426
+ case "insert": return jsonResult(await insertDoc(client, p.doc_token, p.content, p.after_block_id, getMediaMaxBytes(p, defaultAccountId), api.logger));
1427
+ case "create": return jsonResult(await createDoc(client, p.title, p.folder_token, {
1436
1428
  grantToRequester: p.grant_to_requester,
1437
1429
  requesterOpenId: trustedRequesterOpenId
1438
1430
  }));
1439
- case "list_blocks": return json$1(await listBlocks(client, p.doc_token));
1440
- case "get_block": return json$1(await getBlock(client, p.doc_token, p.block_id));
1441
- case "update_block": return json$1(await updateBlock(client, p.doc_token, p.block_id, p.content));
1442
- case "delete_block": return json$1(await deleteBlock(client, p.doc_token, p.block_id));
1443
- case "create_table": return json$1(await createTable(client, p.doc_token, p.row_size, p.column_size, p.parent_block_id, p.column_width));
1444
- case "write_table_cells": return json$1(await writeTableCells(client, p.doc_token, p.table_block_id, p.values));
1445
- case "create_table_with_values": return json$1(await createTableWithValues(client, p.doc_token, p.row_size, p.column_size, p.values, p.parent_block_id, p.column_width));
1446
- case "upload_image": return json$1(await uploadImageBlock(client, p.doc_token, getMediaMaxBytes(p, defaultAccountId), mediaLocalRoots, p.url, p.file_path, p.parent_block_id, p.filename, p.index, p.image));
1447
- case "upload_file": return json$1(await uploadFileBlock(client, p.doc_token, getMediaMaxBytes(p, defaultAccountId), mediaLocalRoots, p.url, p.file_path, p.parent_block_id, p.filename));
1448
- case "color_text": return json$1(await updateColorText(client, p.doc_token, p.block_id, p.content));
1449
- case "insert_table_row": return json$1(await insertTableRow(client, p.doc_token, p.block_id, p.row_index));
1450
- case "insert_table_column": return json$1(await insertTableColumn(client, p.doc_token, p.block_id, p.column_index));
1451
- case "delete_table_rows": return json$1(await deleteTableRows(client, p.doc_token, p.block_id, p.row_start, p.row_count));
1452
- case "delete_table_columns": return json$1(await deleteTableColumns(client, p.doc_token, p.block_id, p.column_start, p.column_count));
1453
- case "merge_table_cells": return json$1(await mergeTableCells(client, p.doc_token, p.block_id, p.row_start, p.row_end, p.column_start, p.column_end));
1454
- default: return json$1({ error: "Unknown action" });
1431
+ case "list_blocks": return jsonResult(await listBlocks(client, p.doc_token));
1432
+ case "get_block": return jsonResult(await getBlock(client, p.doc_token, p.block_id));
1433
+ case "update_block": return jsonResult(await updateBlock(client, p.doc_token, p.block_id, p.content));
1434
+ case "delete_block": return jsonResult(await deleteBlock(client, p.doc_token, p.block_id));
1435
+ case "create_table": return jsonResult(await createTable(client, p.doc_token, p.row_size, p.column_size, p.parent_block_id, p.column_width));
1436
+ case "write_table_cells": return jsonResult(await writeTableCells(client, p.doc_token, p.table_block_id, p.values));
1437
+ case "create_table_with_values": return jsonResult(await createTableWithValues(client, p.doc_token, p.row_size, p.column_size, p.values, p.parent_block_id, p.column_width));
1438
+ case "upload_image": return jsonResult(await uploadImageBlock(client, p.doc_token, getMediaMaxBytes(p, defaultAccountId), mediaLocalRoots, p.url, p.file_path, p.parent_block_id, p.filename, p.index, p.image));
1439
+ case "upload_file": return jsonResult(await uploadFileBlock(client, p.doc_token, getMediaMaxBytes(p, defaultAccountId), mediaLocalRoots, p.url, p.file_path, p.parent_block_id, p.filename));
1440
+ case "color_text": return jsonResult(await updateColorText(client, p.doc_token, p.block_id, p.content));
1441
+ case "insert_table_row": return jsonResult(await insertTableRow(client, p.doc_token, p.block_id, p.row_index));
1442
+ case "insert_table_column": return jsonResult(await insertTableColumn(client, p.doc_token, p.block_id, p.column_index));
1443
+ case "delete_table_rows": return jsonResult(await deleteTableRows(client, p.doc_token, p.block_id, p.row_start, p.row_count));
1444
+ case "delete_table_columns": return jsonResult(await deleteTableColumns(client, p.doc_token, p.block_id, p.column_start, p.column_count));
1445
+ case "merge_table_cells": return jsonResult(await mergeTableCells(client, p.doc_token, p.block_id, p.row_start, p.row_end, p.column_start, p.column_end));
1446
+ default: return jsonResult({ error: "Unknown action" });
1455
1447
  }
1456
1448
  } catch (err) {
1457
- return json$1({ error: formatErrorMessage(err) });
1449
+ return jsonResult({ error: formatErrorMessage(err) });
1458
1450
  }
1459
1451
  }
1460
1452
  };
@@ -1469,7 +1461,7 @@ function registerFeishuDocTools(api) {
1469
1461
  parameters: Type.Object({}),
1470
1462
  async execute() {
1471
1463
  try {
1472
- return json$1(await listAppScopes(createFeishuToolClient({
1464
+ return jsonResult(await listAppScopes(createFeishuToolClient({
1473
1465
  api,
1474
1466
  defaultAccountId: ctx.agentAccountId,
1475
1467
  requiredTool: {
@@ -1478,7 +1470,7 @@ function registerFeishuDocTools(api) {
1478
1470
  }
1479
1471
  })));
1480
1472
  } catch (err) {
1481
- return json$1({ error: formatErrorMessage(err) });
1473
+ return jsonResult({ error: formatErrorMessage(err) });
1482
1474
  }
1483
1475
  }
1484
1476
  }), { name: "feishu_app_scopes" });
@@ -1694,27 +1686,27 @@ function registerFeishuWikiTools(api) {
1694
1686
  }
1695
1687
  });
1696
1688
  switch (p.action) {
1697
- case "spaces": return jsonToolResult(await listSpaces(createClient(), readWikiPageSize(p), p.page_token));
1689
+ case "spaces": return jsonResult(await listSpaces(createClient(), readWikiPageSize(p), p.page_token));
1698
1690
  case "nodes": {
1699
1691
  const spaceId = requireWikiSpaceId(p.space_id, "space_id");
1700
- return jsonToolResult(await listNodes(createClient(), spaceId, p.parent_node_token, readWikiPageSize(p), p.page_token));
1692
+ return jsonResult(await listNodes(createClient(), spaceId, p.parent_node_token, readWikiPageSize(p), p.page_token));
1701
1693
  }
1702
- case "get": return jsonToolResult(await getNode(createClient(), p.token));
1694
+ case "get": return jsonResult(await getNode(createClient(), p.token));
1703
1695
  case "search":
1704
1696
  optionalWikiSpaceId(p.space_id, "space_id");
1705
1697
  createClient();
1706
- return jsonToolResult({ error: "Search is not available. Use feishu_wiki with action: 'nodes' to browse or action: 'get' to lookup by token." });
1698
+ return jsonResult({ error: "Search is not available. Use feishu_wiki with action: 'nodes' to browse or action: 'get' to lookup by token." });
1707
1699
  case "create": {
1708
1700
  const spaceId = requireWikiSpaceId(p.space_id, "space_id");
1709
- return jsonToolResult(await createNode(createClient(), spaceId, p.title, p.obj_type, p.parent_node_token));
1701
+ return jsonResult(await createNode(createClient(), spaceId, p.title, p.obj_type, p.parent_node_token));
1710
1702
  }
1711
1703
  case "move": {
1712
1704
  const spaceId = requireWikiSpaceId(p.space_id, "space_id");
1713
- return jsonToolResult(await moveNode(createClient(), spaceId, p.node_token, optionalWikiSpaceId(p.target_space_id, "target_space_id"), p.target_parent_token));
1705
+ return jsonResult(await moveNode(createClient(), spaceId, p.node_token, optionalWikiSpaceId(p.target_space_id, "target_space_id"), p.target_parent_token));
1714
1706
  }
1715
1707
  case "rename": {
1716
1708
  const spaceId = requireWikiSpaceId(p.space_id, "space_id");
1717
- return jsonToolResult(await renameNode(createClient(), spaceId, p.node_token, p.title));
1709
+ return jsonResult(await renameNode(createClient(), spaceId, p.node_token, p.title));
1718
1710
  }
1719
1711
  default: return unknownToolActionResult(p.action);
1720
1712
  }
@@ -1845,9 +1837,9 @@ function registerFeishuPermTools(api) {
1845
1837
  }
1846
1838
  });
1847
1839
  switch (p.action) {
1848
- case "list": return jsonToolResult(await listMembers(client, p.token, p.type));
1849
- case "add": return jsonToolResult(await addMember(client, p.token, p.type, p.member_type, p.member_id, p.perm));
1850
- case "remove": return jsonToolResult(await removeMember(client, p.token, p.type, p.member_type, p.member_id));
1840
+ case "list": return jsonResult(await listMembers(client, p.token, p.type));
1841
+ case "add": return jsonResult(await addMember(client, p.token, p.type, p.member_type, p.member_id, p.perm));
1842
+ case "remove": return jsonResult(await removeMember(client, p.token, p.type, p.member_type, p.member_id));
1851
1843
  default: return unknownToolActionResult(p.action);
1852
1844
  }
1853
1845
  } catch (err) {
@@ -1859,15 +1851,6 @@ function registerFeishuPermTools(api) {
1859
1851
  }
1860
1852
  //#endregion
1861
1853
  //#region extensions/feishu/src/bitable.ts
1862
- function json(data) {
1863
- return {
1864
- content: [{
1865
- type: "text",
1866
- text: JSON.stringify(data, null, 2)
1867
- }],
1868
- details: data
1869
- };
1870
- }
1871
1854
  var LarkApiError = class extends Error {
1872
1855
  constructor(code, message, api, context) {
1873
1856
  super(`[${api}] code=${code} message=${message}`);
@@ -2040,7 +2023,7 @@ async function createRecord(client, appToken, tableId, fields) {
2040
2023
  return { record: res.data?.record };
2041
2024
  }
2042
2025
  /** Default field types created for new Bitable tables (to be cleaned up) */
2043
- const DEFAULT_CLEANUP_FIELD_TYPES = new Set([
2026
+ const DEFAULT_CLEANUP_FIELD_TYPES = /* @__PURE__ */ new Set([
2044
2027
  3,
2045
2028
  5,
2046
2029
  17
@@ -2237,10 +2220,18 @@ const GetRecordSchema = Type.Object({
2237
2220
  table_id: Type.String({ description: "Table ID (from URL: ?table=YYY)" }),
2238
2221
  record_id: Type.String({ description: "Record ID to retrieve" })
2239
2222
  });
2223
+ const BitableFieldValueSchema = Type.Unsafe({ type: [
2224
+ "string",
2225
+ "number",
2226
+ "boolean",
2227
+ "object",
2228
+ "array",
2229
+ "null"
2230
+ ] });
2240
2231
  const CreateRecordSchema = Type.Object({
2241
2232
  app_token: Type.String({ description: "Bitable app token (use feishu_bitable_get_meta to get from URL)" }),
2242
2233
  table_id: Type.String({ description: "Table ID (from URL: ?table=YYY)" }),
2243
- fields: Type.Record(Type.String(), Type.Any(), { description: "Field values keyed by field name. Format by type: Text='string', Number=123, SingleSelect='Option', MultiSelect=['A','B'], DateTime=timestamp_ms, User=[{id:'ou_xxx'}], URL={text:'Display',link:'https://...'}" })
2234
+ fields: Type.Record(Type.String(), BitableFieldValueSchema, { description: "Field values keyed by field name. Format by type: Text='string', Number=123, SingleSelect='Option', MultiSelect=['A','B'], DateTime=timestamp_ms, User=[{id:'ou_xxx'}], URL={text:'Display',link:'https://...'}" })
2244
2235
  });
2245
2236
  const CreateAppSchema = Type.Object({
2246
2237
  name: Type.String({ description: "Name for the new Bitable application" }),
@@ -2254,13 +2245,13 @@ const CreateFieldSchema = Type.Object({
2254
2245
  description: "Field type ID: 1=Text, 2=Number, 3=SingleSelect, 4=MultiSelect, 5=DateTime, 7=Checkbox, 11=User, 13=Phone, 15=URL, 17=Attachment, 18=SingleLink, 19=Lookup, 20=Formula, 21=DuplexLink, 22=Location, 23=GroupChat, 1001=CreatedTime, 1002=ModifiedTime, 1003=CreatedUser, 1004=ModifiedUser, 1005=AutoNumber",
2255
2246
  minimum: 1
2256
2247
  }),
2257
- property: Type.Optional(Type.Record(Type.String(), Type.Any(), { description: "Field-specific properties (e.g., options for SingleSelect, format for Number)" }))
2248
+ property: Type.Optional(Type.Record(Type.String(), BitableFieldValueSchema, { description: "Field-specific properties (e.g., options for SingleSelect, format for Number)" }))
2258
2249
  });
2259
2250
  const UpdateRecordSchema = Type.Object({
2260
2251
  app_token: Type.String({ description: "Bitable app token (use feishu_bitable_get_meta to get from URL)" }),
2261
2252
  table_id: Type.String({ description: "Table ID (from URL: ?table=YYY)" }),
2262
2253
  record_id: Type.String({ description: "Record ID to update" }),
2263
- fields: Type.Record(Type.String(), Type.Any(), { description: "Field values to update (same format as create_record)" })
2254
+ fields: Type.Record(Type.String(), BitableFieldValueSchema, { description: "Field values to update (same format as create_record)" })
2264
2255
  });
2265
2256
  function registerFeishuBitableTools(api) {
2266
2257
  if (!api.config) return;
@@ -2284,12 +2275,12 @@ function registerFeishuBitableTools(api) {
2284
2275
  parameters: params.parameters,
2285
2276
  async execute(_toolCallId, rawParams) {
2286
2277
  try {
2287
- return json(await params.execute({
2278
+ return jsonResult(await params.execute({
2288
2279
  params: rawParams,
2289
2280
  defaultAccountId: ctx.agentAccountId
2290
2281
  }));
2291
2282
  } catch (err) {
2292
- return json({ error: formatErrorMessage(err) });
2283
+ return jsonResult({ error: formatErrorMessage(err) });
2293
2284
  }
2294
2285
  }
2295
2286
  }), { name: params.name });
@@ -1,3 +1,4 @@
1
+ import { t as readFeishuJsonResponse } from "./json-response-CheljwGr.js";
1
2
  import { finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number-runtime";
2
3
  import { sleep } from "openclaw/plugin-sdk/runtime-env";
3
4
  import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
@@ -19,7 +20,7 @@ const DEFAULT_REGISTRATION_EXPIRE_SECONDS = 600;
19
20
  function accountsBaseUrl(domain) {
20
21
  return domain === "lark" ? LARK_ACCOUNTS_URL : FEISHU_ACCOUNTS_URL;
21
22
  }
22
- async function postRegistration(baseUrl, body) {
23
+ async function postRegistration(baseUrl, body, options) {
23
24
  return await fetchFeishuJson({
24
25
  url: `${baseUrl}${REGISTRATION_PATH}`,
25
26
  init: {
@@ -28,18 +29,22 @@ async function postRegistration(baseUrl, body) {
28
29
  body: new URLSearchParams(body).toString(),
29
30
  signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
30
31
  },
31
- auditContext: "feishu.app-registration.post"
32
+ auditContext: "feishu.app-registration.post",
33
+ fetchImpl: options?.fetchImpl,
34
+ lookupFn: options?.lookupFn
32
35
  });
33
36
  }
34
37
  async function fetchFeishuJson(params) {
35
38
  const { response, release } = await fetchWithSsrFGuard({
36
39
  url: params.url,
37
40
  init: params.init,
41
+ fetchImpl: params.fetchImpl,
42
+ lookupFn: params.lookupFn,
38
43
  policy: { allowedHostnames: [new URL(params.url).hostname] },
39
44
  auditContext: params.auditContext
40
45
  });
41
46
  try {
42
- return await response.json();
47
+ return await readFeishuJsonResponse(response);
43
48
  } finally {
44
49
  await release();
45
50
  }
@@ -50,20 +55,20 @@ async function fetchFeishuJson(params) {
50
55
  *
51
56
  * @throws If the environment does not support `client_secret`.
52
57
  */
53
- async function initAppRegistration(domain = "feishu") {
54
- if (!(await postRegistration(accountsBaseUrl(domain), { action: "init" })).supported_auth_methods?.includes("client_secret")) throw new Error("Current environment does not support client_secret auth method");
58
+ async function initAppRegistration(domain = "feishu", options) {
59
+ if (!(await postRegistration(accountsBaseUrl(domain), { action: "init" }, options)).supported_auth_methods?.includes("client_secret")) throw new Error("Current environment does not support client_secret auth method");
55
60
  }
56
61
  /**
57
62
  * Step 2: Begin the device-code flow. Returns a device code and a QR URL
58
63
  * that the user should scan with Feishu/Lark mobile app.
59
64
  */
60
- async function beginAppRegistration(domain = "feishu") {
65
+ async function beginAppRegistration(domain = "feishu", options) {
61
66
  const res = await postRegistration(accountsBaseUrl(domain), {
62
67
  action: "begin",
63
68
  archetype: "PersonalAgent",
64
69
  auth_method: "client_secret",
65
70
  request_user_info: "open_id"
66
- });
71
+ }, options);
67
72
  const qrUrl = new URL(res.verification_uri_complete);
68
73
  qrUrl.searchParams.set("from", "oc_onboard");
69
74
  qrUrl.searchParams.set("tp", "ob_cli_app");
@@ -81,7 +86,7 @@ async function beginAppRegistration(domain = "feishu") {
81
86
  * detected as "lark".
82
87
  */
83
88
  async function pollAppRegistration(params) {
84
- const { deviceCode, expireIn, initialDomain = "feishu", abortSignal, tp } = params;
89
+ const { deviceCode, expireIn, initialDomain = "feishu", abortSignal, tp, fetchImpl, lookupFn } = params;
85
90
  let currentInterval = params.interval;
86
91
  let domain = initialDomain;
87
92
  let domainSwitched = false;
@@ -96,6 +101,9 @@ async function pollAppRegistration(params) {
96
101
  action: "poll",
97
102
  device_code: deviceCode,
98
103
  ...tp ? { tp } : {}
104
+ }, {
105
+ fetchImpl,
106
+ lookupFn
99
107
  });
100
108
  } catch {
101
109
  await sleepRegistrationPollInterval(currentInterval);
@@ -159,7 +167,9 @@ async function getAppOwnerOpenId(params) {
159
167
  }),
160
168
  signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
161
169
  },
162
- auditContext: "feishu.app-registration.owner-token"
170
+ auditContext: "feishu.app-registration.owner-token",
171
+ fetchImpl: params.fetchImpl,
172
+ lookupFn: params.lookupFn
163
173
  });
164
174
  if (!tokenData.tenant_access_token) return;
165
175
  const appData = await fetchFeishuJson({
@@ -172,7 +182,9 @@ async function getAppOwnerOpenId(params) {
172
182
  },
173
183
  signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
174
184
  },
175
- auditContext: "feishu.app-registration.owner-app"
185
+ auditContext: "feishu.app-registration.owner-app",
186
+ fetchImpl: params.fetchImpl,
187
+ lookupFn: params.lookupFn
176
188
  });
177
189
  if (appData.code !== 0) return;
178
190
  const app = appData.data?.app;
@@ -1,11 +1,11 @@
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-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
9
  import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
10
10
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
11
11
  import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
@@ -16,16 +16,16 @@ import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing
16
16
  import { createAllowlistProviderGroupPolicyWarningCollector, projectConfigAccountIdWarningCollector } from "openclaw/plugin-sdk/channel-policy";
17
17
  import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime";
18
18
  import { createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter, listDirectoryGroupEntriesFromMapKeysAndAllowFrom, listDirectoryUserEntriesFromAllowFromAndMapKeys } from "openclaw/plugin-sdk/directory-runtime";
19
- import { normalizeMessagePresentation, renderMessagePresentationFallbackText } from "openclaw/plugin-sdk/interactive-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
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";
@@ -1220,36 +1220,35 @@ function buildFeishuPresentationCard(params) {
1220
1220
  //#endregion
1221
1221
  //#region extensions/feishu/src/session-route.ts
1222
1222
  function resolveFeishuOutboundSessionRoute(params) {
1223
- let trimmed = stripChannelTargetPrefix(params.target, "feishu", "lark");
1224
- if (!trimmed) return null;
1225
- const lower = normalizeLowercaseStringOrEmpty(trimmed);
1226
- let isGroup = false;
1227
- let typeExplicit = false;
1228
- if (lower.startsWith("group:") || lower.startsWith("chat:") || lower.startsWith("channel:")) {
1229
- trimmed = trimmed.replace(/^(group|chat|channel):/i, "").trim();
1230
- isGroup = true;
1231
- typeExplicit = true;
1232
- } else if (lower.startsWith("user:") || lower.startsWith("dm:")) {
1233
- trimmed = trimmed.replace(/^(user|dm):/i, "").trim();
1234
- isGroup = false;
1235
- typeExplicit = true;
1236
- }
1237
- if (!typeExplicit) {
1238
- const idLower = normalizeLowercaseStringOrEmpty(trimmed);
1239
- if (idLower.startsWith("ou_") || idLower.startsWith("on_")) isGroup = false;
1240
- }
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_");
1241
1239
  return buildChannelOutboundSessionRoute({
1242
1240
  cfg: params.cfg,
1243
1241
  agentId: params.agentId,
1244
1242
  channel: "feishu",
1245
1243
  accountId: params.accountId,
1244
+ recipientSessionExact,
1246
1245
  peer: {
1247
1246
  kind: isGroup ? "group" : "direct",
1248
- id: trimmed
1247
+ id: target
1249
1248
  },
1250
1249
  chatType: isGroup ? "group" : "direct",
1251
- from: isGroup ? `feishu:group:${trimmed}` : `feishu:${trimmed}`,
1252
- to: trimmed
1250
+ from: isGroup ? `feishu:group:${target}` : `feishu:${target}`,
1251
+ to: target
1253
1252
  });
1254
1253
  }
1255
1254
  //#endregion
@@ -1428,7 +1427,7 @@ function applyNewAppSecurityPolicy(cfg, accountId, openId, groupPolicy) {
1428
1427
  next = patchFeishuConfig(next, accountId, groupPatch);
1429
1428
  return next;
1430
1429
  }
1431
- const loadAppRegistrationModule = createLazyRuntimeModule(() => import("./app-registration-DuEyfVY1.js"));
1430
+ const loadAppRegistrationModule = createLazyRuntimeModule(() => import("./app-registration-BwQ-aGTe.js"));
1432
1431
  async function promptFeishuDomain(params) {
1433
1432
  return await params.prompter.select({
1434
1433
  message: t("wizard.feishu.domainPrompt"),
@@ -1728,7 +1727,7 @@ const meta = {
1728
1727
  order: 70,
1729
1728
  preferSessionLookupForAnnounceTarget: true
1730
1729
  };
1731
- const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-C6SITclp.js"), "feishuChannelRuntime");
1730
+ const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-COT2fcCf.js"), "feishuChannelRuntime");
1732
1731
  function toFeishuMessageSendResult(result, kind) {
1733
1732
  const receipt = result.receipt ?? createFeishuSendReceipt({
1734
1733
  messageId: result.messageId,
@@ -1750,12 +1749,24 @@ const feishuMessageAdapter = defineChannelMessageAdapter({
1750
1749
  text: async (ctx) => {
1751
1750
  const sendText = (await loadFeishuChannelRuntime()).feishuOutbound.sendText;
1752
1751
  if (!sendText) throw new Error("Feishu text sending is not available.");
1753
- 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");
1754
1759
  },
1755
1760
  media: async (ctx) => {
1756
1761
  const sendMedia = (await loadFeishuChannelRuntime()).feishuOutbound.sendMedia;
1757
1762
  if (!sendMedia) throw new Error("Feishu media sending is not available.");
1758
- 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");
1759
1770
  }
1760
1771
  }
1761
1772
  });
@@ -1787,7 +1798,7 @@ function describeFeishuMessageTool({ cfg, accountId }) {
1787
1798
  actions: [],
1788
1799
  capabilities: enabled ? ["presentation"] : []
1789
1800
  };
1790
- const actions = new Set([
1801
+ const actions = /* @__PURE__ */ new Set([
1791
1802
  "send",
1792
1803
  "read",
1793
1804
  "edit",
@@ -1966,6 +1977,15 @@ function readFirstString(params, keys, fallback) {
1966
1977
  }
1967
1978
  if (typeof fallback === "string" && fallback.trim()) return fallback.trim();
1968
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
+ }
1969
1989
  function readOptionalPositiveInteger(params, keys) {
1970
1990
  for (const key of keys) {
1971
1991
  const parsed = parseStrictPositiveInteger(params[key]);
@@ -2127,14 +2147,19 @@ const feishuPlugin = createChatChannelPlugin({
2127
2147
  if (!to) throw new Error(`Feishu ${ctx.action} requires a target (to).`);
2128
2148
  const { replyToMessageId, replyInThread } = buildFeishuSendReplyAnchor(ctx);
2129
2149
  if (ctx.action === "thread-reply" && !replyToMessageId) throw new Error("Feishu thread-reply requires messageId.");
2130
- const presentation = normalizeMessagePresentation(ctx.params.presentation);
2131
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);
2132
2154
  const mediaUrl = readFeishuMediaParam(ctx.params);
2133
2155
  const audioAsVoice = readBooleanParam(ctx.params, ["asVoice", "audioAsVoice"]);
2134
2156
  const card = presentation ? buildFeishuPresentationCard({
2135
2157
  presentation,
2136
- fallbackText: text
2137
- }) : void 0;
2158
+ fallbackText: textCard ? void 0 : resolveInteractiveTextFallback({
2159
+ text,
2160
+ interactive
2161
+ })
2162
+ }) : textCard;
2138
2163
  if (card && mediaUrl) throw new Error(`Feishu ${ctx.action} does not support card with media.`);
2139
2164
  if (!card && !text && !mediaUrl) throw new Error(`Feishu ${ctx.action} requires text/message, media, or card.`);
2140
2165
  const runtime = await loadFeishuChannelRuntime();
@@ -2544,7 +2569,7 @@ const feishuPlugin = createChatChannelPlugin({
2544
2569
  })
2545
2570
  }),
2546
2571
  gateway: { startAccount: async (ctx) => {
2547
- const { monitorFeishuProvider } = await import("./monitor-Ckch4qvr.js");
2572
+ const { monitorFeishuProvider } = await import("./monitor-5gbbXIO-.js");
2548
2573
  const account = resolveFeishuRuntimeAccount({
2549
2574
  cfg: ctx.cfg,
2550
2575
  accountId: ctx.accountId
@@ -2593,6 +2618,7 @@ const feishuPlugin = createChatChannelPlugin({
2593
2618
  chunker: chunkTextForOutbound,
2594
2619
  chunkerMode: "markdown",
2595
2620
  textChunkLimit: 4e3,
2621
+ sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text),
2596
2622
  presentationCapabilities: {
2597
2623
  supported: true,
2598
2624
  buttons: true,
@@ -1,2 +1,2 @@
1
- import { t as feishuPlugin } from "./channel-Bwm5rvHg.js";
1
+ import { t as feishuPlugin } from "./channel-DwCydAeD.js";
2
2
  export { feishuPlugin };