@openclaw/feishu 2026.9.4 → 2026.9.6

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 (796) hide show
  1. package/assets/activity.svg +3 -0
  2. package/assets/icon.png +0 -0
  3. package/dist/{accounts-cCMNFBKg.js → .setup/accounts-DmU0xYPx.mjs} +1 -1
  4. package/dist/{app-registration-BI99e_JI.js → .setup/app-registration-Bv4mvauR.mjs} +1 -1
  5. package/dist/{channel-HDnQAH4Z.js → .setup/channel-DsndN1sp.mjs} +93 -86
  6. package/dist/{channel.runtime-B-f6ajOp.js → .setup/channel.runtime-tihKUwVI.mjs} +32 -18
  7. package/dist/{chat-zhIPXu4X.js → .setup/chat-BlvUjdN9.mjs} +2 -2
  8. package/dist/{client-DMbIL3UH.js → .setup/client-DCwNVFZg.mjs} +128 -11
  9. package/dist/{conversation-id-VYgGQ-GX.js → .setup/conversation-id-H-lUayji.mjs} +49 -14
  10. package/dist/{monitor-EuNsFn2T.js → .setup/monitor-OTT7VckU.mjs} +7 -6
  11. package/dist/{monitor.account-CZ7EtqYS.js → .setup/monitor.account-D5j6WomE.mjs} +297 -127
  12. package/dist/{probe-D_SatdZl.js → .setup/probe-bdidyhAn.mjs} +2 -2
  13. package/dist/{reply-delivery-result-C3smdVzb.js → .setup/reply-delivery-result-CRIHpSze.mjs} +136 -118
  14. package/dist/.setup/runtime-setter-api-CG-RC4_r.mjs +3 -0
  15. package/dist/.setup/secret-contract-api-jmCkqVLc.mjs +3 -0
  16. package/dist/{security-audit-DKfR4Cv3.js → .setup/security-audit-CmiKKfU-.mjs} +1 -1
  17. package/dist/{session-conversation-DFCIvQK-.js → .setup/session-conversation-ZC6TC1zk.mjs} +1 -1
  18. package/dist/.setup/setup-api-VAUkwtTi.mjs +3 -0
  19. package/dist/{subagent-hooks-Buadpie_.js → .setup/subagent-hooks-BBfF1hZk.mjs} +3 -19
  20. package/dist/api.js +29 -15
  21. package/dist/channel-plugin-api.js +1 -1
  22. package/dist/contract-api.js +3 -3
  23. package/dist/doctor-contract-api.js +1 -1
  24. package/dist/runtime-api.js +1 -1
  25. package/dist/runtime-setter-api.js +1 -1
  26. package/dist/secret-contract-api.js +1 -1
  27. package/dist/security-contract-api.js +1 -1
  28. package/dist/session-binding-contract-api.js +1 -1
  29. package/dist/session-key-api.js +1 -1
  30. package/dist/setup-api.js +1 -1
  31. package/dist/setup-entry.js +4 -3
  32. package/dist/subagent-hooks-api.js +1 -1
  33. package/node_modules/@larksuiteoapi/node-sdk/es/index.js +199 -35
  34. package/node_modules/@larksuiteoapi/node-sdk/lib/index.js +199 -35
  35. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/CHANGELOG.md +62 -0
  36. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/README.md +233 -5
  37. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/axios.js +387 -89
  38. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/axios.min.js +3 -3
  39. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/axios.min.js.map +1 -1
  40. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/browser/axios.cjs +458 -98
  41. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/esm/axios.js +458 -98
  42. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/esm/axios.min.js +2 -2
  43. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  44. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/node/axios.cjs +568 -116
  45. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/index.d.cts +4 -0
  46. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/index.d.ts +4 -0
  47. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/adapters/fetch.js +64 -11
  48. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/adapters/http.js +134 -50
  49. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/adapters/xhr.js +52 -3
  50. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/Axios.js +19 -14
  51. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/InterceptorManager.js +107 -8
  52. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/buildFullPath.js +1 -13
  53. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/dispatchRequest.js +8 -2
  54. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/mergeConfig.js +1 -1
  55. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/methodList.js +17 -0
  56. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/defaults/index.js +2 -1
  57. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/env/data.js +1 -1
  58. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/Http2Sessions.js +2 -0
  59. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/HttpStatusCode.js +11 -1
  60. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/fromDataURI.js +5 -4
  61. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
  62. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/progressEventReducer.js +1 -1
  63. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/resolveConfig.js +4 -2
  64. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/shouldBypassProxy.js +182 -6
  65. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/throttle.js +3 -2
  66. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/toFormData.js +14 -21
  67. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/utils.js +134 -13
  68. package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/package.json +1 -1
  69. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/README.md +24 -17
  70. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/light/protobuf.js +124 -14
  71. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  72. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  73. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  74. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/minimal/protobuf.js +63 -9
  75. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
  76. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
  77. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
  78. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/protobuf.js +133 -18
  79. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  80. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  81. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  82. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/ext/descriptor.generated.d.ts +7 -0
  83. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/ext/descriptor.js +24 -0
  84. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/ext/protojson.js +14 -4
  85. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/ext/textformat.js +8 -4
  86. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/google/protobuf/descriptor.json +20 -1
  87. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/google/protobuf/descriptor.proto +14 -1
  88. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/index.d.ts +12 -0
  89. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/package.json +1 -1
  90. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/decoder.js +31 -2
  91. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/enum.js +10 -0
  92. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/object.js +5 -2
  93. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/parse.js +9 -4
  94. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/reader.js +61 -7
  95. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/type.js +10 -0
  96. package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/wrappers.js +5 -1
  97. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/.github/THREAT_MODEL.md +3 -3
  98. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/CHANGELOG.md +15 -0
  99. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/README.md +19 -1
  100. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/dist/qs.js +21 -21
  101. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/eslint.config.mjs +1 -1
  102. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/parse.js +3 -4
  103. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/stringify.js +23 -8
  104. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/utils.js +10 -3
  105. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/package.json +4 -4
  106. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/test/parse.js +192 -3
  107. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/test/stringify.js +317 -0
  108. package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/test/utils.js +12 -0
  109. package/node_modules/@larksuiteoapi/node-sdk/package.json +1 -1
  110. package/node_modules/@larksuiteoapi/node-sdk/types/index.d.ts +35 -0
  111. package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts +13 -0
  112. package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts.map +1 -1
  113. package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.js +35 -16
  114. package/node_modules/micromark-extension-gfm-table/dev/lib/html.js +5 -0
  115. package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.js +26 -3
  116. package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts +13 -0
  117. package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts.map +1 -1
  118. package/node_modules/micromark-extension-gfm-table/lib/edit-map.js +37 -17
  119. package/node_modules/micromark-extension-gfm-table/lib/html.js +5 -0
  120. package/node_modules/micromark-extension-gfm-table/lib/syntax.js +29 -2
  121. package/node_modules/micromark-extension-gfm-table/package.json +6 -48
  122. package/node_modules/micromark-extension-gfm-table/readme.md +40 -40
  123. package/node_modules/typebox/build/compile/validator.d.mts +1 -1
  124. package/node_modules/typebox/build/compile/validator.mjs +1 -1
  125. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
  126. package/node_modules/typebox/build/format/iri.mjs +5 -1
  127. package/node_modules/typebox/build/guard/emit.mjs +2 -4
  128. package/node_modules/typebox/build/guard/guard.mjs +6 -18
  129. package/node_modules/typebox/build/guard/string.mjs +16 -24
  130. package/node_modules/typebox/build/schema/build.mjs +2 -2
  131. package/node_modules/typebox/build/schema/check.mjs +1 -1
  132. package/node_modules/typebox/build/schema/compile.d.mts +3 -2
  133. package/node_modules/typebox/build/schema/compile.mjs +8 -8
  134. package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
  135. package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
  136. package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
  137. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
  138. package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
  139. package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
  140. package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
  141. package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
  142. package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
  143. package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
  144. package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
  145. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
  146. package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
  147. package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
  148. package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
  149. package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
  150. package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
  151. package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
  152. package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
  153. package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
  154. package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
  155. package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
  156. package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
  157. package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
  158. package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
  159. package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
  160. package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
  161. package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
  162. package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
  163. package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
  164. package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
  165. package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
  166. package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
  167. package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
  168. package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
  169. package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
  170. package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
  171. package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
  172. package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
  173. package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
  174. package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
  175. package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
  176. package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
  177. package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
  178. package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
  179. package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
  180. package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
  181. package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
  182. package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
  183. package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
  184. package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
  185. package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
  186. package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
  187. package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
  188. package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
  189. package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
  190. package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
  191. package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
  192. package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
  193. package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
  194. package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
  195. package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
  196. package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
  197. package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
  198. package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
  199. package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
  200. package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
  201. package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
  202. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
  203. package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
  204. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
  205. package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
  206. package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
  207. package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
  208. package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
  209. package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
  210. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
  211. package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
  212. package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
  213. package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
  214. package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
  215. package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
  216. package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
  217. package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
  218. package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
  219. package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
  220. package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
  221. package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
  222. package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
  223. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
  224. package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
  225. package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
  226. package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
  227. package/node_modules/typebox/build/schema/errors.d.mts +2 -2
  228. package/node_modules/typebox/build/schema/errors.mjs +8 -14
  229. package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
  230. package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
  231. package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
  232. package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
  233. package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
  234. package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
  235. package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
  236. package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
  237. package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
  238. package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
  239. package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
  240. package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
  241. package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
  242. package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
  243. package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
  244. package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
  245. package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
  246. package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
  247. package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
  248. package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
  249. package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
  250. package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
  251. package/node_modules/typebox/build/schema/parse.d.mts +1 -0
  252. package/node_modules/typebox/build/schema/parse.mjs +10 -5
  253. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
  254. package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
  255. package/node_modules/typebox/build/schema/schema.d.mts +2 -0
  256. package/node_modules/typebox/build/schema/schema.mjs +2 -0
  257. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
  258. package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
  259. package/node_modules/typebox/package.json +1 -1
  260. package/node_modules/typebox/readme.md +59 -89
  261. package/node_modules/zod/README.md +29 -2
  262. package/node_modules/zod/compile.cjs +96 -0
  263. package/node_modules/zod/compile.d.cts +1 -0
  264. package/node_modules/zod/compile.d.ts +1 -0
  265. package/node_modules/zod/compile.js +52 -0
  266. package/node_modules/zod/index.cjs +21 -2
  267. package/node_modules/zod/index.d.cts +1 -2
  268. package/node_modules/zod/index.d.ts +1 -2
  269. package/node_modules/zod/index.js +5 -2
  270. package/node_modules/zod/locales/index.cjs +19 -0
  271. package/node_modules/zod/mini/index.cjs +19 -0
  272. package/node_modules/zod/package.json +20 -8
  273. package/node_modules/zod/src/compile.ts +56 -0
  274. package/node_modules/zod/src/index.ts +5 -2
  275. package/node_modules/zod/src/v3/ZodError.ts +22 -12
  276. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  277. package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
  278. package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
  279. package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
  280. package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
  281. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
  282. package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
  283. package/node_modules/zod/src/v3/types.ts +5 -5
  284. package/node_modules/zod/src/v4/classic/checks.ts +1 -0
  285. package/node_modules/zod/src/v4/classic/compat.ts +26 -18
  286. package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
  287. package/node_modules/zod/src/v4/classic/errors.ts +59 -44
  288. package/node_modules/zod/src/v4/classic/external.ts +14 -9
  289. package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
  290. package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
  291. package/node_modules/zod/src/v4/classic/index.ts +2 -2
  292. package/node_modules/zod/src/v4/classic/iso.ts +2 -72
  293. package/node_modules/zod/src/v4/classic/parse.ts +10 -4
  294. package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
  295. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
  296. package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
  297. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
  298. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
  299. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
  300. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
  301. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
  302. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
  303. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
  304. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
  305. package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
  306. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
  307. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
  308. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
  309. package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
  310. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
  311. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
  312. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
  313. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
  314. package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
  315. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
  316. package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
  317. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
  318. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
  319. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  320. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
  321. package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
  322. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
  323. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
  324. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
  325. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
  326. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
  327. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
  328. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
  329. package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
  330. package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
  331. package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
  332. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
  333. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
  334. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
  335. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  336. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
  337. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  338. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
  339. package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
  340. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
  341. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
  342. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
  343. package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
  344. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  345. package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
  346. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
  347. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
  348. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
  349. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
  350. package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
  351. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
  352. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
  353. package/node_modules/zod/src/v4/core/api.ts +87 -35
  354. package/node_modules/zod/src/v4/core/checks.ts +119 -146
  355. package/node_modules/zod/src/v4/core/compile.ts +2313 -0
  356. package/node_modules/zod/src/v4/core/core.ts +99 -22
  357. package/node_modules/zod/src/v4/core/doc.ts +17 -9
  358. package/node_modules/zod/src/v4/core/errors.ts +113 -25
  359. package/node_modules/zod/src/v4/core/index.ts +3 -0
  360. package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
  361. package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
  362. package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
  363. package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
  364. package/node_modules/zod/src/v4/core/parse.ts +164 -50
  365. package/node_modules/zod/src/v4/core/regexes.ts +42 -15
  366. package/node_modules/zod/src/v4/core/registries.ts +2 -2
  367. package/node_modules/zod/src/v4/core/schemas.ts +1000 -538
  368. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  369. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
  370. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  371. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
  372. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
  373. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
  374. package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
  375. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  376. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
  377. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
  378. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
  379. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
  380. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  381. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
  382. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  383. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
  384. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
  385. package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
  386. package/node_modules/zod/src/v4/core/util.ts +454 -157
  387. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  388. package/node_modules/zod/src/v4/core/visit.ts +193 -0
  389. package/node_modules/zod/src/v4/index.ts +3 -3
  390. package/node_modules/zod/src/v4/locales/ar.ts +5 -0
  391. package/node_modules/zod/src/v4/locales/az.ts +5 -0
  392. package/node_modules/zod/src/v4/locales/be.ts +12 -0
  393. package/node_modules/zod/src/v4/locales/bg.ts +5 -0
  394. package/node_modules/zod/src/v4/locales/bn.ts +123 -0
  395. package/node_modules/zod/src/v4/locales/ca.ts +5 -0
  396. package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
  397. package/node_modules/zod/src/v4/locales/cs.ts +5 -0
  398. package/node_modules/zod/src/v4/locales/da.ts +7 -2
  399. package/node_modules/zod/src/v4/locales/de.ts +5 -0
  400. package/node_modules/zod/src/v4/locales/el.ts +3 -0
  401. package/node_modules/zod/src/v4/locales/en.ts +17 -4
  402. package/node_modules/zod/src/v4/locales/eo.ts +5 -0
  403. package/node_modules/zod/src/v4/locales/es.ts +4 -0
  404. package/node_modules/zod/src/v4/locales/fa.ts +5 -0
  405. package/node_modules/zod/src/v4/locales/fi.ts +5 -0
  406. package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
  407. package/node_modules/zod/src/v4/locales/fr.ts +21 -14
  408. package/node_modules/zod/src/v4/locales/gu.ts +123 -0
  409. package/node_modules/zod/src/v4/locales/he.ts +8 -1
  410. package/node_modules/zod/src/v4/locales/hi.ts +126 -0
  411. package/node_modules/zod/src/v4/locales/hr.ts +4 -0
  412. package/node_modules/zod/src/v4/locales/hu.ts +5 -0
  413. package/node_modules/zod/src/v4/locales/hy.ts +11 -0
  414. package/node_modules/zod/src/v4/locales/id.ts +5 -0
  415. package/node_modules/zod/src/v4/locales/index.ts +11 -0
  416. package/node_modules/zod/src/v4/locales/is.ts +5 -0
  417. package/node_modules/zod/src/v4/locales/it.ts +5 -0
  418. package/node_modules/zod/src/v4/locales/ja.ts +5 -0
  419. package/node_modules/zod/src/v4/locales/ka.ts +5 -0
  420. package/node_modules/zod/src/v4/locales/km.ts +5 -0
  421. package/node_modules/zod/src/v4/locales/kn.ts +126 -0
  422. package/node_modules/zod/src/v4/locales/ko.ts +5 -0
  423. package/node_modules/zod/src/v4/locales/lt.ts +4 -0
  424. package/node_modules/zod/src/v4/locales/mk.ts +5 -0
  425. package/node_modules/zod/src/v4/locales/ms.ts +5 -0
  426. package/node_modules/zod/src/v4/locales/ne.ts +128 -0
  427. package/node_modules/zod/src/v4/locales/nl.ts +5 -0
  428. package/node_modules/zod/src/v4/locales/nn.ts +121 -0
  429. package/node_modules/zod/src/v4/locales/no.ts +7 -2
  430. package/node_modules/zod/src/v4/locales/ota.ts +5 -0
  431. package/node_modules/zod/src/v4/locales/pl.ts +5 -0
  432. package/node_modules/zod/src/v4/locales/ps.ts +5 -0
  433. package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
  434. package/node_modules/zod/src/v4/locales/pt.ts +101 -58
  435. package/node_modules/zod/src/v4/locales/ro.ts +3 -0
  436. package/node_modules/zod/src/v4/locales/ru.ts +12 -0
  437. package/node_modules/zod/src/v4/locales/sk.ts +123 -0
  438. package/node_modules/zod/src/v4/locales/sl.ts +5 -0
  439. package/node_modules/zod/src/v4/locales/sv.ts +7 -2
  440. package/node_modules/zod/src/v4/locales/ta.ts +5 -0
  441. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  442. package/node_modules/zod/src/v4/locales/th.ts +5 -0
  443. package/node_modules/zod/src/v4/locales/tk.ts +113 -0
  444. package/node_modules/zod/src/v4/locales/tr.ts +5 -0
  445. package/node_modules/zod/src/v4/locales/uk.ts +5 -0
  446. package/node_modules/zod/src/v4/locales/ur.ts +5 -0
  447. package/node_modules/zod/src/v4/locales/uz.ts +3 -0
  448. package/node_modules/zod/src/v4/locales/vi.ts +5 -0
  449. package/node_modules/zod/src/v4/locales/yo.ts +5 -0
  450. package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
  451. package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
  452. package/node_modules/zod/src/v4/mini/checks.ts +1 -0
  453. package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
  454. package/node_modules/zod/src/v4/mini/external.ts +12 -1
  455. package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
  456. package/node_modules/zod/src/v4/mini/parse.ts +2 -0
  457. package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
  458. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
  459. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
  460. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
  461. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
  462. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  463. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
  464. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
  465. package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
  466. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
  467. package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
  468. package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
  469. package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
  470. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  471. package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
  472. package/node_modules/zod/v3/ZodError.cjs +41 -12
  473. package/node_modules/zod/v3/ZodError.d.cts +1 -1
  474. package/node_modules/zod/v3/ZodError.d.ts +1 -1
  475. package/node_modules/zod/v3/ZodError.js +22 -12
  476. package/node_modules/zod/v3/errors.cjs +19 -0
  477. package/node_modules/zod/v3/external.cjs +19 -0
  478. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  479. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  480. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  481. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  482. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  483. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  484. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  485. package/node_modules/zod/v3/index.cjs +19 -0
  486. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  487. package/node_modules/zod/v3/types.cjs +26 -5
  488. package/node_modules/zod/v3/types.js +7 -5
  489. package/node_modules/zod/v4/classic/checks.cjs +21 -1
  490. package/node_modules/zod/v4/classic/checks.d.cts +1 -1
  491. package/node_modules/zod/v4/classic/checks.d.ts +1 -1
  492. package/node_modules/zod/v4/classic/checks.js +1 -1
  493. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  494. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  495. package/node_modules/zod/v4/classic/compat.d.cts +9 -11
  496. package/node_modules/zod/v4/classic/compat.d.ts +9 -11
  497. package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
  498. package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
  499. package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
  500. package/node_modules/zod/v4/classic/deep-partial.js +13 -0
  501. package/node_modules/zod/v4/classic/errors.cjs +62 -34
  502. package/node_modules/zod/v4/classic/errors.d.cts +3 -4
  503. package/node_modules/zod/v4/classic/errors.d.ts +3 -4
  504. package/node_modules/zod/v4/classic/errors.js +43 -34
  505. package/node_modules/zod/v4/classic/external.cjs +51 -27
  506. package/node_modules/zod/v4/classic/external.d.cts +5 -2
  507. package/node_modules/zod/v4/classic/external.d.ts +5 -2
  508. package/node_modules/zod/v4/classic/external.js +5 -8
  509. package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
  510. package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
  511. package/node_modules/zod/v4/classic/in-out.cjs +82 -0
  512. package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
  513. package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
  514. package/node_modules/zod/v4/classic/in-out.js +36 -0
  515. package/node_modules/zod/v4/classic/index.cjs +21 -2
  516. package/node_modules/zod/v4/classic/index.d.cts +1 -2
  517. package/node_modules/zod/v4/classic/index.d.ts +1 -2
  518. package/node_modules/zod/v4/classic/index.js +2 -2
  519. package/node_modules/zod/v4/classic/iso.cjs +30 -22
  520. package/node_modules/zod/v4/classic/iso.d.cts +2 -17
  521. package/node_modules/zod/v4/classic/iso.d.ts +2 -17
  522. package/node_modules/zod/v4/classic/iso.js +2 -17
  523. package/node_modules/zod/v4/classic/parse.cjs +23 -1
  524. package/node_modules/zod/v4/classic/parse.d.cts +17 -4
  525. package/node_modules/zod/v4/classic/parse.d.ts +17 -4
  526. package/node_modules/zod/v4/classic/parse.js +1 -0
  527. package/node_modules/zod/v4/classic/schemas.cjs +591 -426
  528. package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
  529. package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
  530. package/node_modules/zod/v4/classic/schemas.js +564 -424
  531. package/node_modules/zod/v4/core/api.cjs +66 -24
  532. package/node_modules/zod/v4/core/api.d.cts +22 -12
  533. package/node_modules/zod/v4/core/api.d.ts +22 -12
  534. package/node_modules/zod/v4/core/api.js +44 -24
  535. package/node_modules/zod/v4/core/checks.cjs +88 -128
  536. package/node_modules/zod/v4/core/checks.d.cts +29 -13
  537. package/node_modules/zod/v4/core/checks.d.ts +29 -13
  538. package/node_modules/zod/v4/core/checks.js +68 -127
  539. package/node_modules/zod/v4/core/compile.cjs +1908 -0
  540. package/node_modules/zod/v4/core/compile.d.cts +65 -0
  541. package/node_modules/zod/v4/core/compile.d.ts +65 -0
  542. package/node_modules/zod/v4/core/compile.js +1858 -0
  543. package/node_modules/zod/v4/core/core.cjs +101 -19
  544. package/node_modules/zod/v4/core/core.d.cts +16 -4
  545. package/node_modules/zod/v4/core/core.d.ts +16 -4
  546. package/node_modules/zod/v4/core/core.js +83 -20
  547. package/node_modules/zod/v4/core/doc.cjs +31 -9
  548. package/node_modules/zod/v4/core/doc.d.cts +3 -1
  549. package/node_modules/zod/v4/core/doc.d.ts +3 -1
  550. package/node_modules/zod/v4/core/doc.js +12 -9
  551. package/node_modules/zod/v4/core/errors.cjs +126 -25
  552. package/node_modules/zod/v4/core/errors.d.cts +4 -0
  553. package/node_modules/zod/v4/core/errors.d.ts +4 -0
  554. package/node_modules/zod/v4/core/errors.js +107 -25
  555. package/node_modules/zod/v4/core/index.cjs +24 -1
  556. package/node_modules/zod/v4/core/index.d.cts +3 -0
  557. package/node_modules/zod/v4/core/index.d.ts +3 -0
  558. package/node_modules/zod/v4/core/index.js +3 -0
  559. package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
  560. package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
  561. package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
  562. package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
  563. package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
  564. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  565. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  566. package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
  567. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  568. package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
  569. package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
  570. package/node_modules/zod/v4/core/memoizer.cjs +360 -0
  571. package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
  572. package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
  573. package/node_modules/zod/v4/core/memoizer.js +311 -0
  574. package/node_modules/zod/v4/core/parse.cjs +148 -46
  575. package/node_modules/zod/v4/core/parse.d.cts +14 -11
  576. package/node_modules/zod/v4/core/parse.d.ts +14 -11
  577. package/node_modules/zod/v4/core/parse.js +127 -45
  578. package/node_modules/zod/v4/core/regexes.cjs +54 -17
  579. package/node_modules/zod/v4/core/regexes.d.cts +5 -0
  580. package/node_modules/zod/v4/core/regexes.d.ts +5 -0
  581. package/node_modules/zod/v4/core/regexes.js +32 -15
  582. package/node_modules/zod/v4/core/registries.cjs +19 -0
  583. package/node_modules/zod/v4/core/registries.js +2 -2
  584. package/node_modules/zod/v4/core/schemas.cjs +785 -386
  585. package/node_modules/zod/v4/core/schemas.d.cts +123 -34
  586. package/node_modules/zod/v4/core/schemas.d.ts +123 -34
  587. package/node_modules/zod/v4/core/schemas.js +753 -386
  588. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  589. package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
  590. package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
  591. package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
  592. package/node_modules/zod/v4/core/to-json-schema.js +247 -44
  593. package/node_modules/zod/v4/core/util.cjs +372 -157
  594. package/node_modules/zod/v4/core/util.d.cts +79 -1
  595. package/node_modules/zod/v4/core/util.d.ts +79 -1
  596. package/node_modules/zod/v4/core/util.js +341 -156
  597. package/node_modules/zod/v4/core/versions.cjs +21 -2
  598. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  599. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  600. package/node_modules/zod/v4/core/versions.js +2 -2
  601. package/node_modules/zod/v4/core/visit.cjs +214 -0
  602. package/node_modules/zod/v4/core/visit.d.cts +30 -0
  603. package/node_modules/zod/v4/core/visit.d.ts +30 -0
  604. package/node_modules/zod/v4/core/visit.js +169 -0
  605. package/node_modules/zod/v4/index.cjs +34 -5
  606. package/node_modules/zod/v4/index.d.cts +2 -2
  607. package/node_modules/zod/v4/index.d.ts +2 -2
  608. package/node_modules/zod/v4/index.js +3 -2
  609. package/node_modules/zod/v4/locales/ar.cjs +5 -0
  610. package/node_modules/zod/v4/locales/ar.js +5 -0
  611. package/node_modules/zod/v4/locales/az.cjs +5 -0
  612. package/node_modules/zod/v4/locales/az.js +5 -0
  613. package/node_modules/zod/v4/locales/be.cjs +12 -0
  614. package/node_modules/zod/v4/locales/be.js +12 -0
  615. package/node_modules/zod/v4/locales/bg.cjs +5 -0
  616. package/node_modules/zod/v4/locales/bg.js +5 -0
  617. package/node_modules/zod/v4/locales/bn.cjs +140 -0
  618. package/node_modules/zod/v4/locales/bn.d.cts +5 -0
  619. package/node_modules/zod/v4/locales/bn.d.ts +4 -0
  620. package/node_modules/zod/v4/locales/bn.js +113 -0
  621. package/node_modules/zod/v4/locales/ca.cjs +5 -0
  622. package/node_modules/zod/v4/locales/ca.js +5 -0
  623. package/node_modules/zod/v4/locales/ckb.cjs +160 -0
  624. package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
  625. package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
  626. package/node_modules/zod/v4/locales/ckb.js +133 -0
  627. package/node_modules/zod/v4/locales/cs.cjs +5 -0
  628. package/node_modules/zod/v4/locales/cs.js +5 -0
  629. package/node_modules/zod/v4/locales/da.cjs +7 -2
  630. package/node_modules/zod/v4/locales/da.js +7 -2
  631. package/node_modules/zod/v4/locales/de.cjs +5 -0
  632. package/node_modules/zod/v4/locales/de.js +5 -0
  633. package/node_modules/zod/v4/locales/el.cjs +3 -0
  634. package/node_modules/zod/v4/locales/el.js +3 -0
  635. package/node_modules/zod/v4/locales/en.cjs +16 -4
  636. package/node_modules/zod/v4/locales/en.js +16 -4
  637. package/node_modules/zod/v4/locales/eo.cjs +5 -0
  638. package/node_modules/zod/v4/locales/eo.js +5 -0
  639. package/node_modules/zod/v4/locales/es.cjs +4 -0
  640. package/node_modules/zod/v4/locales/es.js +4 -0
  641. package/node_modules/zod/v4/locales/fa.cjs +5 -0
  642. package/node_modules/zod/v4/locales/fa.js +5 -0
  643. package/node_modules/zod/v4/locales/fi.cjs +5 -0
  644. package/node_modules/zod/v4/locales/fi.js +5 -0
  645. package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
  646. package/node_modules/zod/v4/locales/fr-CA.js +5 -0
  647. package/node_modules/zod/v4/locales/fr.cjs +18 -14
  648. package/node_modules/zod/v4/locales/fr.js +18 -14
  649. package/node_modules/zod/v4/locales/gu.cjs +140 -0
  650. package/node_modules/zod/v4/locales/gu.d.cts +5 -0
  651. package/node_modules/zod/v4/locales/gu.d.ts +4 -0
  652. package/node_modules/zod/v4/locales/gu.js +113 -0
  653. package/node_modules/zod/v4/locales/he.cjs +7 -0
  654. package/node_modules/zod/v4/locales/he.js +7 -0
  655. package/node_modules/zod/v4/locales/hi.cjs +138 -0
  656. package/node_modules/zod/v4/locales/hi.d.cts +5 -0
  657. package/node_modules/zod/v4/locales/hi.d.ts +4 -0
  658. package/node_modules/zod/v4/locales/hi.js +111 -0
  659. package/node_modules/zod/v4/locales/hr.cjs +4 -0
  660. package/node_modules/zod/v4/locales/hr.js +4 -0
  661. package/node_modules/zod/v4/locales/hu.cjs +5 -0
  662. package/node_modules/zod/v4/locales/hu.js +5 -0
  663. package/node_modules/zod/v4/locales/hy.cjs +11 -0
  664. package/node_modules/zod/v4/locales/hy.js +11 -0
  665. package/node_modules/zod/v4/locales/id.cjs +5 -0
  666. package/node_modules/zod/v4/locales/id.js +5 -0
  667. package/node_modules/zod/v4/locales/index.cjs +43 -2
  668. package/node_modules/zod/v4/locales/index.d.cts +11 -0
  669. package/node_modules/zod/v4/locales/index.d.ts +11 -0
  670. package/node_modules/zod/v4/locales/index.js +11 -0
  671. package/node_modules/zod/v4/locales/is.cjs +5 -0
  672. package/node_modules/zod/v4/locales/is.js +5 -0
  673. package/node_modules/zod/v4/locales/it.cjs +5 -0
  674. package/node_modules/zod/v4/locales/it.js +5 -0
  675. package/node_modules/zod/v4/locales/ja.cjs +5 -0
  676. package/node_modules/zod/v4/locales/ja.js +5 -0
  677. package/node_modules/zod/v4/locales/ka.cjs +5 -0
  678. package/node_modules/zod/v4/locales/ka.js +5 -0
  679. package/node_modules/zod/v4/locales/km.cjs +5 -0
  680. package/node_modules/zod/v4/locales/km.js +5 -0
  681. package/node_modules/zod/v4/locales/kn.cjs +143 -0
  682. package/node_modules/zod/v4/locales/kn.d.cts +5 -0
  683. package/node_modules/zod/v4/locales/kn.d.ts +4 -0
  684. package/node_modules/zod/v4/locales/kn.js +116 -0
  685. package/node_modules/zod/v4/locales/ko.cjs +5 -0
  686. package/node_modules/zod/v4/locales/ko.js +5 -0
  687. package/node_modules/zod/v4/locales/lt.cjs +4 -0
  688. package/node_modules/zod/v4/locales/lt.js +4 -0
  689. package/node_modules/zod/v4/locales/mk.cjs +5 -0
  690. package/node_modules/zod/v4/locales/mk.js +5 -0
  691. package/node_modules/zod/v4/locales/ms.cjs +5 -0
  692. package/node_modules/zod/v4/locales/ms.js +5 -0
  693. package/node_modules/zod/v4/locales/ne.cjs +138 -0
  694. package/node_modules/zod/v4/locales/ne.d.cts +5 -0
  695. package/node_modules/zod/v4/locales/ne.d.ts +4 -0
  696. package/node_modules/zod/v4/locales/ne.js +111 -0
  697. package/node_modules/zod/v4/locales/nl.cjs +5 -0
  698. package/node_modules/zod/v4/locales/nl.js +5 -0
  699. package/node_modules/zod/v4/locales/nn.cjs +140 -0
  700. package/node_modules/zod/v4/locales/nn.d.cts +5 -0
  701. package/node_modules/zod/v4/locales/nn.d.ts +4 -0
  702. package/node_modules/zod/v4/locales/nn.js +113 -0
  703. package/node_modules/zod/v4/locales/no.cjs +7 -2
  704. package/node_modules/zod/v4/locales/no.js +7 -2
  705. package/node_modules/zod/v4/locales/ota.cjs +5 -0
  706. package/node_modules/zod/v4/locales/ota.js +5 -0
  707. package/node_modules/zod/v4/locales/pl.cjs +5 -0
  708. package/node_modules/zod/v4/locales/pl.js +5 -0
  709. package/node_modules/zod/v4/locales/ps.cjs +5 -0
  710. package/node_modules/zod/v4/locales/ps.js +5 -0
  711. package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
  712. package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
  713. package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
  714. package/node_modules/zod/v4/locales/pt-BR.js +143 -0
  715. package/node_modules/zod/v4/locales/pt.cjs +89 -55
  716. package/node_modules/zod/v4/locales/pt.js +89 -55
  717. package/node_modules/zod/v4/locales/ro.cjs +3 -0
  718. package/node_modules/zod/v4/locales/ro.js +3 -0
  719. package/node_modules/zod/v4/locales/ru.cjs +12 -0
  720. package/node_modules/zod/v4/locales/ru.js +12 -0
  721. package/node_modules/zod/v4/locales/sk.cjs +143 -0
  722. package/node_modules/zod/v4/locales/sk.d.cts +5 -0
  723. package/node_modules/zod/v4/locales/sk.d.ts +4 -0
  724. package/node_modules/zod/v4/locales/sk.js +116 -0
  725. package/node_modules/zod/v4/locales/sl.cjs +5 -0
  726. package/node_modules/zod/v4/locales/sl.js +5 -0
  727. package/node_modules/zod/v4/locales/sv.cjs +7 -2
  728. package/node_modules/zod/v4/locales/sv.js +7 -2
  729. package/node_modules/zod/v4/locales/ta.cjs +5 -0
  730. package/node_modules/zod/v4/locales/ta.js +5 -0
  731. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  732. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  733. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  734. package/node_modules/zod/v4/locales/tg.js +117 -0
  735. package/node_modules/zod/v4/locales/th.cjs +5 -0
  736. package/node_modules/zod/v4/locales/th.js +5 -0
  737. package/node_modules/zod/v4/locales/tk.cjs +134 -0
  738. package/node_modules/zod/v4/locales/tk.d.cts +5 -0
  739. package/node_modules/zod/v4/locales/tk.d.ts +4 -0
  740. package/node_modules/zod/v4/locales/tk.js +107 -0
  741. package/node_modules/zod/v4/locales/tr.cjs +5 -0
  742. package/node_modules/zod/v4/locales/tr.js +5 -0
  743. package/node_modules/zod/v4/locales/uk.cjs +5 -0
  744. package/node_modules/zod/v4/locales/uk.js +5 -0
  745. package/node_modules/zod/v4/locales/ur.cjs +5 -0
  746. package/node_modules/zod/v4/locales/ur.js +5 -0
  747. package/node_modules/zod/v4/locales/uz.cjs +3 -0
  748. package/node_modules/zod/v4/locales/uz.js +3 -0
  749. package/node_modules/zod/v4/locales/vi.cjs +5 -0
  750. package/node_modules/zod/v4/locales/vi.js +5 -0
  751. package/node_modules/zod/v4/locales/yo.cjs +5 -0
  752. package/node_modules/zod/v4/locales/yo.js +5 -0
  753. package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
  754. package/node_modules/zod/v4/locales/zh-CN.js +5 -0
  755. package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
  756. package/node_modules/zod/v4/locales/zh-TW.js +5 -0
  757. package/node_modules/zod/v4/mini/checks.cjs +21 -1
  758. package/node_modules/zod/v4/mini/checks.d.cts +1 -1
  759. package/node_modules/zod/v4/mini/checks.d.ts +1 -1
  760. package/node_modules/zod/v4/mini/checks.js +1 -1
  761. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  762. package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
  763. package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
  764. package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
  765. package/node_modules/zod/v4/mini/deep-partial.js +13 -0
  766. package/node_modules/zod/v4/mini/external.cjs +33 -1
  767. package/node_modules/zod/v4/mini/external.d.cts +5 -2
  768. package/node_modules/zod/v4/mini/external.d.ts +5 -2
  769. package/node_modules/zod/v4/mini/external.js +3 -1
  770. package/node_modules/zod/v4/mini/in-out.cjs +82 -0
  771. package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
  772. package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
  773. package/node_modules/zod/v4/mini/in-out.js +36 -0
  774. package/node_modules/zod/v4/mini/index.cjs +19 -0
  775. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  776. package/node_modules/zod/v4/mini/parse.cjs +22 -1
  777. package/node_modules/zod/v4/mini/parse.d.cts +1 -1
  778. package/node_modules/zod/v4/mini/parse.d.ts +1 -1
  779. package/node_modules/zod/v4/mini/parse.js +1 -1
  780. package/node_modules/zod/v4/mini/schemas.cjs +117 -53
  781. package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
  782. package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
  783. package/node_modules/zod/v4/mini/schemas.js +92 -51
  784. package/node_modules/zod/v4-mini/index.cjs +19 -0
  785. package/openclaw.plugin.json +25 -58
  786. package/package.json +11 -8
  787. package/dist/targets-BTQCYRZQ.js +0 -48
  788. package/node_modules/zod/src/v4/core/config.ts +0 -15
  789. /package/dist/{audio-preflight.runtime-BBfC9elv.js → .setup/audio-preflight.runtime-BBfC9elv.mjs} +0 -0
  790. /package/dist/{doctor-contract-w6FpMypv.js → .setup/doctor-contract-w6FpMypv.mjs} +0 -0
  791. /package/dist/{json-response-DXajw_FU.js → .setup/json-response-DXajw_FU.mjs} +0 -0
  792. /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
  793. /package/dist/{runtime-C5JxBWZp.js → .setup/runtime-C5JxBWZp.mjs} +0 -0
  794. /package/dist/{secret-contract-BCpDLdg9.js → .setup/secret-contract-BCpDLdg9.mjs} +0 -0
  795. /package/dist/{security-audit-shared-CK5rVR-1.js → .setup/security-audit-shared-CK5rVR-1.mjs} +0 -0
  796. /package/dist/{thread-bindings-BiL1wGqK.js → .setup/thread-bindings-BiL1wGqK.mjs} +0 -0
@@ -1,22 +1,21 @@
1
- import { o as resolveFeishuAccount, s as resolveFeishuRuntimeAccount } from "./accounts-cCMNFBKg.js";
2
- import { i as resolveReceiveIdType } from "./targets-BTQCYRZQ.js";
3
- import { $ as encodeQuery, A as sendStructuredCardFeishu, B as buildFeishuMediaFallbackText, C as shouldSuppressFeishuTextForVoiceMedia, Ct as resolveFeishuGroupConfig, D as listFeishuThreadMessages, Dt as resolveFeishuReplyPolicy, E as getMessageFeishu, F as isFeishuGroupChatType, I as parseInteractiveCardContent, L as parsePostContent, M as extractMentionTargets, Mt as createFeishuCardInteractionEnvelope, N as isFeishuBroadcastMention, Nt as decodeFeishuCardAction, O as sendCardFeishu, Ot as normalizeFeishuChatType$2, P as isMentionForwardRequest, Q as createCommentTypingReactionLifecycle, St as resolveFeishuDmIngressAccess, Tt as resolveFeishuGroupSenderActivationIngressAccess, U as deliverCommentThreadText, V as resolveFeishuIdentityEmoji, _ as renderFeishuReplyPayload, at as normalizeCommentFileType, b as saveMessageResourceFeishu, bt as hasExplicitFeishuGroupConfig, ct as resolveFeishuCardTemplate, dt as materializeFeishuPostMarkdownSoftBreaks, et as extractReplyText, i as noVisibleFeishuReplyDelivery, it as buildFeishuCommentTarget, j as formatFeishuMediaContent, jt as buildFeishuCardActionTextFallback, k as sendMessageFeishu, kt as resolveFeishuChatType, l as buildFeishuPresentationFallback, n as createFeishuReplyDeliveryResult, nt as parseCommentContentElements, r as mergeFeishuReplyDeliveryResults, rt as requestFeishuApi, t as createFeishuPartialReplyDeliveryError, u as consumeFeishuPresentationFallbackMarker, ut as chunkFeishuPostMarkdown, v as resolveFeishuRichReply, w as chunkFeishuCardMarkdown, wt as resolveFeishuGroupConversationIngressAccess, x as sendMediaFeishu, xt as normalizeFeishuAllowEntry, y as withinCardTableLimit } from "./reply-delivery-result-C3smdVzb.js";
4
- import { a as normalizeFeishuWebhookPath, o as normalizeFeishuExternalKey } from "./doctor-contract-w6FpMypv.js";
5
- import { o as resolveConfiguredFeishuGroupSessionScope, t as buildFeishuConversationId } from "./conversation-id-VYgGQ-GX.js";
6
- import { a as getFeishuUserAgent, i as createFeishuWSClient, n as createEventDispatcher, r as createFeishuClient, s as resolveConfiguredHttpTimeoutMs } from "./client-DMbIL3UH.js";
7
- import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.js";
8
- import { r as getChatInfo } from "./chat-zhIPXu4X.js";
9
- import { t as createFeishuThreadBindingManager } from "./thread-bindings-BiL1wGqK.js";
10
- import { evaluateSupplementalContextVisibility, normalizeAgentId as normalizeAgentId$1, resolveChannelContextVisibilityMode } from "./runtime-api.js";
11
- import { t as readFeishuJsonResponse } from "./json-response-DXajw_FU.js";
12
- import { a as waitForAbortableDelay, i as raceWithTimeoutAndAbort } from "./probe-D_SatdZl.js";
13
- import { t as fetchBotIdentityForMonitor } from "./monitor-EuNsFn2T.js";
1
+ import { o as resolveFeishuAccount, s as resolveFeishuRuntimeAccount } from "./accounts-DmU0xYPx.mjs";
2
+ import { o as resolveConfiguredFeishuGroupSessionScope, t as buildFeishuConversationId, u as resolveReceiveIdType } from "./conversation-id-H-lUayji.mjs";
3
+ import { A as sendMessageFeishu, At as normalizeFeishuChatType, B as parsePostContent, Ct as normalizeFeishuAllowEntry, D as getMessageFeishu, Dt as resolveFeishuGroupSenderActivationIngressAccess, Et as resolveFeishuGroupConversationIngressAccess, F as isFeishuBroadcastMention, Ft as decodeFeishuCardAction, G as deliverCommentThreadText, H as buildFeishuMediaFallbackText, I as isMentionForwardRequest, L as isFeishuGroupChatType, N as formatFeishuMediaContent, Nt as buildFeishuCardActionTextFallback, O as listFeishuThreadMessages, P as extractMentionTargets, Pt as createFeishuCardInteractionEnvelope, R as normalizeFeishuEventChatType, S as sendMediaFeishu, St as hasExplicitFeishuGroupConfig, T as chunkFeishuCardMarkdown, Tt as resolveFeishuGroupConfig, U as resolveFeishuIdentityEmoji, a as shouldSendNoVisibleReplyFallback, at as requestFeishuApi, b as withinCardTableLimit, d as consumeFeishuPresentationFallbackMarker, et as createCommentTypingReactionLifecycle, ft as chunkFeishuPostMarkdown, i as noVisibleFeishuReplyDelivery, it as parseCommentContentElements, j as sendStructuredCardFeishu, jt as resolveFeishuChatType, k as sendCardFeishu, kt as resolveFeishuReplyPolicy, n as createFeishuReplyDeliveryResult, nt as extractReplyText, ot as buildFeishuCommentTarget, pt as materializeFeishuPostMarkdownSoftBreaks, r as mergeFeishuReplyDeliveryResults, st as normalizeCommentFileType, t as createFeishuPartialReplyDeliveryError, tt as encodeQuery, u as buildFeishuPresentationFallback, ut as resolveFeishuCardTemplate, v as renderFeishuReplyPayload, w as shouldSuppressFeishuTextForVoiceMedia, wt as resolveFeishuDmIngressAccess, x as saveMessageResourceFeishu, y as resolveFeishuRichReply, z as parseInteractiveCardContent } from "./reply-delivery-result-CRIHpSze.mjs";
4
+ import { a as normalizeFeishuWebhookPath, o as normalizeFeishuExternalKey } from "./doctor-contract-w6FpMypv.mjs";
5
+ import { t as getFeishuRuntime } from "./runtime-C5JxBWZp.mjs";
6
+ import { a as getFeishuUserAgent, f as resolveConfiguredHttpTimeoutMs, i as createFeishuWSClient, n as createEventDispatcher, r as createFeishuClient } from "./client-DCwNVFZg.mjs";
7
+ import { r as getChatInfo } from "./chat-BlvUjdN9.mjs";
8
+ import { t as createFeishuThreadBindingManager } from "./thread-bindings-BiL1wGqK.mjs";
9
+ import { evaluateSupplementalContextVisibility, normalizeAgentId as normalizeAgentId$1, resolveChannelContextVisibilityMode } from "../runtime-api.js";
10
+ import { t as readFeishuJsonResponse } from "./json-response-DXajw_FU.mjs";
11
+ import { a as waitForAbortableDelay, i as raceWithTimeoutAndAbort } from "./probe-bdidyhAn.mjs";
12
+ import { t as fetchBotIdentityForMonitor } from "./monitor-OTT7VckU.mjs";
14
13
  import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
15
- import { DEFAULT_INGRESS_ADOPTION_STALL_MS, bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor, createChannelMessageReplyPipeline, createReplyPrefixContext, formatChannelProgressDraftLineForEntry, isChannelProgressDraftWorkToolName, resolveAgentOutboundIdentity, resolveChannelPreviewStreamMode, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
14
+ import { DEFAULT_INGRESS_ADOPTION_STALL_MS, bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor, createChannelMessageReplyPipeline, createReplyPrefixContext, formatChannelProgressDraftLineForEntry, resolveAgentOutboundIdentity, resolveChannelPreviewStreamMode, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
16
15
  import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
17
16
  import { ensureConfiguredBindingRouteReady, resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRoute } from "openclaw/plugin-sdk/conversation-runtime";
18
17
  import { collectErrorGraphCandidates, formatErrorMessage, toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
19
- import { asDateTimestampMs, isFutureDateTimestampMs, parseStrictNonNegativeInteger, resolveDateTimestampMs, resolveExpiresAtMsFromDurationMs, resolveExpiresAtMsFromDurationSeconds, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
18
+ import { asDateTimestampMs, isFutureDateTimestampMs, parseStrictNonNegativeInteger, resolveDateTimestampMs, resolveExpiresAtMsFromDurationMs, resolveExpiresAtMsFromDurationSeconds, resolvePromptHistoryLimit, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
20
19
  import { asBoolean, asNullableRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeNullableString, normalizeOptionalLowercaseString, normalizeOptionalString, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
21
20
  import { stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
22
21
  import { resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
@@ -31,12 +30,13 @@ import { getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts, resolv
31
30
  import { resolvePinnedMainDmOwnerFromAllowlist, safeEqualSecret } from "openclaw/plugin-sdk/security-runtime";
32
31
  import * as Lark from "@larksuiteoapi/node-sdk";
33
32
  import { isRecord as isRecord$1 } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
33
+ import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
34
34
  import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
35
35
  import { sliceUtf16Safe, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
36
36
  import { WEBHOOK_ANOMALY_COUNTER_DEFAULTS, WEBHOOK_RATE_LIMIT_DEFAULTS, applyBasicWebhookRequestGuards, createFixedWindowRateLimiter, createWebhookAnomalyTracker, resolveRequestClientIp } from "openclaw/plugin-sdk/webhook-ingress";
37
37
  import * as crypto$1 from "node:crypto";
38
38
  import crypto, { createHash } from "node:crypto";
39
- import { DEFAULT_GROUP_HISTORY_LIMIT, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
39
+ import { createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
40
40
  import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
41
41
  import { createChannelReplayGuard } from "openclaw/plugin-sdk/persistent-dedupe";
42
42
  import { resolveChannelConfigWrites } from "openclaw/plugin-sdk/channel-config-writes";
@@ -46,7 +46,7 @@ import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
46
46
  import * as http from "node:http";
47
47
  import { createRuntimeConfigReader } from "openclaw/plugin-sdk/runtime-config-snapshot";
48
48
  import { channelBlockedPatch, channelReadyPatch } from "openclaw/plugin-sdk/gateway-runtime";
49
- import { installRequestBodyLimitGuard, readWebhookBodyOrReject } from "openclaw/plugin-sdk/webhook-request-guards";
49
+ import { createWebhookInFlightLimiter, installRequestBodyLimitGuard, readWebhookBodyOrReject, sendHttpRequestRejection } from "openclaw/plugin-sdk/webhook-request-guards";
50
50
  import { isAbortRequestText, isBtwRequestText } from "openclaw/plugin-sdk/command-primitives-runtime";
51
51
  //#region extensions/feishu/src/bot-agent-body.ts
52
52
  const MAX_MENTION_CONTEXT_NAME_LENGTH = 80;
@@ -83,7 +83,7 @@ function buildFeishuAgentBody(params) {
83
83
  function createFeishuBroadcastIngressSettlement(params) {
84
84
  const lanes = /* @__PURE__ */ new Set();
85
85
  const failures = [];
86
- const fallbackAbortSignal = new AbortController().signal;
86
+ const fallbackAbort = new AbortController();
87
87
  let fanoutSettled = false;
88
88
  let terminal;
89
89
  let adoption;
@@ -91,6 +91,14 @@ function createFeishuBroadcastIngressSettlement(params) {
91
91
  let finalizing = false;
92
92
  let deferred = false;
93
93
  let replayReleased = false;
94
+ let resolveSettlement;
95
+ const settlement = new Promise((resolve) => {
96
+ resolveSettlement = resolve;
97
+ });
98
+ params.trackTask?.(settlement);
99
+ const finishSettlement = () => {
100
+ if (![...lanes].some((lane) => lane.adopting)) resolveSettlement();
101
+ };
94
102
  const beginFinalizing = () => {
95
103
  if (finalizing) return;
96
104
  finalizing = true;
@@ -118,6 +126,8 @@ function createFeishuBroadcastIngressSettlement(params) {
118
126
  await params.lifecycle?.onAbandoned();
119
127
  } finally {
120
128
  terminal = "abandoned";
129
+ fallbackAbort.abort(error);
130
+ finishSettlement();
121
131
  }
122
132
  };
123
133
  const abandon = async (error) => {
@@ -131,8 +141,8 @@ function createFeishuBroadcastIngressSettlement(params) {
131
141
  await activeAbandonment;
132
142
  };
133
143
  const runAdoption = async () => {
134
- beginFinalizing();
135
144
  try {
145
+ beginFinalizing();
136
146
  await params.lifecycle?.onAdopted();
137
147
  terminal = "adopted";
138
148
  try {
@@ -146,6 +156,8 @@ function createFeishuBroadcastIngressSettlement(params) {
146
156
  } catch (error) {
147
157
  await runAbandonment(error).catch(() => void 0);
148
158
  throw error;
159
+ } finally {
160
+ finishSettlement();
149
161
  }
150
162
  };
151
163
  const adopt = async () => {
@@ -179,18 +191,24 @@ function createFeishuBroadcastIngressSettlement(params) {
179
191
  };
180
192
  return {
181
193
  lifecycle: {
182
- abortSignal: params.lifecycle?.abortSignal ?? fallbackAbortSignal,
194
+ abortSignal: params.lifecycle?.abortSignal ?? fallbackAbort.signal,
183
195
  onAdopted: async () => {
184
- if (lane.status === "adopted" || lane.status === "completed" || lane.status === "failed" || lane.status === "abandoned") return;
196
+ if (terminal || lane.status === "adopted" || lane.status === "completed" || lane.status === "failed" || lane.status === "abandoned") return;
185
197
  lane.status = "adopted";
186
- beginFinalizing();
198
+ lane.adopting = true;
187
199
  try {
188
- await lane.replayClaim?.commit();
189
- } catch (error) {
190
- reportReplayCommitError(error);
200
+ beginFinalizing();
201
+ try {
202
+ await lane.replayClaim?.commit();
203
+ } catch (error) {
204
+ reportReplayCommitError(error);
205
+ }
206
+ lane.status = "completed";
207
+ await maybeSettle();
208
+ } finally {
209
+ lane.adopting = false;
210
+ if (terminal) finishSettlement();
191
211
  }
192
- lane.status = "completed";
193
- await maybeSettle();
194
212
  },
195
213
  onDeferred: () => {
196
214
  if (lane.status !== "pending") return;
@@ -198,6 +216,7 @@ function createFeishuBroadcastIngressSettlement(params) {
198
216
  defer();
199
217
  },
200
218
  onDeferredHeartbeat: () => params.lifecycle?.onDeferredHeartbeat?.(),
219
+ deferredHeartbeatIntervalMs: params.lifecycle?.deferredHeartbeatIntervalMs,
201
220
  onAdoptionFinalizing: beginFinalizing,
202
221
  onAbandoned: async () => {
203
222
  if (lane.status === "completed" || lane.status === "failed" || lane.status === "abandoned") return;
@@ -2585,14 +2604,14 @@ function createFeishuReplyDispatcher(params) {
2585
2604
  return false;
2586
2605
  } : void 0,
2587
2606
  onReasoningEnd: reasoningPreviewEnabled ? () => false : void 0,
2588
- onToolStart: previewStreamingEnabled ? (payload) => {
2589
- if (!isChannelProgressDraftWorkToolName(payload.name)) return false;
2607
+ onItemEvent: previewStreamingEnabled ? (payload) => {
2608
+ if (payload.kind === "preamble" || payload.hideFromChannelProgress || payload.suppressChannelProgress) return false;
2609
+ const { kind: itemKind, ...item } = payload;
2590
2610
  const statusLineLocal = formatChannelProgressDraftLineForEntry(account.config, {
2591
- event: "tool",
2592
- name: payload.name,
2593
- phase: payload.phase,
2594
- args: payload.args
2595
- }, { detailMode: payload.detailMode });
2611
+ event: "item",
2612
+ itemKind,
2613
+ ...item
2614
+ });
2596
2615
  if (statusLineLocal) return updateStreamingStatusLine(statusLineLocal);
2597
2616
  return false;
2598
2617
  } : void 0,
@@ -2622,11 +2641,6 @@ function getFeishuSyntheticDirectPreDispatchTarget(event) {
2622
2641
  //#region extensions/feishu/src/bot.ts
2623
2642
  const permissionErrorNotifiedAt = /* @__PURE__ */ new Map();
2624
2643
  const PERMISSION_ERROR_COOLDOWN_MS = 3e5;
2625
- function shouldSendNoVisibleReplyFallback(dispatchResult) {
2626
- const emptyEligibleDispatch = dispatchResult.noVisibleReplyFallbackEligible === true && dispatchResult.settledReceipt?.anyVisibleDelivered !== true;
2627
- const finalFailedBeforeSend = (dispatchResult.settledReceipt?.counts.final.failedBeforeSend ?? 0) > 0;
2628
- return dispatchResult.sendPolicyDenied !== true && dispatchResult.sourceReplyDeliveryMode !== "message_tool_only" && (emptyEligibleDispatch || finalFailedBeforeSend);
2629
- }
2630
2644
  function isFeishuTopicSessionScope(scope) {
2631
2645
  return scope === "group_topic" || scope === "group_topic_sender";
2632
2646
  }
@@ -2636,7 +2650,7 @@ async function resolveFeishuAudioTranscript(params) {
2636
2650
  if (audioMedia.length === 0) return;
2637
2651
  if (params.content.trim()) return params.content;
2638
2652
  try {
2639
- const { transcribeFirstAudio } = await import("./audio-preflight.runtime-BBfC9elv.js");
2653
+ const { transcribeFirstAudio } = await import("./audio-preflight.runtime-BBfC9elv.mjs");
2640
2654
  return await transcribeFirstAudio({
2641
2655
  ctx: {
2642
2656
  media: audioMedia,
@@ -2860,7 +2874,7 @@ async function handleFeishuMessage(params) {
2860
2874
  const names = ctx.mentionTargets.map((t) => t.name).join(", ");
2861
2875
  log(`feishu[${account.accountId}]: detected @ forward request, targets: [${names}]`);
2862
2876
  }
2863
- const historyLimit = Math.max(0, feishuCfg?.historyLimit ?? cfg.messages?.groupChat?.historyLimit ?? DEFAULT_GROUP_HISTORY_LIMIT);
2877
+ const historyLimit = resolvePromptHistoryLimit(feishuCfg?.historyLimit ?? cfg.messages?.groupChat?.historyLimit);
2864
2878
  const groupConfig = isGroup ? resolveFeishuGroupConfig({
2865
2879
  cfg: feishuCfg,
2866
2880
  groupId: ctx.chatId
@@ -3409,7 +3423,7 @@ async function handleFeishuMessage(params) {
3409
3423
  mode: contextVisibilityMode,
3410
3424
  kind: "history"
3411
3425
  });
3412
- const relevantMessages = (senderScoped ? allowlistedMessages.filter((msg) => msg.senderType === "app" || msg.senderId !== void 0 && senderIds.has(msg.senderId.trim())) : allowlistedMessages) ?? [];
3426
+ const relevantMessages = senderScoped ? allowlistedMessages.filter((msg) => msg.senderType === "app" || msg.senderId !== void 0 && senderIds.has(msg.senderId.trim())) : allowlistedMessages;
3413
3427
  const threadStarterBody = rootMsg?.content ?? relevantMessages[0]?.content;
3414
3428
  const historyMessages = Boolean(rootMsg?.content || ctx.rootId) ? relevantMessages : relevantMessages.slice(1);
3415
3429
  const historyParts = historyMessages.map((msg) => {
@@ -3437,6 +3451,7 @@ async function handleFeishuMessage(params) {
3437
3451
  const contextBinding = {
3438
3452
  agentId,
3439
3453
  sessionKey: agentSessionKey,
3454
+ nativeChannelId: ctx.chatId,
3440
3455
  messageId: ctx.messageId,
3441
3456
  inboundEventKind: "user_request"
3442
3457
  };
@@ -3500,8 +3515,8 @@ async function handleFeishuMessage(params) {
3500
3515
  threadId: ctx.rootId && isTopicSessionForThread ? ctx.rootId : void 0
3501
3516
  },
3502
3517
  route: {
3518
+ ...route,
3503
3519
  agentId,
3504
- dmScope: route.dmScope,
3505
3520
  accountId: agentAccountId,
3506
3521
  routeSessionKey: agentSessionKey
3507
3522
  },
@@ -3578,6 +3593,7 @@ async function handleFeishuMessage(params) {
3578
3593
  return;
3579
3594
  }
3580
3595
  const broadcastSettlement = createFeishuBroadcastIngressSettlement({
3596
+ trackTask: params.trackTask,
3581
3597
  lifecycle: turnAdoptionLifecycle,
3582
3598
  replayClaim: broadcastClaim.kind === "claimed" ? broadcastClaim.handle : void 0,
3583
3599
  onReplayCommitError: (err) => error(`feishu[${account.accountId}]: failed to commit broadcast replay guard: ${String(err)}`),
@@ -4006,6 +4022,7 @@ async function dispatchSyntheticCommand(params) {
4006
4022
  log: params.runtime?.log ?? console.log
4007
4023
  });
4008
4024
  await handleFeishuMessage({
4025
+ trackTask: params.trackTask,
4009
4026
  cfg: params.cfg,
4010
4027
  event: buildSyntheticMessageEvent$1(params.event, params.command, resolvedChatType, params.botOpenId),
4011
4028
  botOpenId: params.botOpenId,
@@ -4052,7 +4069,7 @@ function cacheResolvedCardActionChatType(cacheKey, value, now) {
4052
4069
  });
4053
4070
  }
4054
4071
  async function resolveCardActionChatType(params) {
4055
- const explicitChatType = normalizeFeishuChatType$2(params.chatType);
4072
+ const explicitChatType = normalizeFeishuChatType(params.chatType);
4056
4073
  if (explicitChatType) return explicitChatType;
4057
4074
  const chatId = params.event.context.chat_id?.trim();
4058
4075
  if (!chatId) return "p2p";
@@ -4192,6 +4209,7 @@ async function handleFeishuCardAction(params) {
4192
4209
  return;
4193
4210
  }
4194
4211
  await dispatchSyntheticCommand({
4212
+ trackTask: params.trackTask,
4195
4213
  cfg,
4196
4214
  event,
4197
4215
  command,
@@ -4217,6 +4235,7 @@ async function handleFeishuCardAction(params) {
4217
4235
  const content = buildFeishuCardActionTextFallback(event);
4218
4236
  log(`feishu[${account.accountId}]: handling card action from ${event.operator.open_id}: ${content}`);
4219
4237
  await dispatchSyntheticCommand({
4238
+ trackTask: params.trackTask,
4220
4239
  cfg,
4221
4240
  event,
4222
4241
  command: content,
@@ -4378,6 +4397,7 @@ function buildFeishuFlushIngressLifecycle(sources, options) {
4378
4397
  }
4379
4398
  })();
4380
4399
  adopting = activeAdoption;
4400
+ options?.trackTask?.(activeAdoption);
4381
4401
  try {
4382
4402
  await activeAdoption;
4383
4403
  } finally {
@@ -4396,6 +4416,7 @@ function buildFeishuFlushIngressLifecycle(sources, options) {
4396
4416
  transportLifecycle.onDeferred();
4397
4417
  },
4398
4418
  onDeferredHeartbeat: () => transportLifecycle.onDeferredHeartbeat?.(),
4419
+ deferredHeartbeatIntervalMs: transportLifecycle.deferredHeartbeatIntervalMs,
4399
4420
  onAdoptionFinalizing: () => {
4400
4421
  transportLifecycle.onAdoptionFinalizing();
4401
4422
  },
@@ -4858,8 +4879,10 @@ function createFeishuBotMenuHandler(params) {
4858
4879
  const error = runtime?.error ?? console.error;
4859
4880
  const getBotOpenId = params.getBotOpenId ?? ((id) => botOpenIds.get(id));
4860
4881
  const getBotName = params.getBotName ?? ((id) => botNames.get(id));
4861
- return async (data) => {
4882
+ const isActive = params.isAccountActive ?? (() => true);
4883
+ const handle = async (data) => {
4862
4884
  try {
4885
+ if (!isActive()) return;
4863
4886
  const event = parseFeishuBotMenuEvent(data);
4864
4887
  if (!event) return;
4865
4888
  const operatorOpenId = event.operator?.operator_id?.open_id?.trim();
@@ -4889,6 +4912,10 @@ function createFeishuBotMenuHandler(params) {
4889
4912
  namespace: accountId,
4890
4913
  log
4891
4914
  });
4915
+ if (!isActive()) {
4916
+ if (claim.kind === "claimed") claim.handle.release({ error: /* @__PURE__ */ new Error("feishu account stopped before menu dispatch") });
4917
+ return;
4918
+ }
4892
4919
  if (claim.kind === "duplicate") {
4893
4920
  log(`feishu[${accountId}]: dropping duplicate bot-menu event for ${syntheticMessageId}`);
4894
4921
  return;
@@ -4898,6 +4925,7 @@ function createFeishuBotMenuHandler(params) {
4898
4925
  return;
4899
4926
  }
4900
4927
  const handleLegacyMenu = () => handleFeishuMessage({
4928
+ trackTask: params.trackTask,
4901
4929
  cfg,
4902
4930
  event: syntheticEvent,
4903
4931
  botOpenId: getBotOpenId(accountId),
@@ -4919,6 +4947,10 @@ function createFeishuBotMenuHandler(params) {
4919
4947
  if (claim.kind === "claimed") await claim.handle.commit();
4920
4948
  return;
4921
4949
  }
4950
+ if (!isActive()) {
4951
+ if (claim.kind === "claimed") claim.handle.release({ error: /* @__PURE__ */ new Error("feishu account stopped before menu dispatch") });
4952
+ return;
4953
+ }
4922
4954
  return await handleLegacyMenu();
4923
4955
  }).catch(async (err) => {
4924
4956
  if (isFeishuRetryableSyntheticEventError(err)) {
@@ -4927,6 +4959,7 @@ function createFeishuBotMenuHandler(params) {
4927
4959
  } else if (claim.kind === "claimed") await claim.handle.commit();
4928
4960
  throw err;
4929
4961
  });
4962
+ params.trackTask?.(promise);
4930
4963
  if (fireAndForget) {
4931
4964
  promise.catch((err) => {
4932
4965
  error(`feishu[${accountId}]: error handling bot menu event: ${String(err)}`);
@@ -4938,6 +4971,11 @@ function createFeishuBotMenuHandler(params) {
4938
4971
  error(`feishu[${accountId}]: error handling bot menu event: ${String(err)}`);
4939
4972
  }
4940
4973
  };
4974
+ return (data) => {
4975
+ const task = handle(data);
4976
+ params.trackTask?.(task);
4977
+ return task;
4978
+ };
4941
4979
  }
4942
4980
  //#endregion
4943
4981
  //#region extensions/feishu/src/comment-dispatcher.ts
@@ -5541,7 +5579,7 @@ async function resolveDriveCommentEventCore(params) {
5541
5579
  return null;
5542
5580
  }
5543
5581
  const context = await fetchDriveCommentContext({
5544
- client: createClient ? createClient(account ?? { accountId }) : createFeishuClient((await import("./accounts-cCMNFBKg.js").then((n) => n.t)).resolveFeishuAccount({
5582
+ client: createClient ? createClient(account ?? { accountId }) : createFeishuClient((await import("./accounts-DmU0xYPx.mjs").then((n) => n.t)).resolveFeishuAccount({
5545
5583
  cfg,
5546
5584
  accountId
5547
5585
  })),
@@ -6016,9 +6054,6 @@ function createFeishuDriveCommentNoticeHandler(params) {
6016
6054
  }
6017
6055
  //#endregion
6018
6056
  //#region extensions/feishu/src/monitor.message-handler.ts
6019
- function normalizeFeishuChatType$1(value) {
6020
- return value === "group" || value === "topic_group" || value === "private" || value === "p2p" ? value : void 0;
6021
- }
6022
6057
  function parseFeishuMessageEventPayload(value) {
6023
6058
  if (!isRecord(value)) return null;
6024
6059
  const sender = value.sender;
@@ -6028,7 +6063,7 @@ function parseFeishuMessageEventPayload(value) {
6028
6063
  if (!isRecord(senderId)) return null;
6029
6064
  const messageId = readStringValue(message.message_id);
6030
6065
  const chatId = readStringValue(message.chat_id);
6031
- const chatType = normalizeFeishuChatType$1(message.chat_type);
6066
+ const chatType = normalizeFeishuEventChatType(message.chat_type);
6032
6067
  const messageType = readStringValue(message.message_type);
6033
6068
  if (!messageId || !chatId || !chatType || !messageType || typeof message.content !== "string") return null;
6034
6069
  return value;
@@ -6050,7 +6085,7 @@ function dedupeFeishuDebounceEntriesByDedupeKey(entries) {
6050
6085
  const seen = /* @__PURE__ */ new Set();
6051
6086
  const deduped = [];
6052
6087
  for (const entry of entries) {
6053
- const dedupeKey = resolveFeishuMessageDedupeKey(entry.event);
6088
+ const dedupeKey = entry.messageDedupeKey;
6054
6089
  if (!dedupeKey) {
6055
6090
  deduped.push(entry);
6056
6091
  continue;
@@ -6072,7 +6107,7 @@ function resolveFeishuDebounceMentions(params) {
6072
6107
  const botMentions = merged.filter((mention) => mention.id.open_id?.trim() === normalizedBotOpenId);
6073
6108
  return botMentions.length > 0 ? botMentions : void 0;
6074
6109
  }
6075
- function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, runtime, chatHistories, fireAndForget, handleMessage, resolveDebounceText: resolveText, hasProcessedMessage, getBotOpenId = () => void 0, getBotName = () => void 0, resolveSequentialKey = ({ accountId: accountIdLocal, event }) => `feishu:${accountIdLocal}:${event.message.chat_id?.trim() || "unknown"}`, statusSink, resolveIngressLifecycle }) {
6110
+ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, runtime, chatHistories, fireAndForget, isAccountActive = () => true, trackTask, handleMessage, resolveDebounceText: resolveText, hasProcessedMessage, getBotOpenId = () => void 0, getBotName = () => void 0, resolveSequentialKey = ({ accountId: accountIdLocal, event }) => `feishu:${accountIdLocal}:${event.message.chat_id?.trim() || "unknown"}`, statusSink, resolveIngressLifecycle }) {
6076
6111
  const readConfig = createRuntimeConfigReader(cfg);
6077
6112
  const resolveDebounceMs = () => channelRuntime.debounce.resolveInboundDebounceMs({
6078
6113
  cfg: readConfig(),
@@ -6096,7 +6131,8 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
6096
6131
  await turnAdoptionLifecycle.onAbandoned();
6097
6132
  return;
6098
6133
  }
6099
- await handleMessage({
6134
+ const handling = handleMessage({
6135
+ trackTask,
6100
6136
  cfg,
6101
6137
  event,
6102
6138
  preparedContent,
@@ -6110,6 +6146,8 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
6110
6146
  messageDedupeKey,
6111
6147
  turnAdoptionLifecycle
6112
6148
  });
6149
+ trackTask?.(handling);
6150
+ await handling;
6113
6151
  };
6114
6152
  await enqueue(sequentialKey, task);
6115
6153
  };
@@ -6126,7 +6164,7 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
6126
6164
  const recordSuppressedMessageIds = async (entries, dispatchDedupeKey) => {
6127
6165
  const keepDedupeKey = dispatchDedupeKey?.trim();
6128
6166
  const suppressedIds = new Set(entries.map((entry) => ({
6129
- id: resolveFeishuMessageDedupeKey(entry.event),
6167
+ id: entry.messageDedupeKey,
6130
6168
  claim: entry.processingClaim
6131
6169
  })).filter(({ id }) => Boolean(id) && (!keepDedupeKey || id !== keepDedupeKey)));
6132
6170
  for (const suppressed of suppressedIds) try {
@@ -6156,7 +6194,10 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
6156
6194
  const { lifecycle, settle } = buildFeishuFlushIngressLifecycle(activeEntries.map((entry) => ({
6157
6195
  lifecycle: entry.turnAdoptionLifecycle,
6158
6196
  replayClaim: entry.processingClaim
6159
- })), { onReplayCommitError: (err) => error(`feishu[${accountId}]: failed to commit logical replay guard: ${String(err)}`) });
6197
+ })), {
6198
+ trackTask,
6199
+ onReplayCommitError: (err) => error(`feishu[${accountId}]: failed to commit logical replay guard: ${String(err)}`)
6200
+ });
6160
6201
  return createFlush({
6161
6202
  lifecycle,
6162
6203
  dispatch: async (admissionLifecycle) => {
@@ -6167,19 +6208,19 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
6167
6208
  }
6168
6209
  try {
6169
6210
  if (activeEntries.length === 1) {
6170
- await dispatchFeishuMessage(last.event, resolveFeishuMessageDedupeKey(last.event), last.processingClaim, admissionLifecycle);
6211
+ await dispatchFeishuMessage(last.event, last.messageDedupeKey, last.processingClaim, admissionLifecycle);
6171
6212
  await settle();
6172
6213
  return;
6173
6214
  }
6174
6215
  const dedupedEntries = dedupeFeishuDebounceEntriesByDedupeKey(activeEntries);
6175
6216
  const freshEntries = [];
6176
- for (const entry of dedupedEntries) if (!await hasProcessedMessage(resolveFeishuMessageDedupeKey(entry.event), accountId, log)) freshEntries.push(entry);
6217
+ for (const entry of dedupedEntries) if (!await hasProcessedMessage(entry.messageDedupeKey, accountId, log)) freshEntries.push(entry);
6177
6218
  const dispatchEntry = freshEntries.at(-1);
6178
6219
  if (!dispatchEntry) {
6179
6220
  await settle();
6180
6221
  return;
6181
6222
  }
6182
- const dispatchDedupeKey = resolveFeishuMessageDedupeKey(dispatchEntry.event);
6223
+ const dispatchDedupeKey = dispatchEntry.messageDedupeKey;
6183
6224
  if (!lifecycle) await recordSuppressedMessageIds(dedupedEntries, dispatchDedupeKey);
6184
6225
  const combinedText = freshEntries.map((entry) => resolveDebounceText(entry.event)).filter(Boolean).join("\n");
6185
6226
  const mergedMentions = resolveFeishuDebounceMentions({
@@ -6217,6 +6258,10 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
6217
6258
  });
6218
6259
  return async (data) => {
6219
6260
  const turnAdoptionLifecycle = resolveIngressLifecycle?.(data);
6261
+ if (!isAccountActive() || turnAdoptionLifecycle?.abortSignal.aborted) {
6262
+ await turnAdoptionLifecycle?.onAbandoned();
6263
+ return;
6264
+ }
6220
6265
  const completeSuppressedIngress = async () => {
6221
6266
  if (!turnAdoptionLifecycle) return;
6222
6267
  turnAdoptionLifecycle.onAdoptionFinalizing();
@@ -6237,11 +6282,21 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
6237
6282
  await completeSuppressedIngress();
6238
6283
  return;
6239
6284
  }
6285
+ const messageDedupeKey = resolveFeishuMessageDedupeKey(event);
6240
6286
  const claim = await claimUnprocessedFeishuMessage({
6241
- messageId: resolveFeishuMessageDedupeKey(event),
6287
+ messageId: messageDedupeKey,
6242
6288
  namespace: accountId,
6243
6289
  log
6244
6290
  });
6291
+ if (!isAccountActive() || turnAdoptionLifecycle?.abortSignal.aborted) {
6292
+ const stoppedError = /* @__PURE__ */ new Error("feishu account stopped before message admission");
6293
+ if (claim.kind === "claimed") claim.handle.release({ error: stoppedError });
6294
+ await turnAdoptionLifecycle?.onAbandoned();
6295
+ return {
6296
+ kind: "failed-retryable",
6297
+ error: stoppedError
6298
+ };
6299
+ }
6245
6300
  if (claim.kind === "duplicate" || claim.kind === "inflight") {
6246
6301
  log(`feishu[${accountId}]: dropping ${claim.kind} event for message ${messageId}`);
6247
6302
  await completeSuppressedIngress();
@@ -6249,6 +6304,7 @@ function createFeishuMessageReceiveHandler({ cfg, channelRuntime, accountId, run
6249
6304
  }
6250
6305
  const debounceEntry = {
6251
6306
  event,
6307
+ messageDedupeKey,
6252
6308
  ...claim.kind === "claimed" ? { processingClaim: claim.handle } : {},
6253
6309
  ...turnAdoptionLifecycle ? { turnAdoptionLifecycle } : {}
6254
6310
  };
@@ -6298,6 +6354,7 @@ function buildFeishuWebhookRateLimitKey(params) {
6298
6354
  //#region extensions/feishu/src/monitor.transport.ts
6299
6355
  const FEISHU_WEBHOOK_ACCEPTED_HEADER = "x-openclaw-delivery-accepted";
6300
6356
  const FEISHU_WEBHOOK_ACCEPTED_VALUE = "durable";
6357
+ const FEISHU_PRE_AUTH_MAX_IN_FLIGHT = 64;
6301
6358
  const FEISHU_WEBHOOK_TIMESTAMP_MAX_SKEW_MS = 36e5;
6302
6359
  const FEISHU_WS_RECONNECT_INITIAL_DELAY_MS = 1e3;
6303
6360
  const FEISHU_WS_RECONNECT_MAX_DELAY_MS = 3e4;
@@ -6524,6 +6581,11 @@ async function monitorWebhook({ account, accountId, runtime, abortSignal, eventD
6524
6581
  const path = account.config.webhookPath ?? "/feishu/events";
6525
6582
  if (normalizeFeishuWebhookPath(path) !== path) throw new Error(`Feishu account "${accountId}" webhookPath must be a canonical HTTP request path; run "openclaw doctor --fix" to repair it`);
6526
6583
  const host = account.config.webhookHost ?? "127.0.0.1";
6584
+ const preAuthInFlightLimiter = createWebhookInFlightLimiter({
6585
+ maxInFlightPerKey: FEISHU_PRE_AUTH_MAX_IN_FLIGHT,
6586
+ maxTrackedKeys: 1
6587
+ });
6588
+ const preAuthInFlightKey = `${accountId}:${path}`;
6527
6589
  log(`feishu[${accountId}]: starting Webhook server on ${host}:${port}, path ${path}...`);
6528
6590
  const server = http.createServer();
6529
6591
  server.on("request", (req, res) => {
@@ -6560,31 +6622,46 @@ async function monitorWebhook({ account, accountId, runtime, abortSignal, eventD
6560
6622
  nowMs: Date.now(),
6561
6623
  requireJsonContentType: true
6562
6624
  })) return;
6625
+ if (!preAuthInFlightLimiter.tryAcquire(preAuthInFlightKey)) {
6626
+ sendHttpRequestRejection(req, res, 429, "Rate limit exceeded", "text/plain; charset=utf-8").catch((err) => {
6627
+ error(`feishu[${accountId}]: webhook concurrency rejection failed: ${String(err)}`);
6628
+ });
6629
+ return;
6630
+ }
6563
6631
  const guard = installRequestBodyLimitGuard(req, res, {
6564
6632
  maxBytes: FEISHU_WEBHOOK_MAX_BODY_BYTES,
6565
6633
  timeoutMs: FEISHU_WEBHOOK_BODY_TIMEOUT_MS,
6566
6634
  responseFormat: "text"
6567
6635
  });
6568
- if (guard.isTripped()) return;
6636
+ if (guard.isTripped()) {
6637
+ preAuthInFlightLimiter.release(preAuthInFlightKey);
6638
+ return;
6639
+ }
6569
6640
  (async () => {
6570
6641
  try {
6571
- const body = await readWebhookBodyOrReject({
6572
- req,
6573
- res,
6574
- maxBytes: FEISHU_WEBHOOK_MAX_BODY_BYTES,
6575
- timeoutMs: FEISHU_WEBHOOK_BODY_TIMEOUT_MS,
6576
- profile: "pre-auth"
6577
- });
6578
- if (!body.ok || res.writableEnded) return;
6579
- if (guard.isTripped()) return;
6580
- const rawBody = body.value;
6581
- if (!isFeishuWebhookSignatureValid({
6582
- headers: req.headers,
6583
- rawBody,
6584
- encryptKey
6585
- })) {
6586
- respondText(res, 401, "Invalid signature");
6587
- return;
6642
+ let rawBody;
6643
+ try {
6644
+ const body = await readWebhookBodyOrReject({
6645
+ req,
6646
+ res,
6647
+ maxBytes: FEISHU_WEBHOOK_MAX_BODY_BYTES,
6648
+ timeoutMs: FEISHU_WEBHOOK_BODY_TIMEOUT_MS,
6649
+ profile: "pre-auth"
6650
+ });
6651
+ if (!body.ok || res.writableEnded) return;
6652
+ if (guard.isTripped()) return;
6653
+ rawBody = body.value;
6654
+ if (!isFeishuWebhookSignatureValid({
6655
+ headers: req.headers,
6656
+ rawBody,
6657
+ encryptKey
6658
+ })) {
6659
+ respondText(res, 401, "Invalid signature");
6660
+ return;
6661
+ }
6662
+ } finally {
6663
+ guard.dispose();
6664
+ preAuthInFlightLimiter.release(preAuthInFlightKey);
6588
6665
  }
6589
6666
  const payload = parseFeishuWebhookPayload(rawBody);
6590
6667
  if (!payload) {
@@ -6612,8 +6689,6 @@ async function monitorWebhook({ account, accountId, runtime, abortSignal, eventD
6612
6689
  } catch (err) {
6613
6690
  error(`feishu[${accountId}]: webhook handler error: ${String(err)}`);
6614
6691
  if (!res.headersSent) respondText(res, 500, "Internal Server Error");
6615
- } finally {
6616
- guard.dispose();
6617
6692
  }
6618
6693
  })();
6619
6694
  });
@@ -6723,22 +6798,94 @@ function buildSyntheticMessageEvent(turn) {
6723
6798
  }
6724
6799
  };
6725
6800
  }
6801
+ function createVcInviteAdoption(params) {
6802
+ const cancellation = new AbortController();
6803
+ const settled = createDeferred();
6804
+ let handedOff = false;
6805
+ let released = false;
6806
+ let adoption;
6807
+ const abandon = () => {
6808
+ if (released || adoption) return;
6809
+ released = true;
6810
+ params.abortSignal?.removeEventListener("abort", abandon);
6811
+ const error = params.abortSignal?.reason ?? /* @__PURE__ */ new Error("Feishu VC invitation abandoned before adoption");
6812
+ cancellation.abort(error);
6813
+ params.claim.release({ error });
6814
+ settled.resolve();
6815
+ };
6816
+ params.trackTask?.(settled.promise);
6817
+ params.abortSignal?.addEventListener("abort", abandon, { once: true });
6818
+ if (params.abortSignal?.aborted) abandon();
6819
+ return {
6820
+ lifecycle: {
6821
+ abortSignal: cancellation.signal,
6822
+ onAdopted: () => {
6823
+ if (adoption) return adoption;
6824
+ if (params.isAccountActive?.() === false) abandon();
6825
+ cancellation.signal.throwIfAborted();
6826
+ handedOff = true;
6827
+ params.abortSignal?.removeEventListener("abort", abandon);
6828
+ adoption = Promise.resolve().then(async () => {
6829
+ await params.claim.commit();
6830
+ }).finally(() => settled.resolve());
6831
+ return adoption;
6832
+ },
6833
+ onDeferred: () => {
6834
+ handedOff = true;
6835
+ },
6836
+ onAdoptionFinalizing: () => {
6837
+ handedOff = true;
6838
+ },
6839
+ onAbandoned: abandon
6840
+ },
6841
+ finish: async () => {
6842
+ if (!handedOff) abandon();
6843
+ await adoption;
6844
+ }
6845
+ };
6846
+ }
6726
6847
  async function dispatchVcMeetingInvitedTurn(params) {
6727
6848
  params.runtime?.log?.(`feishu[${params.accountId}]: vc meeting invited, dispatching synthetic p2p message sender=${params.turn.inviter.senderId} meeting_no=${params.turn.meetingNo}`);
6728
6849
  const event = setFeishuSyntheticDirectPreDispatchTarget(buildSyntheticMessageEvent(params.turn), `user:${params.turn.inviter.senderId}`);
6729
- await handleFeishuMessage({
6730
- cfg: params.cfg,
6731
- accountId: params.accountId,
6732
- event,
6733
- runtime: params.runtime,
6734
- channelRuntime: params.channelRuntime
6850
+ const claim = await claimUnprocessedFeishuMessage({
6851
+ messageId: resolveFeishuMessageDedupeKey(event),
6852
+ namespace: params.accountId,
6853
+ log: params.runtime?.log ?? console.log
6735
6854
  });
6855
+ if (claim.kind !== "claimed") return;
6856
+ if (params.abortSignal?.aborted || params.isAccountActive?.() === false) {
6857
+ claim.handle.release({ error: /* @__PURE__ */ new Error("Feishu account stopped before VC dispatch") });
6858
+ return;
6859
+ }
6860
+ const adoption = createVcInviteAdoption({
6861
+ claim: claim.handle,
6862
+ abortSignal: params.abortSignal,
6863
+ isAccountActive: params.isAccountActive,
6864
+ trackTask: params.trackTask
6865
+ });
6866
+ try {
6867
+ await handleFeishuMessage({
6868
+ trackTask: params.trackTask,
6869
+ cfg: params.cfg,
6870
+ accountId: params.accountId,
6871
+ event,
6872
+ runtime: params.runtime,
6873
+ channelRuntime: params.channelRuntime,
6874
+ turnAdoptionLifecycle: adoption.lifecycle
6875
+ });
6876
+ } catch (error) {
6877
+ await adoption.lifecycle.onAbandoned();
6878
+ throw error;
6879
+ } finally {
6880
+ await adoption.finish();
6881
+ }
6736
6882
  }
6737
6883
  function createFeishuVcMeetingInvitedHandler(params) {
6738
6884
  const { cfg, accountId, runtime, fireAndForget, autoJoin } = params;
6739
6885
  const log = runtime?.log ?? console.log;
6740
6886
  const error = runtime?.error ?? console.error;
6741
- return async (data) => {
6887
+ const handle = async (data) => {
6888
+ if (params.abortSignal?.aborted || params.isAccountActive?.() === false) return;
6742
6889
  if (!autoJoin) {
6743
6890
  log(`feishu[${accountId}]: ignoring vc meeting invite (vcAutoJoin=false)`);
6744
6891
  return;
@@ -6749,24 +6896,25 @@ function createFeishuVcMeetingInvitedHandler(params) {
6749
6896
  log(`feishu[${accountId}]: vc meeting invited event has invalid meeting_no or inviter identity, skipping`);
6750
6897
  return;
6751
6898
  }
6752
- const promise = dispatchVcMeetingInvitedTurn({
6899
+ await dispatchVcMeetingInvitedTurn({
6900
+ trackTask: params.trackTask,
6753
6901
  cfg,
6754
6902
  accountId,
6755
6903
  runtime,
6756
6904
  channelRuntime: params.channelRuntime,
6757
- turn
6905
+ turn,
6906
+ abortSignal: params.abortSignal,
6907
+ isAccountActive: params.isAccountActive
6758
6908
  });
6759
- if (fireAndForget) {
6760
- promise.catch((err) => {
6761
- error(`feishu[${accountId}]: error handling vc meeting invited event: ${String(err)}`);
6762
- });
6763
- return;
6764
- }
6765
- await promise;
6766
6909
  } catch (err) {
6767
6910
  error(`feishu[${accountId}]: error handling vc meeting invited event: ${String(err)}`);
6768
6911
  }
6769
6912
  };
6913
+ return (data) => {
6914
+ const task = handle(data);
6915
+ params.trackTask?.(task);
6916
+ return fireAndForget ? Promise.resolve() : task;
6917
+ };
6770
6918
  }
6771
6919
  //#endregion
6772
6920
  //#region extensions/feishu/src/sequential-key.ts
@@ -6789,7 +6937,7 @@ async function resolveReactionSyntheticEvent(params) {
6789
6937
  const senderUserId = event.user_id?.user_id?.trim();
6790
6938
  const senderId = senderOpenId || senderUserId;
6791
6939
  if (!emoji || !messageId || !senderId) return null;
6792
- const { resolveFeishuAccount } = await import("./accounts-cCMNFBKg.js").then((n) => n.t);
6940
+ const { resolveFeishuAccount } = await import("./accounts-DmU0xYPx.mjs").then((n) => n.t);
6793
6941
  const reactionNotifications = resolveFeishuAccount({
6794
6942
  cfg,
6795
6943
  accountId
@@ -6812,7 +6960,7 @@ async function resolveReactionSyntheticEvent(params) {
6812
6960
  return null;
6813
6961
  }
6814
6962
  const fallbackChatType = reactedMsg.chatType;
6815
- const resolvedChatType = normalizeFeishuChatType(event.chat_type) ?? fallbackChatType;
6963
+ const resolvedChatType = normalizeFeishuEventChatType(event.chat_type) ?? fallbackChatType;
6816
6964
  if (!resolvedChatType) {
6817
6965
  logger?.(`feishu[${accountId}]: skipping reaction ${emoji} on ${messageId} without chat type context`);
6818
6966
  return null;
@@ -6841,9 +6989,6 @@ async function resolveReactionSyntheticEvent(params) {
6841
6989
  }
6842
6990
  };
6843
6991
  }
6844
- function normalizeFeishuChatType(value) {
6845
- return value === "group" || value === "topic_group" || value === "private" || value === "p2p" ? value : void 0;
6846
- }
6847
6992
  function parseFeishuBotAddedEventPayload(value) {
6848
6993
  if (!isRecord(value) || !readStringValue(value.chat_id) || !isRecord(value.operator_id)) return null;
6849
6994
  return value;
@@ -6905,14 +7050,17 @@ function registerEventHandlers(eventDispatcher, context) {
6905
7050
  const log = runtime?.log ?? console.log;
6906
7051
  const error = runtime?.error ?? console.error;
6907
7052
  const runFeishuHandler = async (params) => {
7053
+ if (!context.isAccountActive()) return;
7054
+ const task = params.task();
7055
+ context.trackTask(task);
6908
7056
  if (fireAndForget) {
6909
- params.task().catch((err) => {
7057
+ task.catch((err) => {
6910
7058
  error(`${params.errorMessage}: ${String(err)}`);
6911
7059
  });
6912
7060
  return;
6913
7061
  }
6914
7062
  try {
6915
- await params.task();
7063
+ await task;
6916
7064
  } catch (err) {
6917
7065
  error(`${params.errorMessage}: ${String(err)}`);
6918
7066
  }
@@ -6925,6 +7073,8 @@ function registerEventHandlers(eventDispatcher, context) {
6925
7073
  runtime,
6926
7074
  chatHistories,
6927
7075
  fireAndForget,
7076
+ isAccountActive: context.isAccountActive,
7077
+ trackTask: context.trackTask,
6928
7078
  handleMessage: handleFeishuMessage,
6929
7079
  resolveDebounceText: ({ event, botOpenId, botName }) => parseFeishuMessageEvent(event, botOpenId, botName).content,
6930
7080
  hasProcessedMessage: hasProcessedFeishuMessage,
@@ -6968,7 +7118,10 @@ function registerEventHandlers(eventDispatcher, context) {
6968
7118
  runtime,
6969
7119
  fireAndForget,
6970
7120
  channelRuntime,
6971
- autoJoin: context.vcAutoJoin
7121
+ autoJoin: context.vcAutoJoin,
7122
+ abortSignal: context.abortSignal,
7123
+ isAccountActive: context.isAccountActive,
7124
+ trackTask: context.trackTask
6972
7125
  }),
6973
7126
  "im.message.reaction.created_v1": async (data) => {
6974
7127
  await runFeishuHandler({
@@ -6983,8 +7136,9 @@ function registerEventHandlers(eventDispatcher, context) {
6983
7136
  botOpenId: myBotId,
6984
7137
  logger: log
6985
7138
  });
6986
- if (!syntheticEvent) return;
7139
+ if (!syntheticEvent || !context.isAccountActive()) return;
6987
7140
  await handleFeishuMessage({
7141
+ trackTask: context.trackTask,
6988
7142
  cfg,
6989
7143
  event: syntheticEvent,
6990
7144
  botOpenId: myBotId,
@@ -7011,8 +7165,9 @@ function registerEventHandlers(eventDispatcher, context) {
7011
7165
  logger: log,
7012
7166
  action: "deleted"
7013
7167
  });
7014
- if (!syntheticEvent) return;
7168
+ if (!syntheticEvent || !context.isAccountActive()) return;
7015
7169
  await handleFeishuMessage({
7170
+ trackTask: context.trackTask,
7016
7171
  cfg,
7017
7172
  event: syntheticEvent,
7018
7173
  botOpenId: myBotId,
@@ -7031,30 +7186,30 @@ function registerEventHandlers(eventDispatcher, context) {
7031
7186
  runtime,
7032
7187
  chatHistories,
7033
7188
  fireAndForget,
7189
+ isAccountActive: context.isAccountActive,
7190
+ trackTask: context.trackTask,
7034
7191
  channelRuntime
7035
7192
  }),
7036
7193
  "card.action.trigger": async (data) => {
7037
- try {
7038
- const event = parseFeishuCardActionEventPayload(data);
7039
- if (!event) {
7040
- error(`feishu[${accountId}]: ignoring malformed card action payload`);
7041
- return;
7194
+ await runFeishuHandler({
7195
+ errorMessage: `feishu[${accountId}]: error handling card action`,
7196
+ task: async () => {
7197
+ const event = parseFeishuCardActionEventPayload(data);
7198
+ if (!event) {
7199
+ error(`feishu[${accountId}]: ignoring malformed card action payload`);
7200
+ return;
7201
+ }
7202
+ await handleFeishuCardAction({
7203
+ cfg,
7204
+ event,
7205
+ botOpenId: botOpenIds.get(accountId),
7206
+ runtime,
7207
+ channelRuntime,
7208
+ accountId,
7209
+ trackTask: context.trackTask
7210
+ });
7042
7211
  }
7043
- const promise = handleFeishuCardAction({
7044
- cfg,
7045
- event,
7046
- botOpenId: botOpenIds.get(accountId),
7047
- runtime,
7048
- channelRuntime,
7049
- accountId
7050
- });
7051
- if (fireAndForget) promise.catch((err) => {
7052
- error(`feishu[${accountId}]: error handling card action: ${String(err)}`);
7053
- });
7054
- else await promise;
7055
- } catch (err) {
7056
- error(`feishu[${accountId}]: error handling card action: ${String(err)}`);
7057
- }
7212
+ });
7058
7213
  }
7059
7214
  });
7060
7215
  }
@@ -7084,8 +7239,16 @@ async function monitorSingleAccount(params) {
7084
7239
  if (connectionMode === "webhook" && !account.verificationToken?.trim()) throw new Error(`Feishu account "${accountId}" webhook mode requires verificationToken`);
7085
7240
  if (connectionMode === "webhook" && !account.encryptKey?.trim()) throw new Error(`Feishu account "${accountId}" webhook mode requires encryptKey`);
7086
7241
  const warmupCount = await warmupDedupFromPluginState(accountId, log);
7242
+ if (abortSignal?.aborted) return;
7087
7243
  if (warmupCount > 0) log(`feishu[${accountId}]: dedup warmup loaded ${warmupCount} entries from plugin state`);
7088
7244
  let threadBindingManager;
7245
+ const accountStopped = new AbortController();
7246
+ const accountAbortSignal = abortSignal ? AbortSignal.any([abortSignal, accountStopped.signal]) : accountStopped.signal;
7247
+ const pendingTasks = /* @__PURE__ */ new Set();
7248
+ const trackTask = (task) => {
7249
+ pendingTasks.add(task);
7250
+ task.then(() => pendingTasks.delete(task), () => pendingTasks.delete(task));
7251
+ };
7089
7252
  try {
7090
7253
  const eventDispatcher = createEventDispatcher(account);
7091
7254
  const durableIngress = typeof eventDispatcher.invoke === "function" ? createFeishuDurableIngress({
@@ -7107,8 +7270,10 @@ async function monitorSingleAccount(params) {
7107
7270
  runtime,
7108
7271
  chatHistories,
7109
7272
  fireAndForget: params.fireAndForget ?? true,
7273
+ isAccountActive: () => !accountAbortSignal.aborted,
7274
+ trackTask,
7110
7275
  vcAutoJoin: account.config.vcAutoJoin === true,
7111
- abortSignal,
7276
+ abortSignal: accountAbortSignal,
7112
7277
  ...durableIngress ? { resolveIngressLifecycle: durableIngress.resolveLifecycle } : {},
7113
7278
  ...params.statusSink ? { statusSink: params.statusSink } : {}
7114
7279
  });
@@ -7133,7 +7298,12 @@ async function monitorSingleAccount(params) {
7133
7298
  ...params.statusSink ? { statusSink: params.statusSink } : {}
7134
7299
  });
7135
7300
  } finally {
7136
- await durableIngress?.stop();
7301
+ accountStopped.abort(/* @__PURE__ */ new Error("Feishu account stopped"));
7302
+ try {
7303
+ await durableIngress?.stop();
7304
+ } finally {
7305
+ while (pendingTasks.size > 0) await Promise.allSettled(pendingTasks);
7306
+ }
7137
7307
  }
7138
7308
  } finally {
7139
7309
  threadBindingManager?.stop();