@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
@@ -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-C1Uun9zo.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,4 +1,6 @@
1
+ import { t as readFeishuJsonResponse } from "./json-response-CheljwGr.js";
1
2
  import { finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number-runtime";
3
+ import { sleep } from "openclaw/plugin-sdk/runtime-env";
2
4
  import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
3
5
  import { renderQrTerminal } from "openclaw/plugin-sdk/media-runtime";
4
6
  //#region extensions/feishu/src/app-registration.ts
@@ -18,7 +20,7 @@ const DEFAULT_REGISTRATION_EXPIRE_SECONDS = 600;
18
20
  function accountsBaseUrl(domain) {
19
21
  return domain === "lark" ? LARK_ACCOUNTS_URL : FEISHU_ACCOUNTS_URL;
20
22
  }
21
- async function postRegistration(baseUrl, body) {
23
+ async function postRegistration(baseUrl, body, options) {
22
24
  return await fetchFeishuJson({
23
25
  url: `${baseUrl}${REGISTRATION_PATH}`,
24
26
  init: {
@@ -27,18 +29,22 @@ async function postRegistration(baseUrl, body) {
27
29
  body: new URLSearchParams(body).toString(),
28
30
  signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
29
31
  },
30
- auditContext: "feishu.app-registration.post"
32
+ auditContext: "feishu.app-registration.post",
33
+ fetchImpl: options?.fetchImpl,
34
+ lookupFn: options?.lookupFn
31
35
  });
32
36
  }
33
37
  async function fetchFeishuJson(params) {
34
38
  const { response, release } = await fetchWithSsrFGuard({
35
39
  url: params.url,
36
40
  init: params.init,
41
+ fetchImpl: params.fetchImpl,
42
+ lookupFn: params.lookupFn,
37
43
  policy: { allowedHostnames: [new URL(params.url).hostname] },
38
44
  auditContext: params.auditContext
39
45
  });
40
46
  try {
41
- return await response.json();
47
+ return await readFeishuJsonResponse(response);
42
48
  } finally {
43
49
  await release();
44
50
  }
@@ -49,20 +55,20 @@ async function fetchFeishuJson(params) {
49
55
  *
50
56
  * @throws If the environment does not support `client_secret`.
51
57
  */
52
- async function initAppRegistration(domain = "feishu") {
53
- 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");
54
60
  }
55
61
  /**
56
62
  * Step 2: Begin the device-code flow. Returns a device code and a QR URL
57
63
  * that the user should scan with Feishu/Lark mobile app.
58
64
  */
59
- async function beginAppRegistration(domain = "feishu") {
65
+ async function beginAppRegistration(domain = "feishu", options) {
60
66
  const res = await postRegistration(accountsBaseUrl(domain), {
61
67
  action: "begin",
62
68
  archetype: "PersonalAgent",
63
69
  auth_method: "client_secret",
64
70
  request_user_info: "open_id"
65
- });
71
+ }, options);
66
72
  const qrUrl = new URL(res.verification_uri_complete);
67
73
  qrUrl.searchParams.set("from", "oc_onboard");
68
74
  qrUrl.searchParams.set("tp", "ob_cli_app");
@@ -80,7 +86,7 @@ async function beginAppRegistration(domain = "feishu") {
80
86
  * detected as "lark".
81
87
  */
82
88
  async function pollAppRegistration(params) {
83
- const { deviceCode, expireIn, initialDomain = "feishu", abortSignal, tp } = params;
89
+ const { deviceCode, expireIn, initialDomain = "feishu", abortSignal, tp, fetchImpl, lookupFn } = params;
84
90
  let currentInterval = params.interval;
85
91
  let domain = initialDomain;
86
92
  let domainSwitched = false;
@@ -95,6 +101,9 @@ async function pollAppRegistration(params) {
95
101
  action: "poll",
96
102
  device_code: deviceCode,
97
103
  ...tp ? { tp } : {}
104
+ }, {
105
+ fetchImpl,
106
+ lookupFn
98
107
  });
99
108
  } catch {
100
109
  await sleepRegistrationPollInterval(currentInterval);
@@ -158,7 +167,9 @@ async function getAppOwnerOpenId(params) {
158
167
  }),
159
168
  signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
160
169
  },
161
- auditContext: "feishu.app-registration.owner-token"
170
+ auditContext: "feishu.app-registration.owner-token",
171
+ fetchImpl: params.fetchImpl,
172
+ lookupFn: params.lookupFn
162
173
  });
163
174
  if (!tokenData.tenant_access_token) return;
164
175
  const appData = await fetchFeishuJson({
@@ -171,7 +182,9 @@ async function getAppOwnerOpenId(params) {
171
182
  },
172
183
  signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
173
184
  },
174
- auditContext: "feishu.app-registration.owner-app"
185
+ auditContext: "feishu.app-registration.owner-app",
186
+ fetchImpl: params.fetchImpl,
187
+ lookupFn: params.lookupFn
175
188
  });
176
189
  if (appData.code !== 0) return;
177
190
  const app = appData.data?.app;
@@ -181,11 +194,6 @@ async function getAppOwnerOpenId(params) {
181
194
  return;
182
195
  }
183
196
  }
184
- function sleep(ms) {
185
- return new Promise((resolve) => {
186
- setTimeout(resolve, ms);
187
- });
188
- }
189
197
  function sleepRegistrationPollInterval(intervalSeconds) {
190
198
  return sleep(finiteSecondsToTimerSafeMilliseconds(intervalSeconds) ?? finiteSecondsToTimerSafeMilliseconds(DEFAULT_REGISTRATION_POLL_INTERVAL_SECONDS) ?? REQUEST_TIMEOUT_MS);
191
199
  }