@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,10 +1,10 @@
1
- import { d as isRecord$1, h as requestFeishuApi, s as resolveFeishuRuntimeAccount } from "./accounts-Cfzht2Hc.js";
1
+ import { d as isRecord$1, h as requestFeishuApi, s as resolveFeishuRuntimeAccount } from "./accounts-Bs5uJ4h0.js";
2
2
  import { i as resolveReceiveIdType, r as normalizeFeishuTarget } from "./targets-BUjQ1TcA.js";
3
- import { i as toFeishuSendResult, r as resolveFeishuReceiptKind, t as assertFeishuMessageApiSuccess } from "./send-result-DSsIa4-p.js";
3
+ import { i as toFeishuSendResult, o as resolveFeishuCardTemplate, r as resolveFeishuReceiptKind, t as assertFeishuMessageApiSuccess } from "./send-result-BMQw-YhV.js";
4
4
  import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.js";
5
5
  import { r as createFeishuClient } from "./client-BwgAJuvo.js";
6
6
  import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
7
- import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
+ import { isRecord, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { convertMarkdownTables } from "openclaw/plugin-sdk/text-chunking";
9
9
  import fs from "node:fs";
10
10
  import path from "node:path";
@@ -73,7 +73,7 @@ const FEISHU_MEDIA_HTTP_TIMEOUT_MS = 12e4;
73
73
  const FEISHU_VOICE_FILE_NAME = "voice.ogg";
74
74
  const FEISHU_VOICE_SAMPLE_RATE_HZ = 48e3;
75
75
  const FEISHU_VOICE_BITRATE = "64k";
76
- const FEISHU_TRANSCODABLE_AUDIO_EXTS = new Set([
76
+ const FEISHU_TRANSCODABLE_AUDIO_EXTS = /* @__PURE__ */ new Set([
77
77
  ".aac",
78
78
  ".aiff",
79
79
  ".alac",
@@ -501,12 +501,14 @@ async function prepareFeishuVoiceMedia(params) {
501
501
  return params;
502
502
  }
503
503
  }
504
- async function probeAudioDurationMs(buffer) {
504
+ async function probeMediaDurationMs(params) {
505
505
  try {
506
506
  return await withTempWorkspace({
507
507
  rootDir: resolvePreferredOpenClawTmpDir(),
508
- prefix: "feishu-audio-probe-"
508
+ prefix: "feishu-media-probe-"
509
509
  }, async (workspace) => {
510
+ const ext = normalizeLowercaseStringOrEmpty(path.extname(params.fileName));
511
+ const inferredExt = ext && ext.length <= 12 ? ext : mediaKindFromMime(params.contentType) === "video" ? ".mp4" : ".ogg";
510
512
  const stdout = await runFfprobe([
511
513
  "-v",
512
514
  "error",
@@ -514,17 +516,21 @@ async function probeAudioDurationMs(buffer) {
514
516
  "format=duration",
515
517
  "-of",
516
518
  "csv=p=0",
517
- await workspace.write("input.ogg", buffer)
519
+ await workspace.write(`input${inferredExt}`, params.buffer)
518
520
  ], { timeoutMs: 5e3 });
519
521
  const seconds = Number.parseFloat(stdout.trim());
520
522
  if (!Number.isFinite(seconds) || seconds <= 0) return;
521
523
  return Math.max(1, Math.round(seconds * 1e3));
522
524
  });
523
525
  } catch (err) {
524
- console.warn("[feishu] failed to probe audio duration; voice bubble will omit it:", err);
526
+ console.warn("[feishu] failed to probe media duration; upload will omit it:", err);
525
527
  return;
526
528
  }
527
529
  }
530
+ async function maybeProbeUploadDurationMs(params) {
531
+ if (params.msgType !== "audio" && params.msgType !== "media") return;
532
+ return await probeMediaDurationMs(params);
533
+ }
528
534
  /**
529
535
  * Upload and send media (image or file) from URL, local path, or buffer.
530
536
  * When mediaUrl is a local path, mediaLocalRoots (from core outbound context)
@@ -586,7 +592,12 @@ async function sendMediaFeishu(params) {
586
592
  ...voiceIntentDegradedToFile ? { voiceIntentDegradedToFile: true } : {}
587
593
  };
588
594
  }
589
- const durationMs = routing.msgType === "audio" ? await probeAudioDurationMs(buffer) : void 0;
595
+ const durationMs = await maybeProbeUploadDurationMs({
596
+ buffer,
597
+ fileName: name,
598
+ contentType,
599
+ msgType: routing.msgType
600
+ });
590
601
  const { fileKey } = await uploadFileFeishu({
591
602
  cfg,
592
603
  file: buffer,
@@ -630,7 +641,7 @@ function isFeishuBroadcastMention(mention) {
630
641
  function extractMentionTargets(event, botOpenId) {
631
642
  return (event.message.mentions ?? []).filter((m) => {
632
643
  if (isFeishuBroadcastMention(m)) return false;
633
- if (botOpenId && m.id.open_id === botOpenId) return false;
644
+ if (m.id.open_id === botOpenId) return false;
634
645
  return Boolean(m.id.open_id);
635
646
  }).map((m) => ({
636
647
  openId: m.id.open_id,
@@ -647,11 +658,13 @@ function extractMentionTargets(event, botOpenId) {
647
658
  function isMentionForwardRequest(event, botOpenId) {
648
659
  const mentions = event.message.mentions ?? [];
649
660
  if (mentions.length === 0) return false;
661
+ const normalizedBotOpenId = botOpenId?.trim();
662
+ if (!normalizedBotOpenId) return false;
650
663
  const isDirectMessage = !isFeishuGroupChatType(event.message.chat_type);
651
664
  const userMentions = mentions.filter((m) => !isFeishuBroadcastMention(m));
652
- const hasOtherMention = userMentions.some((m) => m.id.open_id !== botOpenId);
665
+ const hasOtherMention = userMentions.some((m) => m.id.open_id !== normalizedBotOpenId);
653
666
  if (isDirectMessage) return hasOtherMention;
654
- return userMentions.some((m) => m.id.open_id === botOpenId) && hasOtherMention;
667
+ return userMentions.some((m) => m.id.open_id === normalizedBotOpenId) && hasOtherMention;
655
668
  }
656
669
  /**
657
670
  * Format @mention for card message (lark_md)
@@ -723,7 +736,7 @@ function renderCodeBlockElement(element) {
723
736
  const code = (toStringOrEmpty(element.text) || toStringOrEmpty(element.content)).replace(/\r\n/g, "\n");
724
737
  return `\`\`\`${language}\n${code}${code.endsWith("\n") ? "" : "\n"}\`\`\``;
725
738
  }
726
- function renderElement(element, imageKeys, mediaKeys, mentionedOpenIds) {
739
+ function renderElement(element, imageKeys, mediaKeys, mentionedOpenIds, renderMediaPlaceholders) {
727
740
  if (!isRecord$1(element)) return escapeMarkdownText(toStringOrEmpty(element));
728
741
  switch (normalizeLowercaseStringOrEmpty(toStringOrEmpty(element.tag))) {
729
742
  case "text": return renderTextElement(element);
@@ -737,7 +750,7 @@ function renderElement(element, imageKeys, mediaKeys, mentionedOpenIds) {
737
750
  case "img": {
738
751
  const imageKey = normalizeFeishuExternalKey(toStringOrEmpty(element.image_key));
739
752
  if (imageKey) imageKeys.push(imageKey);
740
- return "![image]";
753
+ return renderMediaPlaceholders ? "![image]" : "";
741
754
  }
742
755
  case "media": {
743
756
  const fileKey = normalizeFeishuExternalKey(toStringOrEmpty(element.file_key));
@@ -748,7 +761,7 @@ function renderElement(element, imageKeys, mediaKeys, mentionedOpenIds) {
748
761
  fileName
749
762
  });
750
763
  }
751
- return "[media]";
764
+ return renderMediaPlaceholders ? "[media]" : "";
752
765
  }
753
766
  case "emotion": return renderEmotionElement(element);
754
767
  case "md":
@@ -789,7 +802,7 @@ function resolvePostPayload(parsed) {
789
802
  if (wrappedPost) return wrappedPost;
790
803
  return resolveLocalePayload(parsed);
791
804
  }
792
- function parsePostContent(content) {
805
+ function parsePostContent(content, options = {}) {
793
806
  try {
794
807
  const payload = resolvePostPayload(JSON.parse(content));
795
808
  if (!payload) return {
@@ -805,11 +818,11 @@ function parsePostContent(content) {
805
818
  for (const paragraph of payload.content) {
806
819
  if (!Array.isArray(paragraph)) continue;
807
820
  let renderedParagraph = "";
808
- for (const element of paragraph) renderedParagraph += renderElement(element, imageKeys, mediaKeys, mentionedOpenIds);
821
+ for (const element of paragraph) renderedParagraph += renderElement(element, imageKeys, mediaKeys, mentionedOpenIds, options.renderMediaPlaceholders !== false);
809
822
  paragraphs.push(renderedParagraph);
810
823
  }
811
824
  return {
812
- textContent: [escapeMarkdownText(payload.title.trim()), paragraphs.join("\n").trim()].filter(Boolean).join("\n\n").trim() || FALLBACK_POST_TEXT,
825
+ textContent: [escapeMarkdownText(payload.title.trim()), paragraphs.join("\n").trim()].filter(Boolean).join("\n\n").trim() || (options.emptyTextFallback ?? FALLBACK_POST_TEXT),
813
826
  imageKeys,
814
827
  mediaKeys,
815
828
  mentionedOpenIds
@@ -825,24 +838,9 @@ function parsePostContent(content) {
825
838
  }
826
839
  //#endregion
827
840
  //#region extensions/feishu/src/send.ts
828
- const WITHDRAWN_REPLY_ERROR_CODES = new Set([230011, 231003]);
841
+ const WITHDRAWN_REPLY_ERROR_CODES = /* @__PURE__ */ new Set([230011, 231003]);
829
842
  const INTERACTIVE_CARD_FALLBACK_TEXT = "[Interactive Card]";
830
843
  const POST_FALLBACK_TEXT = "[Rich text message]";
831
- const FEISHU_CARD_TEMPLATES = new Set([
832
- "blue",
833
- "green",
834
- "red",
835
- "orange",
836
- "purple",
837
- "indigo",
838
- "wathet",
839
- "turquoise",
840
- "yellow",
841
- "grey",
842
- "carmine",
843
- "violet",
844
- "lime"
845
- ]);
846
844
  function shouldFallbackFromReplyTarget(response) {
847
845
  if (response.code !== void 0 && WITHDRAWN_REPLY_ERROR_CODES.has(response.code)) return true;
848
846
  const msg = normalizeLowercaseStringOrEmpty(response.msg);
@@ -1191,11 +1189,6 @@ function buildMarkdownCard(text) {
1191
1189
  }] }
1192
1190
  };
1193
1191
  }
1194
- function resolveFeishuCardTemplate(template) {
1195
- const normalized = normalizeOptionalLowercaseString(template);
1196
- if (!normalized || !FEISHU_CARD_TEMPLATES.has(normalized)) return;
1197
- return normalized;
1198
- }
1199
1192
  /**
1200
1193
  * Build a Feishu interactive card with optional header and note footer.
1201
1194
  * When header/note are omitted, behaves identically to buildMarkdownCard.
@@ -1265,4 +1258,4 @@ async function sendMarkdownCardFeishu(params) {
1265
1258
  });
1266
1259
  }
1267
1260
  //#endregion
1268
- export { normalizeFeishuExternalKey as _, sendCardFeishu as a, sendStructuredCardFeishu as c, isFeishuBroadcastMention as d, isMentionForwardRequest as f, shouldSuppressFeishuTextForVoiceMedia as g, sendMediaFeishu as h, resolveFeishuCardTemplate as i, parsePostContent as l, saveMessageResourceFeishu as m, getMessageFeishu as n, sendMarkdownCardFeishu as o, isFeishuGroupChatType as p, listFeishuThreadMessages as r, sendMessageFeishu as s, editMessageFeishu as t, extractMentionTargets as u, resolveFeishuIdentityEmoji as v, resolveFeishuIdentityHeaderTitle as y };
1261
+ export { resolveFeishuIdentityEmoji as _, sendMarkdownCardFeishu as a, parsePostContent as c, isMentionForwardRequest as d, isFeishuGroupChatType as f, normalizeFeishuExternalKey as g, shouldSuppressFeishuTextForVoiceMedia as h, sendCardFeishu as i, extractMentionTargets as l, sendMediaFeishu as m, getMessageFeishu as n, sendMessageFeishu as o, saveMessageResourceFeishu as p, listFeishuThreadMessages as r, sendStructuredCardFeishu as s, editMessageFeishu as t, isFeishuBroadcastMention as u, resolveFeishuIdentityHeaderTitle as v };
@@ -0,0 +1,287 @@
1
+ import { d as isRecord$1 } from "./accounts-Bs5uJ4h0.js";
2
+ import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
3
+ import { isRecord, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
+ //#region extensions/feishu/src/card-interaction.ts
5
+ const FEISHU_CARD_INTERACTION_VERSION = "ocf1";
6
+ function isInteractionKind(value) {
7
+ return value === "button" || value === "quick" || value === "meta";
8
+ }
9
+ function isMetadataValue(value) {
10
+ return value === null || value === void 0 || typeof value === "string" || typeof value === "number" || typeof value === "boolean";
11
+ }
12
+ function createFeishuCardInteractionEnvelope(envelope) {
13
+ return {
14
+ oc: FEISHU_CARD_INTERACTION_VERSION,
15
+ ...envelope
16
+ };
17
+ }
18
+ function buildFeishuCardActionTextFallback(event) {
19
+ const actionValue = event.action.value;
20
+ if (isRecord$1(actionValue)) {
21
+ if (typeof actionValue.text === "string") return actionValue.text;
22
+ if (typeof actionValue.command === "string") return actionValue.command;
23
+ return JSON.stringify(actionValue);
24
+ }
25
+ return String(actionValue);
26
+ }
27
+ function decodeFeishuCardAction(params) {
28
+ const { event, now = Date.now() } = params;
29
+ const actionValue = event.action.value;
30
+ if (!isRecord$1(actionValue) || actionValue.oc !== "ocf1") return {
31
+ kind: "legacy",
32
+ text: buildFeishuCardActionTextFallback(event)
33
+ };
34
+ if (!isInteractionKind(actionValue.k) || typeof actionValue.a !== "string" || !actionValue.a) return {
35
+ kind: "invalid",
36
+ reason: "malformed"
37
+ };
38
+ if (actionValue.q !== void 0 && typeof actionValue.q !== "string") return {
39
+ kind: "invalid",
40
+ reason: "malformed"
41
+ };
42
+ if (actionValue.m !== void 0) {
43
+ if (!isRecord$1(actionValue.m)) return {
44
+ kind: "invalid",
45
+ reason: "malformed"
46
+ };
47
+ for (const value of Object.values(actionValue.m)) if (!isMetadataValue(value)) return {
48
+ kind: "invalid",
49
+ reason: "malformed"
50
+ };
51
+ }
52
+ if (actionValue.c !== void 0) {
53
+ if (!isRecord$1(actionValue.c)) return {
54
+ kind: "invalid",
55
+ reason: "malformed"
56
+ };
57
+ if (actionValue.c.u !== void 0 && typeof actionValue.c.u !== "string") return {
58
+ kind: "invalid",
59
+ reason: "malformed"
60
+ };
61
+ if (actionValue.c.h !== void 0 && typeof actionValue.c.h !== "string") return {
62
+ kind: "invalid",
63
+ reason: "malformed"
64
+ };
65
+ if (actionValue.c.s !== void 0 && typeof actionValue.c.s !== "string") return {
66
+ kind: "invalid",
67
+ reason: "malformed"
68
+ };
69
+ if (actionValue.c.e !== void 0 && !Number.isFinite(actionValue.c.e)) return {
70
+ kind: "invalid",
71
+ reason: "malformed"
72
+ };
73
+ if (actionValue.c.t !== void 0 && actionValue.c.t !== "p2p" && actionValue.c.t !== "group") return {
74
+ kind: "invalid",
75
+ reason: "malformed"
76
+ };
77
+ if (typeof actionValue.c.e === "number" && actionValue.c.e < now) return {
78
+ kind: "invalid",
79
+ reason: "stale"
80
+ };
81
+ const expectedUser = actionValue.c.u?.trim();
82
+ if (expectedUser && expectedUser !== (event.operator.open_id ?? "").trim()) return {
83
+ kind: "invalid",
84
+ reason: "wrong_user"
85
+ };
86
+ const expectedChat = actionValue.c.h?.trim();
87
+ if (expectedChat && expectedChat !== (event.context.chat_id ?? "").trim()) return {
88
+ kind: "invalid",
89
+ reason: "wrong_conversation"
90
+ };
91
+ }
92
+ return {
93
+ kind: "structured",
94
+ envelope: actionValue
95
+ };
96
+ }
97
+ //#endregion
98
+ //#region extensions/feishu/src/native-card.ts
99
+ const FEISHU_CARD_TEMPLATES = /* @__PURE__ */ new Set([
100
+ "blue",
101
+ "green",
102
+ "red",
103
+ "orange",
104
+ "purple",
105
+ "indigo",
106
+ "wathet",
107
+ "turquoise",
108
+ "yellow",
109
+ "grey",
110
+ "carmine",
111
+ "violet",
112
+ "lime"
113
+ ]);
114
+ function resolveFeishuCardTemplate(template) {
115
+ const normalized = normalizeOptionalLowercaseString(template);
116
+ if (!normalized || !FEISHU_CARD_TEMPLATES.has(normalized)) return;
117
+ return normalized;
118
+ }
119
+ function escapeFeishuCardMarkdownText(text) {
120
+ return text.replace(/[&<>]/g, (char) => {
121
+ switch (char) {
122
+ case "&": return "&amp;";
123
+ case "<": return "&lt;";
124
+ case ">": return "&gt;";
125
+ default: return char;
126
+ }
127
+ });
128
+ }
129
+ function escapeFeishuCardPlainText(text) {
130
+ return escapeFeishuCardMarkdownText(text).replace(/([\\`*_{}[\]()#+\-!|>~])/g, "\\$1");
131
+ }
132
+ function resolveSafeFeishuButtonUrl(url) {
133
+ const trimmed = typeof url === "string" ? url.trim() : "";
134
+ if (!trimmed) return;
135
+ try {
136
+ const parsed = new URL(trimmed);
137
+ return parsed.protocol === "https:" || parsed.protocol === "http:" ? trimmed : void 0;
138
+ } catch {
139
+ return;
140
+ }
141
+ }
142
+ function sanitizeNativeFeishuButtonBehavior(behavior) {
143
+ if (!isRecord(behavior)) return;
144
+ if (behavior.type === "open_url") {
145
+ const safeUrl = resolveSafeFeishuButtonUrl(behavior.default_url) ?? resolveSafeFeishuButtonUrl(behavior.url);
146
+ return safeUrl ? {
147
+ type: "open_url",
148
+ default_url: safeUrl
149
+ } : void 0;
150
+ }
151
+ if (behavior.type === "callback" && isRecord(behavior.value) && behavior.value.oc === "ocf1") return {
152
+ type: "callback",
153
+ value: behavior.value
154
+ };
155
+ }
156
+ function sanitizeNativeFeishuCardButton(button) {
157
+ if (!isRecord(button)) return;
158
+ const text = isRecord(button.text) && typeof button.text.content === "string" ? button.text.content : void 0;
159
+ if (!text?.trim()) return;
160
+ const style = button.type === "danger" ? "danger" : button.type === "primary" || button.type === "success" ? "primary" : void 0;
161
+ const behaviors = Array.isArray(button.behaviors) ? button.behaviors.map((behavior) => sanitizeNativeFeishuButtonBehavior(behavior)).filter((behavior) => Boolean(behavior)) : [];
162
+ const rootSafeUrl = resolveSafeFeishuButtonUrl(button.url);
163
+ if (rootSafeUrl) behaviors.push({
164
+ type: "open_url",
165
+ default_url: rootSafeUrl
166
+ });
167
+ if (isRecord(button.value) && button.value.oc === "ocf1") behaviors.push({
168
+ type: "callback",
169
+ value: button.value
170
+ });
171
+ if (behaviors.length === 0) return;
172
+ return {
173
+ tag: "button",
174
+ text: {
175
+ tag: "plain_text",
176
+ content: text
177
+ },
178
+ type: style === "danger" ? "danger" : style === "primary" ? "primary" : "default",
179
+ behaviors
180
+ };
181
+ }
182
+ function sanitizeNativeFeishuCardElements(element) {
183
+ if (!isRecord(element) || typeof element.tag !== "string") return [];
184
+ if (element.tag === "hr") return [{ tag: "hr" }];
185
+ if (element.tag === "markdown" && typeof element.content === "string") return [{
186
+ tag: "markdown",
187
+ content: escapeFeishuCardMarkdownText(element.content)
188
+ }];
189
+ if (element.tag === "div" && isRecord(element.text)) {
190
+ const text = element.text;
191
+ if (text.tag === "lark_md" && typeof text.content === "string") return [{
192
+ tag: "markdown",
193
+ content: escapeFeishuCardMarkdownText(text.content)
194
+ }];
195
+ if (text.tag === "plain_text" && typeof text.content === "string") return [{
196
+ tag: "markdown",
197
+ content: escapeFeishuCardPlainText(text.content)
198
+ }];
199
+ return [];
200
+ }
201
+ if (element.tag === "button") {
202
+ const button = sanitizeNativeFeishuCardButton(element);
203
+ return button ? [button] : [];
204
+ }
205
+ if (element.tag === "action" && Array.isArray(element.actions)) return element.actions.map((action) => sanitizeNativeFeishuCardButton(action)).filter((action) => Boolean(action));
206
+ return [];
207
+ }
208
+ function sanitizeNativeFeishuCard(card) {
209
+ const normalizedCard = card.type === "interactive" && isRecord(card.card) ? card.card : card;
210
+ const body = isRecord(normalizedCard.body) ? normalizedCard.body : void 0;
211
+ const elements = (Array.isArray(body?.elements) ? body.elements : Array.isArray(normalizedCard.elements) ? normalizedCard.elements : []).flatMap((element) => sanitizeNativeFeishuCardElements(element)).filter((element) => Boolean(element));
212
+ if (elements.length === 0) return;
213
+ const header = isRecord(normalizedCard.header) ? normalizedCard.header : void 0;
214
+ const title = isRecord(header?.title) && typeof header.title.content === "string" ? header.title.content : void 0;
215
+ return {
216
+ schema: "2.0",
217
+ config: { width_mode: "fill" },
218
+ ...title?.trim() ? { header: {
219
+ title: {
220
+ tag: "plain_text",
221
+ content: title
222
+ },
223
+ template: resolveFeishuCardTemplate(typeof header?.template === "string" ? header.template : void 0) ?? "blue"
224
+ } } : {},
225
+ body: { elements }
226
+ };
227
+ }
228
+ function readNativeFeishuCardJson(text, options) {
229
+ let trimmed = text?.trim();
230
+ const responsePrefix = options?.responsePrefix;
231
+ if (trimmed && responsePrefix && trimmed.startsWith(responsePrefix)) {
232
+ const suffix = trimmed.slice(responsePrefix.length);
233
+ if (/^\s+\{/.test(suffix)) trimmed = suffix.trimStart();
234
+ }
235
+ if (!trimmed?.startsWith("{") || !trimmed.endsWith("}")) return;
236
+ try {
237
+ const parsed = JSON.parse(trimmed);
238
+ return isRecord(parsed) ? sanitizeNativeFeishuCard(parsed) : void 0;
239
+ } catch {
240
+ return;
241
+ }
242
+ }
243
+ //#endregion
244
+ //#region extensions/feishu/src/send-result.ts
245
+ function resolveFeishuReceiptKind(msgType) {
246
+ switch (msgType) {
247
+ case "audio": return "voice";
248
+ case "image":
249
+ case "media":
250
+ case "file": return "media";
251
+ case "interactive": return "card";
252
+ case "post":
253
+ case "text": return "text";
254
+ default: return "unknown";
255
+ }
256
+ }
257
+ function createFeishuSendReceipt(params) {
258
+ const messageId = params.messageId?.trim();
259
+ const chatId = params.chatId.trim();
260
+ return createMessageReceiptFromOutboundResults({
261
+ results: messageId ? [{
262
+ channel: "feishu",
263
+ messageId,
264
+ chatId,
265
+ conversationId: chatId
266
+ }] : [],
267
+ ...chatId ? { threadId: chatId } : {},
268
+ kind: params.kind ?? "unknown"
269
+ });
270
+ }
271
+ function assertFeishuMessageApiSuccess(response, errorPrefix) {
272
+ if (response.code !== 0) throw new Error(`${errorPrefix}: ${response.msg || `code ${response.code}`}`);
273
+ }
274
+ function toFeishuSendResult(response, chatId, kind) {
275
+ const messageId = response.data?.message_id ?? "unknown";
276
+ return {
277
+ messageId,
278
+ chatId,
279
+ receipt: createFeishuSendReceipt({
280
+ messageId,
281
+ chatId,
282
+ kind
283
+ })
284
+ };
285
+ }
286
+ //#endregion
287
+ export { readNativeFeishuCardJson as a, FEISHU_CARD_INTERACTION_VERSION as c, decodeFeishuCardAction as d, toFeishuSendResult as i, buildFeishuCardActionTextFallback as l, createFeishuSendReceipt as n, resolveFeishuCardTemplate as o, resolveFeishuReceiptKind as r, sanitizeNativeFeishuCard as s, assertFeishuMessageApiSuccess as t, createFeishuCardInteractionEnvelope as u };
@@ -1,4 +1,4 @@
1
- import { r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
1
+ import { r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-CdLdoot3.js";
2
2
  //#region extensions/feishu/src/session-conversation.ts
3
3
  function resolveFeishuParentConversationCandidates(rawId) {
4
4
  const parsed = parseFeishuConversationId({ conversationId: rawId });
@@ -1,2 +1,2 @@
1
- import { t as resolveFeishuSessionConversation } from "./session-conversation-CZSMgac-.js";
1
+ import { t as resolveFeishuSessionConversation } from "./session-conversation-BYuoVJwl.js";
2
2
  export { resolveFeishuSessionConversation as resolveSessionConversation };
package/dist/setup-api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-C1Uun9zo.js";
1
+ import { i as feishuSetupAdapter, n as feishuSetupWizard, t as feishuPlugin } from "./channel-DwCydAeD.js";
2
2
  export { feishuPlugin, feishuSetupAdapter, feishuSetupWizard };
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { r as normalizeFeishuTarget } from "./targets-BUjQ1TcA.js";
3
- import { r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-DuL575sn.js";
3
+ import { r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-CdLdoot3.js";
4
4
  import { n as getFeishuThreadBindingManager } from "./thread-bindings-V0bwk0A1.js";
5
5
  import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  //#region extensions/feishu/src/subagent-hooks.ts
@@ -1,9 +1,6 @@
1
+ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
1
2
  //#region extensions/feishu/subagent-hooks-api.ts
2
- let feishuSubagentHooksPromise = null;
3
- function loadFeishuSubagentHooksModule() {
4
- feishuSubagentHooksPromise ??= import("./subagent-hooks-1pqt5tAA.js").then((n) => n.i);
5
- return feishuSubagentHooksPromise;
6
- }
3
+ const loadFeishuSubagentHooksModule = createLazyRuntimeModule(() => import("./subagent-hooks-B2iWPYJ1.js").then((n) => n.i));
7
4
  function registerFeishuSubagentHooks(api) {
8
5
  api.on("subagent_delivery_target", async (event) => {
9
6
  const { handleFeishuSubagentDeliveryTarget } = await loadFeishuSubagentHooksModule();
@@ -681,6 +681,38 @@ try {
681
681
  }
682
682
  ```
683
683
 
684
+ #### Custom scopes/events/callbacks (addons) and updating an existing app
685
+
686
+ When creating an app, use `addons` to **incrementally** request scopes, event subscriptions and callbacks on top of the platform base template. They are pre-filled into the confirm page shown after the user scans the QR code, and take effect once the user confirms:
687
+
688
+ ```typescript
689
+ // Create: incrementally request scopes/events/callbacks, and only allow
690
+ // creating a new app (selecting an existing app is disabled)
691
+ const result = await lark.registerApp({
692
+ addons: {
693
+ scopes: { tenant: ['im:message:send_as_bot'], user: ['calendar:calendar:read'] },
694
+ events: { items: { tenant: ['im.message.receive_v1'] } },
695
+ callbacks: { items: ['card.action.trigger'] },
696
+ },
697
+ createOnly: true,
698
+ onQRCodeReady(info) { /* ... */ },
699
+ });
700
+
701
+ // Update: pass the appId of an existing app to let the user re-scan and
702
+ // confirm, incrementally granting scopes to that app
703
+ await lark.registerApp({
704
+ appId: 'cli_xxx',
705
+ addons: { scopes: { tenant: ['drive:drive.metadata:readonly'] } },
706
+ onQRCodeReady(info) { /* ... */ },
707
+ });
708
+ ```
709
+
710
+ Notes:
711
+
712
+ - `addons` is **additive only**: items are merged on top of the base template; base permissions can never be removed.
713
+ - Only the 5 public config types (tenant/user scopes, tenant/user events, callbacks) are supported. Sensitive config (event subscription type and request URLs, `security.*`, encrypt keys, etc.) cannot travel via `addons` — use the [update application config OpenAPI](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v7/application-v7/application-config/patch) instead.
714
+ - The SDK only validates the shape, not the item names; names unknown to the platform catalog are silently ignored by the confirm page.
715
+
684
716
  #### `registerApp` parameters
685
717
 
686
718
  | Parameter | Description | Type | Required | Default |
@@ -695,6 +727,14 @@ try {
695
727
  | appPreset.avatar | App avatar URL(s). 1-6 URLs supported; the first one is selected by default. Allowed formats: png / jpg / jpeg / webp / gif (gif is sampled to a single frame, not animated) | string \| string[] | No | - |
696
728
  | appPreset.name | App name. Supports the `{user}` placeholder (replaced with the scanning user's name) | string | No | - |
697
729
  | appPreset.desc | App description. Supports the `{user}` placeholder | string | No | - |
730
+ | addons | Incremental scopes/events/callbacks pre-filled into the confirm page, effective after user confirmation. See "Custom scopes/events/callbacks" above | AppAddons | No | - |
731
+ | addons.scopes.tenant | App-identity (tenant) scopes, e.g. `im:message:send_as_bot` | string[] | No | - |
732
+ | addons.scopes.user | User-identity scopes, e.g. `calendar:calendar:read` | string[] | No | - |
733
+ | addons.events.items.tenant | App-identity events, e.g. `im.message.receive_v1` | string[] | No | - |
734
+ | addons.events.items.user | User-identity events, e.g. `calendar.calendar.event.changed_v4` | string[] | No | - |
735
+ | addons.callbacks.items | Callbacks, e.g. `card.action.trigger` | string[] | No | - |
736
+ | createOnly | When `true`, the landing page only allows creating a new app — the "select existing app" entry is hidden, preventing accidental overwrite of an existing app's config. Takes precedence over `appId` when both are set | boolean | No | - |
737
+ | appId | App ID (`cli_` prefix) of an existing app. When set, the flow updates that app's config: the confirm page shows the diff brought by `addons` and the user explicitly re-authorizes. Ignored when `createOnly` is `true` — the page still runs the create-new-app flow | string | No | - |
698
738
 
699
739
  #### Return value
700
740
 
@@ -743,6 +743,36 @@ try {
743
743
  }
744
744
  ```
745
745
 
746
+ #### 自定义权限/事件/回调(addons)与更新已有应用
747
+
748
+ 创建应用时,可通过 `addons` 在平台基础模板上**增量**申请权限、事件订阅和回调,这些配置会预填到用户扫码后的确认页中,用户确认后生效:
749
+
750
+ ```typescript
751
+ // 创建:增量申请权限/事件/回调,且只允许创建新应用(不可选择已有应用)
752
+ const result = await lark.registerApp({
753
+ addons: {
754
+ scopes: { tenant: ['im:message:send_as_bot'], user: ['calendar:calendar:read'] },
755
+ events: { items: { tenant: ['im.message.receive_v1'] } },
756
+ callbacks: { items: ['card.action.trigger'] },
757
+ },
758
+ createOnly: true,
759
+ onQRCodeReady(info) { /* ... */ },
760
+ });
761
+
762
+ // 更新:传入已有应用的 appId,让用户重新扫码确认,为该应用增量开通权限
763
+ await lark.registerApp({
764
+ appId: 'cli_xxx',
765
+ addons: { scopes: { tenant: ['drive:drive.metadata:readonly'] } },
766
+ onQRCodeReady(info) { /* ... */ },
767
+ });
768
+ ```
769
+
770
+ 注意:
771
+
772
+ - `addons` 仅支持在基础模板上**增量叠加**,不支持删减基础权限。
773
+ - 仅支持 5 类公开配置(应用/用户身份权限、应用/用户身份事件、回调)。敏感配置(事件订阅方式与回调地址、`security.*`、加密 key 等)不能通过 `addons` 传入,需调用[更新应用开发配置 OpenAPI](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v7/application-v7/application-config/patch)。
774
+ - SDK 只校验数据形状,不校验权限点/事件/回调名称是否存在;平台目录中不存在的名称会被确认页忽略。
775
+
746
776
  #### `registerApp`参数
747
777
 
748
778
  | 参数 | 描述 | 类型 | 必须 | 默认 |
@@ -757,6 +787,14 @@ try {
757
787
  | appPreset.avatar | 应用头像 URL,支持 1-6 个;传多个时默认选中第一个。支持 png / jpg / jpeg / webp / gif(gif 自动取一帧,不保留动图) | string \| string[] | 否 | - |
758
788
  | appPreset.name | 应用名称,支持 `{user}` 占位符(替换为扫码用户名称) | string | 否 | - |
759
789
  | appPreset.desc | 应用描述,支持 `{user}` 占位符 | string | 否 | - |
790
+ | addons | 增量权限/事件/回调配置,预填到扫码后的确认页,用户确认后生效。详见上方「自定义权限/事件/回调」 | AppAddons | 否 | - |
791
+ | addons.scopes.tenant | 应用身份权限列表,如 `im:message:send_as_bot` | string[] | 否 | - |
792
+ | addons.scopes.user | 用户身份权限列表,如 `calendar:calendar:read` | string[] | 否 | - |
793
+ | addons.events.items.tenant | 应用身份事件列表,如 `im.message.receive_v1` | string[] | 否 | - |
794
+ | addons.events.items.user | 用户身份事件列表,如 `calendar.calendar.event.changed_v4` | string[] | 否 | - |
795
+ | addons.callbacks.items | 回调列表,如 `card.action.trigger` | string[] | 否 | - |
796
+ | createOnly | 为 `true` 时落地页仅允许创建新应用,隐藏「选择已有应用」入口,避免误选已有应用导致其配置被覆盖。与 `appId` 同时传入时优先级更高 | boolean | 否 | - |
797
+ | appId | 已有应用的 App ID(`cli_` 开头)。传入后流程变为更新该应用的配置:确认页展示 `addons` 带来的权限 diff,用户确认后生效。`createOnly` 为 `true` 时被忽略,仍走创建新应用流程 | string | 否 | - |
760
798
 
761
799
  #### 返回值
762
800