@openclaw/feishu 2026.7.1 → 2026.7.2-beta.2

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 (750) hide show
  1. package/dist/{accounts-Bs5uJ4h0.js → accounts-BDoGHJDk.js} +29 -54
  2. package/dist/api.js +351 -195
  3. package/dist/{app-registration-BwQ-aGTe.js → app-registration-BzkyrVZu.js} +11 -11
  4. package/dist/{channel-DRQRQQQ3.js → channel-X30GQVwc.js} +591 -398
  5. package/dist/channel-plugin-api.js +1 -1
  6. package/dist/{channel.runtime-pvr-Y5ji.js → channel.runtime-By2uqa3Q.js} +272 -107
  7. package/dist/{client-B7EAV_Ss.js → client-87BmeMpj.js} +55 -29
  8. package/dist/contract-api.js +1 -1
  9. package/dist/{conversation-id-CdLdoot3.js → conversation-id-BeJL-wq7.js} +3 -0
  10. package/dist/doctor-contract-DXH5hux1.js +97 -0
  11. package/dist/doctor-contract-api.js +2 -0
  12. package/dist/{drive-D0lIhxqZ.js → drive-B4E8OXZ0.js} +181 -33
  13. package/dist/{monitor-CsbheK9J.js → monitor-CHl0bWzb.js} +3 -3
  14. package/dist/{monitor.account-Dr7do33p.js → monitor.account-BSRV2hIF.js} +529 -549
  15. package/dist/monitor.startup-Cy8NPGAX.js +43 -0
  16. package/dist/{probe-Dxyo9zlw.js → probe-BgboTHIn.js} +3 -6
  17. package/dist/{secret-contract-DLaBl9m4.js → secret-contract-DnlMcrn5.js} +14 -69
  18. package/dist/secret-contract-api.js +1 -1
  19. package/dist/{send-Be2GMA6Z.js → send-DrWM_Ilf.js} +67 -40
  20. package/dist/send-result-DsqTk27v.js +770 -0
  21. package/dist/{session-conversation-BYuoVJwl.js → session-conversation-BksWrfzm.js} +1 -1
  22. package/dist/session-key-api.js +1 -1
  23. package/dist/setup-api.js +1 -1
  24. package/dist/setup-entry.js +0 -5
  25. package/dist/{subagent-hooks-B2iWPYJ1.js → subagent-hooks-BKTOxB-T.js} +9 -5
  26. package/dist/subagent-hooks-api.js +1 -1
  27. package/node_modules/@types/debug/LICENSE +21 -0
  28. package/node_modules/@types/debug/README.md +69 -0
  29. package/node_modules/@types/debug/index.d.ts +50 -0
  30. package/node_modules/@types/debug/package.json +58 -0
  31. package/node_modules/@types/mdast/LICENSE +21 -0
  32. package/node_modules/@types/mdast/README.md +15 -0
  33. package/node_modules/@types/mdast/index.d.ts +1123 -0
  34. package/node_modules/@types/mdast/package.json +47 -0
  35. package/node_modules/@types/ms/LICENSE +21 -0
  36. package/node_modules/@types/ms/README.md +82 -0
  37. package/node_modules/@types/ms/index.d.ts +63 -0
  38. package/node_modules/@types/ms/package.json +26 -0
  39. package/node_modules/@types/unist/LICENSE +21 -0
  40. package/node_modules/@types/unist/README.md +15 -0
  41. package/node_modules/@types/unist/index.d.ts +119 -0
  42. package/node_modules/@types/unist/package.json +60 -0
  43. package/node_modules/character-entities/index.d.ts +6 -0
  44. package/node_modules/character-entities/index.js +2132 -0
  45. package/node_modules/character-entities/license +22 -0
  46. package/node_modules/character-entities/package.json +78 -0
  47. package/node_modules/character-entities/readme.md +152 -0
  48. package/node_modules/debug/LICENSE +20 -0
  49. package/node_modules/debug/README.md +481 -0
  50. package/node_modules/debug/package.json +64 -0
  51. package/node_modules/debug/src/browser.js +272 -0
  52. package/node_modules/debug/src/common.js +292 -0
  53. package/node_modules/debug/src/index.js +10 -0
  54. package/node_modules/debug/src/node.js +263 -0
  55. package/node_modules/decode-named-character-reference/index.d.ts +13 -0
  56. package/node_modules/decode-named-character-reference/index.d.ts.map +1 -0
  57. package/node_modules/decode-named-character-reference/index.dom.d.ts +6 -0
  58. package/node_modules/decode-named-character-reference/index.dom.d.ts.map +1 -0
  59. package/node_modules/decode-named-character-reference/index.dom.js +32 -0
  60. package/node_modules/decode-named-character-reference/index.js +19 -0
  61. package/node_modules/decode-named-character-reference/license +22 -0
  62. package/node_modules/decode-named-character-reference/package.json +90 -0
  63. package/node_modules/decode-named-character-reference/readme.md +136 -0
  64. package/node_modules/dequal/dist/index.js +86 -0
  65. package/node_modules/dequal/dist/index.min.js +1 -0
  66. package/node_modules/dequal/dist/index.mjs +84 -0
  67. package/node_modules/dequal/index.d.ts +1 -0
  68. package/node_modules/dequal/license +21 -0
  69. package/node_modules/dequal/lite/index.d.ts +1 -0
  70. package/node_modules/dequal/lite/index.js +31 -0
  71. package/node_modules/dequal/lite/index.min.js +1 -0
  72. package/node_modules/dequal/lite/index.mjs +29 -0
  73. package/node_modules/dequal/package.json +57 -0
  74. package/node_modules/dequal/readme.md +112 -0
  75. package/node_modules/devlop/lib/default.js +9 -0
  76. package/node_modules/devlop/lib/development.d.ts +84 -0
  77. package/node_modules/devlop/lib/development.js +238 -0
  78. package/node_modules/devlop/license +22 -0
  79. package/node_modules/devlop/package.json +80 -0
  80. package/node_modules/devlop/readme.md +360 -0
  81. package/node_modules/longest-streak/index.d.ts +11 -0
  82. package/node_modules/longest-streak/index.js +36 -0
  83. package/node_modules/longest-streak/license +22 -0
  84. package/node_modules/longest-streak/package.json +73 -0
  85. package/node_modules/longest-streak/readme.md +150 -0
  86. package/node_modules/markdown-table/index.d.ts +171 -0
  87. package/node_modules/markdown-table/index.d.ts.map +1 -0
  88. package/node_modules/markdown-table/index.js +393 -0
  89. package/node_modules/markdown-table/license +22 -0
  90. package/node_modules/markdown-table/package.json +77 -0
  91. package/node_modules/markdown-table/readme.md +344 -0
  92. package/node_modules/mdast-util-from-markdown/dev/index.d.ts +23 -0
  93. package/node_modules/mdast-util-from-markdown/dev/index.js +2 -0
  94. package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts +53 -0
  95. package/node_modules/mdast-util-from-markdown/dev/lib/index.d.ts.map +1 -0
  96. package/node_modules/mdast-util-from-markdown/dev/lib/index.js +1348 -0
  97. package/node_modules/mdast-util-from-markdown/dev/lib/types.d.ts +295 -0
  98. package/node_modules/mdast-util-from-markdown/dev/lib/types.js +2 -0
  99. package/node_modules/mdast-util-from-markdown/index.d.ts +23 -0
  100. package/node_modules/mdast-util-from-markdown/index.js +2 -0
  101. package/node_modules/mdast-util-from-markdown/lib/index.d.ts +53 -0
  102. package/node_modules/mdast-util-from-markdown/lib/index.d.ts.map +1 -0
  103. package/node_modules/mdast-util-from-markdown/lib/index.js +1177 -0
  104. package/node_modules/mdast-util-from-markdown/lib/types.d.ts +295 -0
  105. package/node_modules/mdast-util-from-markdown/lib/types.js +2 -0
  106. package/node_modules/mdast-util-from-markdown/license +22 -0
  107. package/node_modules/mdast-util-from-markdown/package.json +99 -0
  108. package/node_modules/mdast-util-from-markdown/readme.md +535 -0
  109. package/node_modules/mdast-util-gfm-table/index.d.ts +54 -0
  110. package/node_modules/mdast-util-gfm-table/index.js +2 -0
  111. package/node_modules/mdast-util-gfm-table/lib/index.d.ts +51 -0
  112. package/node_modules/mdast-util-gfm-table/lib/index.js +300 -0
  113. package/node_modules/mdast-util-gfm-table/license +22 -0
  114. package/node_modules/mdast-util-gfm-table/package.json +101 -0
  115. package/node_modules/mdast-util-gfm-table/readme.md +605 -0
  116. package/node_modules/mdast-util-phrasing/index.d.ts +1 -0
  117. package/node_modules/mdast-util-phrasing/index.js +1 -0
  118. package/node_modules/mdast-util-phrasing/lib/index.d.ts +3 -0
  119. package/node_modules/mdast-util-phrasing/lib/index.js +45 -0
  120. package/node_modules/mdast-util-phrasing/license +23 -0
  121. package/node_modules/mdast-util-phrasing/package.json +78 -0
  122. package/node_modules/mdast-util-phrasing/readme.md +200 -0
  123. package/node_modules/mdast-util-to-markdown/index.d.ts +16 -0
  124. package/node_modules/mdast-util-to-markdown/index.js +3 -0
  125. package/node_modules/mdast-util-to-markdown/lib/configure.d.ts +9 -0
  126. package/node_modules/mdast-util-to-markdown/lib/configure.d.ts.map +1 -0
  127. package/node_modules/mdast-util-to-markdown/lib/configure.js +79 -0
  128. package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts +17 -0
  129. package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.d.ts.map +1 -0
  130. package/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js +29 -0
  131. package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts +13 -0
  132. package/node_modules/mdast-util-to-markdown/lib/handle/break.d.ts.map +1 -0
  133. package/node_modules/mdast-util-to-markdown/lib/handle/break.js +30 -0
  134. package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts +13 -0
  135. package/node_modules/mdast-util-to-markdown/lib/handle/code.d.ts.map +1 -0
  136. package/node_modules/mdast-util-to-markdown/lib/handle/code.js +75 -0
  137. package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts +13 -0
  138. package/node_modules/mdast-util-to-markdown/lib/handle/definition.d.ts.map +1 -0
  139. package/node_modules/mdast-util-to-markdown/lib/handle/definition.js +76 -0
  140. package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts +24 -0
  141. package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.d.ts.map +1 -0
  142. package/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js +69 -0
  143. package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts +13 -0
  144. package/node_modules/mdast-util-to-markdown/lib/handle/heading.d.ts.map +1 -0
  145. package/node_modules/mdast-util-to-markdown/lib/handle/heading.js +75 -0
  146. package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts +15 -0
  147. package/node_modules/mdast-util-to-markdown/lib/handle/html.d.ts.map +1 -0
  148. package/node_modules/mdast-util-to-markdown/lib/handle/html.js +20 -0
  149. package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts +21 -0
  150. package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.d.ts.map +1 -0
  151. package/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js +63 -0
  152. package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts +21 -0
  153. package/node_modules/mdast-util-to-markdown/lib/handle/image.d.ts.map +1 -0
  154. package/node_modules/mdast-util-to-markdown/lib/handle/image.js +82 -0
  155. package/node_modules/mdast-util-to-markdown/lib/handle/index.d.ts +42 -0
  156. package/node_modules/mdast-util-to-markdown/lib/handle/index.d.ts.map +1 -0
  157. package/node_modules/mdast-util-to-markdown/lib/handle/index.js +45 -0
  158. package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts +19 -0
  159. package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.d.ts.map +1 -0
  160. package/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +76 -0
  161. package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts +21 -0
  162. package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.d.ts.map +1 -0
  163. package/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js +63 -0
  164. package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts +24 -0
  165. package/node_modules/mdast-util-to-markdown/lib/handle/link.d.ts.map +1 -0
  166. package/node_modules/mdast-util-to-markdown/lib/handle/link.js +114 -0
  167. package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts +13 -0
  168. package/node_modules/mdast-util-to-markdown/lib/handle/list-item.d.ts.map +1 -0
  169. package/node_modules/mdast-util-to-markdown/lib/handle/list-item.js +62 -0
  170. package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts +13 -0
  171. package/node_modules/mdast-util-to-markdown/lib/handle/list.d.ts.map +1 -0
  172. package/node_modules/mdast-util-to-markdown/lib/handle/list.js +100 -0
  173. package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts +17 -0
  174. package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.d.ts.map +1 -0
  175. package/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js +20 -0
  176. package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts +13 -0
  177. package/node_modules/mdast-util-to-markdown/lib/handle/root.d.ts.map +1 -0
  178. package/node_modules/mdast-util-to-markdown/lib/handle/root.js +23 -0
  179. package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts +24 -0
  180. package/node_modules/mdast-util-to-markdown/lib/handle/strong.d.ts.map +1 -0
  181. package/node_modules/mdast-util-to-markdown/lib/handle/strong.js +69 -0
  182. package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts +17 -0
  183. package/node_modules/mdast-util-to-markdown/lib/handle/text.d.ts.map +1 -0
  184. package/node_modules/mdast-util-to-markdown/lib/handle/text.js +15 -0
  185. package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts +11 -0
  186. package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.d.ts.map +1 -0
  187. package/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js +21 -0
  188. package/node_modules/mdast-util-to-markdown/lib/index.d.ts +14 -0
  189. package/node_modules/mdast-util-to-markdown/lib/index.d.ts.map +1 -0
  190. package/node_modules/mdast-util-to-markdown/lib/index.js +187 -0
  191. package/node_modules/mdast-util-to-markdown/lib/join.d.ts +4 -0
  192. package/node_modules/mdast-util-to-markdown/lib/join.d.ts.map +1 -0
  193. package/node_modules/mdast-util-to-markdown/lib/join.js +39 -0
  194. package/node_modules/mdast-util-to-markdown/lib/types.d.ts +965 -0
  195. package/node_modules/mdast-util-to-markdown/lib/types.js +2 -0
  196. package/node_modules/mdast-util-to-markdown/lib/unsafe.d.ts +4 -0
  197. package/node_modules/mdast-util-to-markdown/lib/unsafe.d.ts.map +1 -0
  198. package/node_modules/mdast-util-to-markdown/lib/unsafe.js +146 -0
  199. package/node_modules/mdast-util-to-markdown/lib/util/association.d.ts +2 -0
  200. package/node_modules/mdast-util-to-markdown/lib/util/association.d.ts.map +1 -0
  201. package/node_modules/mdast-util-to-markdown/lib/util/association.js +33 -0
  202. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts +11 -0
  203. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.d.ts.map +1 -0
  204. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +21 -0
  205. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts +8 -0
  206. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.d.ts.map +1 -0
  207. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js +38 -0
  208. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts +11 -0
  209. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.d.ts.map +1 -0
  210. package/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js +21 -0
  211. package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts +11 -0
  212. package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.d.ts.map +1 -0
  213. package/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js +21 -0
  214. package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts +11 -0
  215. package/node_modules/mdast-util-to-markdown/lib/util/check-fence.d.ts.map +1 -0
  216. package/node_modules/mdast-util-to-markdown/lib/util/check-fence.js +21 -0
  217. package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts +11 -0
  218. package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.d.ts.map +1 -0
  219. package/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +21 -0
  220. package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts +11 -0
  221. package/node_modules/mdast-util-to-markdown/lib/util/check-quote.d.ts.map +1 -0
  222. package/node_modules/mdast-util-to-markdown/lib/util/check-quote.js +21 -0
  223. package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts +11 -0
  224. package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.d.ts.map +1 -0
  225. package/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js +21 -0
  226. package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts +11 -0
  227. package/node_modules/mdast-util-to-markdown/lib/util/check-rule.d.ts.map +1 -0
  228. package/node_modules/mdast-util-to-markdown/lib/util/check-rule.js +21 -0
  229. package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts +11 -0
  230. package/node_modules/mdast-util-to-markdown/lib/util/check-strong.d.ts.map +1 -0
  231. package/node_modules/mdast-util-to-markdown/lib/util/check-strong.js +21 -0
  232. package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.d.ts +2 -0
  233. package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.d.ts.map +1 -0
  234. package/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.js +24 -0
  235. package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts +19 -0
  236. package/node_modules/mdast-util-to-markdown/lib/util/container-flow.d.ts.map +1 -0
  237. package/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +84 -0
  238. package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts +19 -0
  239. package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.d.ts.map +1 -0
  240. package/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +125 -0
  241. package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts +7 -0
  242. package/node_modules/mdast-util-to-markdown/lib/util/emphasis-strong-marker.d.ts.map +1 -0
  243. package/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.d.ts +10 -0
  244. package/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.d.ts.map +1 -0
  245. package/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js +11 -0
  246. package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts +33 -0
  247. package/node_modules/mdast-util-to-markdown/lib/util/encode-info.d.ts.map +1 -0
  248. package/node_modules/mdast-util-to-markdown/lib/util/encode-info.js +82 -0
  249. package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts +13 -0
  250. package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.d.ts.map +1 -0
  251. package/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js +22 -0
  252. package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts +9 -0
  253. package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.d.ts.map +1 -0
  254. package/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +34 -0
  255. package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts +9 -0
  256. package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.d.ts.map +1 -0
  257. package/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +34 -0
  258. package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.d.ts +2 -0
  259. package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.d.ts.map +1 -0
  260. package/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +35 -0
  261. package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts +12 -0
  262. package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.d.ts.map +1 -0
  263. package/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js +41 -0
  264. package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts +29 -0
  265. package/node_modules/mdast-util-to-markdown/lib/util/safe.d.ts.map +1 -0
  266. package/node_modules/mdast-util-to-markdown/lib/util/safe.js +174 -0
  267. package/node_modules/mdast-util-to-markdown/lib/util/track.d.ts +2 -0
  268. package/node_modules/mdast-util-to-markdown/lib/util/track.d.ts.map +1 -0
  269. package/node_modules/mdast-util-to-markdown/lib/util/track.js +55 -0
  270. package/node_modules/mdast-util-to-markdown/license +22 -0
  271. package/node_modules/mdast-util-to-markdown/package.json +132 -0
  272. package/node_modules/mdast-util-to-markdown/readme.md +750 -0
  273. package/node_modules/mdast-util-to-string/index.d.ts +2 -0
  274. package/node_modules/mdast-util-to-string/index.js +5 -0
  275. package/node_modules/mdast-util-to-string/lib/index.d.ts +31 -0
  276. package/node_modules/mdast-util-to-string/lib/index.js +108 -0
  277. package/node_modules/mdast-util-to-string/license +22 -0
  278. package/node_modules/mdast-util-to-string/package.json +78 -0
  279. package/node_modules/mdast-util-to-string/readme.md +218 -0
  280. package/node_modules/micromark/dev/index.d.ts +82 -0
  281. package/node_modules/micromark/dev/index.d.ts.map +1 -0
  282. package/node_modules/micromark/dev/index.js +68 -0
  283. package/node_modules/micromark/dev/lib/compile.d.ts +16 -0
  284. package/node_modules/micromark/dev/lib/compile.d.ts.map +1 -0
  285. package/node_modules/micromark/dev/lib/compile.js +1152 -0
  286. package/node_modules/micromark/dev/lib/constructs.d.ts +73 -0
  287. package/node_modules/micromark/dev/lib/constructs.d.ts.map +1 -0
  288. package/node_modules/micromark/dev/lib/constructs.js +101 -0
  289. package/node_modules/micromark/dev/lib/create-tokenizer.d.ts +46 -0
  290. package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -0
  291. package/node_modules/micromark/dev/lib/create-tokenizer.js +717 -0
  292. package/node_modules/micromark/dev/lib/initialize/content.d.ts +4 -0
  293. package/node_modules/micromark/dev/lib/initialize/content.d.ts.map +1 -0
  294. package/node_modules/micromark/dev/lib/initialize/content.js +99 -0
  295. package/node_modules/micromark/dev/lib/initialize/document.d.ts +10 -0
  296. package/node_modules/micromark/dev/lib/initialize/document.d.ts.map +1 -0
  297. package/node_modules/micromark/dev/lib/initialize/document.js +445 -0
  298. package/node_modules/micromark/dev/lib/initialize/flow.d.ts +4 -0
  299. package/node_modules/micromark/dev/lib/initialize/flow.d.ts.map +1 -0
  300. package/node_modules/micromark/dev/lib/initialize/flow.js +86 -0
  301. package/node_modules/micromark/dev/lib/initialize/text.d.ts +8 -0
  302. package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -0
  303. package/node_modules/micromark/dev/lib/initialize/text.js +244 -0
  304. package/node_modules/micromark/dev/lib/parse.d.ts +10 -0
  305. package/node_modules/micromark/dev/lib/parse.d.ts.map +1 -0
  306. package/node_modules/micromark/dev/lib/parse.js +58 -0
  307. package/node_modules/micromark/dev/lib/postprocess.d.ts +9 -0
  308. package/node_modules/micromark/dev/lib/postprocess.d.ts.map +1 -0
  309. package/node_modules/micromark/dev/lib/postprocess.js +19 -0
  310. package/node_modules/micromark/dev/lib/preprocess.d.ts +13 -0
  311. package/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -0
  312. package/node_modules/micromark/dev/lib/preprocess.js +141 -0
  313. package/node_modules/micromark/dev/stream.d.ts +35 -0
  314. package/node_modules/micromark/dev/stream.d.ts.map +1 -0
  315. package/node_modules/micromark/dev/stream.js +270 -0
  316. package/node_modules/micromark/index.d.ts +82 -0
  317. package/node_modules/micromark/index.d.ts.map +1 -0
  318. package/node_modules/micromark/index.js +60 -0
  319. package/node_modules/micromark/lib/compile.d.ts +16 -0
  320. package/node_modules/micromark/lib/compile.d.ts.map +1 -0
  321. package/node_modules/micromark/lib/compile.js +1060 -0
  322. package/node_modules/micromark/lib/constructs.d.ts +73 -0
  323. package/node_modules/micromark/lib/constructs.d.ts.map +1 -0
  324. package/node_modules/micromark/lib/constructs.js +85 -0
  325. package/node_modules/micromark/lib/create-tokenizer.d.ts +46 -0
  326. package/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -0
  327. package/node_modules/micromark/lib/create-tokenizer.js +611 -0
  328. package/node_modules/micromark/lib/initialize/content.d.ts +4 -0
  329. package/node_modules/micromark/lib/initialize/content.d.ts.map +1 -0
  330. package/node_modules/micromark/lib/initialize/content.js +79 -0
  331. package/node_modules/micromark/lib/initialize/document.d.ts +10 -0
  332. package/node_modules/micromark/lib/initialize/document.d.ts.map +1 -0
  333. package/node_modules/micromark/lib/initialize/document.js +362 -0
  334. package/node_modules/micromark/lib/initialize/flow.d.ts +4 -0
  335. package/node_modules/micromark/lib/initialize/flow.d.ts.map +1 -0
  336. package/node_modules/micromark/lib/initialize/flow.js +58 -0
  337. package/node_modules/micromark/lib/initialize/text.d.ts +8 -0
  338. package/node_modules/micromark/lib/initialize/text.d.ts.map +1 -0
  339. package/node_modules/micromark/lib/initialize/text.js +212 -0
  340. package/node_modules/micromark/lib/parse.d.ts +10 -0
  341. package/node_modules/micromark/lib/parse.d.ts.map +1 -0
  342. package/node_modules/micromark/lib/parse.js +56 -0
  343. package/node_modules/micromark/lib/postprocess.d.ts +9 -0
  344. package/node_modules/micromark/lib/postprocess.d.ts.map +1 -0
  345. package/node_modules/micromark/lib/postprocess.js +18 -0
  346. package/node_modules/micromark/lib/preprocess.d.ts +13 -0
  347. package/node_modules/micromark/lib/preprocess.d.ts.map +1 -0
  348. package/node_modules/micromark/lib/preprocess.js +115 -0
  349. package/node_modules/micromark/license +22 -0
  350. package/node_modules/micromark/package.json +100 -0
  351. package/node_modules/micromark/readme.md +488 -0
  352. package/node_modules/micromark/stream.d.ts +35 -0
  353. package/node_modules/micromark/stream.d.ts.map +1 -0
  354. package/node_modules/micromark/stream.js +256 -0
  355. package/node_modules/micromark-core-commonmark/dev/index.d.ts +23 -0
  356. package/node_modules/micromark-core-commonmark/dev/index.d.ts.map +1 -0
  357. package/node_modules/micromark-core-commonmark/dev/index.js +22 -0
  358. package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts +4 -0
  359. package/node_modules/micromark-core-commonmark/dev/lib/attention.d.ts.map +1 -0
  360. package/node_modules/micromark-core-commonmark/dev/lib/attention.js +300 -0
  361. package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts +4 -0
  362. package/node_modules/micromark-core-commonmark/dev/lib/autolink.d.ts.map +1 -0
  363. package/node_modules/micromark-core-commonmark/dev/lib/autolink.js +269 -0
  364. package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts +4 -0
  365. package/node_modules/micromark-core-commonmark/dev/lib/blank-line.d.ts.map +1 -0
  366. package/node_modules/micromark-core-commonmark/dev/lib/blank-line.js +62 -0
  367. package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts +4 -0
  368. package/node_modules/micromark-core-commonmark/dev/lib/block-quote.d.ts.map +1 -0
  369. package/node_modules/micromark-core-commonmark/dev/lib/block-quote.js +162 -0
  370. package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts +4 -0
  371. package/node_modules/micromark-core-commonmark/dev/lib/character-escape.d.ts.map +1 -0
  372. package/node_modules/micromark-core-commonmark/dev/lib/character-escape.js +69 -0
  373. package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts +4 -0
  374. package/node_modules/micromark-core-commonmark/dev/lib/character-reference.d.ts.map +1 -0
  375. package/node_modules/micromark-core-commonmark/dev/lib/character-reference.js +166 -0
  376. package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts +4 -0
  377. package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -0
  378. package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +514 -0
  379. package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts +4 -0
  380. package/node_modules/micromark-core-commonmark/dev/lib/code-indented.d.ts.map +1 -0
  381. package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +202 -0
  382. package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts +4 -0
  383. package/node_modules/micromark-core-commonmark/dev/lib/code-text.d.ts.map +1 -0
  384. package/node_modules/micromark-core-commonmark/dev/lib/code-text.js +257 -0
  385. package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts +7 -0
  386. package/node_modules/micromark-core-commonmark/dev/lib/content.d.ts.map +1 -0
  387. package/node_modules/micromark-core-commonmark/dev/lib/content.js +185 -0
  388. package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts +4 -0
  389. package/node_modules/micromark-core-commonmark/dev/lib/definition.d.ts.map +1 -0
  390. package/node_modules/micromark-core-commonmark/dev/lib/definition.js +295 -0
  391. package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts +4 -0
  392. package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.d.ts.map +1 -0
  393. package/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js +65 -0
  394. package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts +4 -0
  395. package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.d.ts.map +1 -0
  396. package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +233 -0
  397. package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts +4 -0
  398. package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -0
  399. package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +989 -0
  400. package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts +4 -0
  401. package/node_modules/micromark-core-commonmark/dev/lib/html-text.d.ts.map +1 -0
  402. package/node_modules/micromark-core-commonmark/dev/lib/html-text.js +783 -0
  403. package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts +4 -0
  404. package/node_modules/micromark-core-commonmark/dev/lib/label-end.d.ts.map +1 -0
  405. package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +656 -0
  406. package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts +4 -0
  407. package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -0
  408. package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +110 -0
  409. package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts +4 -0
  410. package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -0
  411. package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +62 -0
  412. package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts +4 -0
  413. package/node_modules/micromark-core-commonmark/dev/lib/line-ending.d.ts.map +1 -0
  414. package/node_modules/micromark-core-commonmark/dev/lib/line-ending.js +34 -0
  415. package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts +4 -0
  416. package/node_modules/micromark-core-commonmark/dev/lib/list.d.ts.map +1 -0
  417. package/node_modules/micromark-core-commonmark/dev/lib/list.js +306 -0
  418. package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts +4 -0
  419. package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -0
  420. package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +210 -0
  421. package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts +4 -0
  422. package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.d.ts.map +1 -0
  423. package/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js +120 -0
  424. package/node_modules/micromark-core-commonmark/index.d.ts +23 -0
  425. package/node_modules/micromark-core-commonmark/index.d.ts.map +1 -0
  426. package/node_modules/micromark-core-commonmark/index.js +22 -0
  427. package/node_modules/micromark-core-commonmark/lib/attention.d.ts +4 -0
  428. package/node_modules/micromark-core-commonmark/lib/attention.d.ts.map +1 -0
  429. package/node_modules/micromark-core-commonmark/lib/attention.js +241 -0
  430. package/node_modules/micromark-core-commonmark/lib/autolink.d.ts +4 -0
  431. package/node_modules/micromark-core-commonmark/lib/autolink.d.ts.map +1 -0
  432. package/node_modules/micromark-core-commonmark/lib/autolink.js +233 -0
  433. package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts +4 -0
  434. package/node_modules/micromark-core-commonmark/lib/blank-line.d.ts.map +1 -0
  435. package/node_modules/micromark-core-commonmark/lib/blank-line.js +61 -0
  436. package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts +4 -0
  437. package/node_modules/micromark-core-commonmark/lib/block-quote.d.ts.map +1 -0
  438. package/node_modules/micromark-core-commonmark/lib/block-quote.js +143 -0
  439. package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts +4 -0
  440. package/node_modules/micromark-core-commonmark/lib/character-escape.d.ts.map +1 -0
  441. package/node_modules/micromark-core-commonmark/lib/character-escape.js +64 -0
  442. package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts +4 -0
  443. package/node_modules/micromark-core-commonmark/lib/character-reference.d.ts.map +1 -0
  444. package/node_modules/micromark-core-commonmark/lib/character-reference.js +149 -0
  445. package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts +4 -0
  446. package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -0
  447. package/node_modules/micromark-core-commonmark/lib/code-fenced.js +460 -0
  448. package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts +4 -0
  449. package/node_modules/micromark-core-commonmark/lib/code-indented.d.ts.map +1 -0
  450. package/node_modules/micromark-core-commonmark/lib/code-indented.js +177 -0
  451. package/node_modules/micromark-core-commonmark/lib/code-text.d.ts +4 -0
  452. package/node_modules/micromark-core-commonmark/lib/code-text.d.ts.map +1 -0
  453. package/node_modules/micromark-core-commonmark/lib/code-text.js +225 -0
  454. package/node_modules/micromark-core-commonmark/lib/content.d.ts +7 -0
  455. package/node_modules/micromark-core-commonmark/lib/content.d.ts.map +1 -0
  456. package/node_modules/micromark-core-commonmark/lib/content.js +163 -0
  457. package/node_modules/micromark-core-commonmark/lib/definition.d.ts +4 -0
  458. package/node_modules/micromark-core-commonmark/lib/definition.d.ts.map +1 -0
  459. package/node_modules/micromark-core-commonmark/lib/definition.js +254 -0
  460. package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts +4 -0
  461. package/node_modules/micromark-core-commonmark/lib/hard-break-escape.d.ts.map +1 -0
  462. package/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +60 -0
  463. package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts +4 -0
  464. package/node_modules/micromark-core-commonmark/lib/heading-atx.d.ts.map +1 -0
  465. package/node_modules/micromark-core-commonmark/lib/heading-atx.js +195 -0
  466. package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts +4 -0
  467. package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -0
  468. package/node_modules/micromark-core-commonmark/lib/html-flow.js +876 -0
  469. package/node_modules/micromark-core-commonmark/lib/html-text.d.ts +4 -0
  470. package/node_modules/micromark-core-commonmark/lib/html-text.d.ts.map +1 -0
  471. package/node_modules/micromark-core-commonmark/lib/html-text.js +678 -0
  472. package/node_modules/micromark-core-commonmark/lib/label-end.d.ts +4 -0
  473. package/node_modules/micromark-core-commonmark/lib/label-end.d.ts.map +1 -0
  474. package/node_modules/micromark-core-commonmark/lib/label-end.js +560 -0
  475. package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts +4 -0
  476. package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -0
  477. package/node_modules/micromark-core-commonmark/lib/label-start-image.js +102 -0
  478. package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts +4 -0
  479. package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -0
  480. package/node_modules/micromark-core-commonmark/lib/label-start-link.js +55 -0
  481. package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts +4 -0
  482. package/node_modules/micromark-core-commonmark/lib/line-ending.d.ts.map +1 -0
  483. package/node_modules/micromark-core-commonmark/lib/line-ending.js +33 -0
  484. package/node_modules/micromark-core-commonmark/lib/list.d.ts +4 -0
  485. package/node_modules/micromark-core-commonmark/lib/list.d.ts.map +1 -0
  486. package/node_modules/micromark-core-commonmark/lib/list.js +213 -0
  487. package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts +4 -0
  488. package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -0
  489. package/node_modules/micromark-core-commonmark/lib/setext-underline.js +185 -0
  490. package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts +4 -0
  491. package/node_modules/micromark-core-commonmark/lib/thematic-break.d.ts.map +1 -0
  492. package/node_modules/micromark-core-commonmark/lib/thematic-break.js +102 -0
  493. package/node_modules/micromark-core-commonmark/license +22 -0
  494. package/node_modules/micromark-core-commonmark/package.json +74 -0
  495. package/node_modules/micromark-core-commonmark/readme.md +171 -0
  496. package/node_modules/micromark-extension-gfm-table/dev/index.d.ts +55 -0
  497. package/node_modules/micromark-extension-gfm-table/dev/index.js +2 -0
  498. package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts +38 -0
  499. package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.d.ts.map +1 -0
  500. package/node_modules/micromark-extension-gfm-table/dev/lib/edit-map.js +212 -0
  501. package/node_modules/micromark-extension-gfm-table/dev/lib/html.d.ts +11 -0
  502. package/node_modules/micromark-extension-gfm-table/dev/lib/html.d.ts.map +1 -0
  503. package/node_modules/micromark-extension-gfm-table/dev/lib/html.js +148 -0
  504. package/node_modules/micromark-extension-gfm-table/dev/lib/infer.d.ts +14 -0
  505. package/node_modules/micromark-extension-gfm-table/dev/lib/infer.d.ts.map +1 -0
  506. package/node_modules/micromark-extension-gfm-table/dev/lib/infer.js +64 -0
  507. package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.d.ts +18 -0
  508. package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.d.ts.map +1 -0
  509. package/node_modules/micromark-extension-gfm-table/dev/lib/syntax.js +941 -0
  510. package/node_modules/micromark-extension-gfm-table/index.d.ts +55 -0
  511. package/node_modules/micromark-extension-gfm-table/index.js +2 -0
  512. package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts +38 -0
  513. package/node_modules/micromark-extension-gfm-table/lib/edit-map.d.ts.map +1 -0
  514. package/node_modules/micromark-extension-gfm-table/lib/edit-map.js +202 -0
  515. package/node_modules/micromark-extension-gfm-table/lib/html.d.ts +11 -0
  516. package/node_modules/micromark-extension-gfm-table/lib/html.d.ts.map +1 -0
  517. package/node_modules/micromark-extension-gfm-table/lib/html.js +130 -0
  518. package/node_modules/micromark-extension-gfm-table/lib/infer.d.ts +14 -0
  519. package/node_modules/micromark-extension-gfm-table/lib/infer.d.ts.map +1 -0
  520. package/node_modules/micromark-extension-gfm-table/lib/infer.js +52 -0
  521. package/node_modules/micromark-extension-gfm-table/lib/syntax.d.ts +18 -0
  522. package/node_modules/micromark-extension-gfm-table/lib/syntax.d.ts.map +1 -0
  523. package/node_modules/micromark-extension-gfm-table/lib/syntax.js +819 -0
  524. package/node_modules/micromark-extension-gfm-table/license +22 -0
  525. package/node_modules/micromark-extension-gfm-table/package.json +128 -0
  526. package/node_modules/micromark-extension-gfm-table/readme.md +515 -0
  527. package/node_modules/micromark-factory-destination/dev/index.d.ts +42 -0
  528. package/node_modules/micromark-factory-destination/dev/index.d.ts.map +1 -0
  529. package/node_modules/micromark-factory-destination/dev/index.js +255 -0
  530. package/node_modules/micromark-factory-destination/index.d.ts +42 -0
  531. package/node_modules/micromark-factory-destination/index.d.ts.map +1 -0
  532. package/node_modules/micromark-factory-destination/index.js +206 -0
  533. package/node_modules/micromark-factory-destination/license +22 -0
  534. package/node_modules/micromark-factory-destination/package.json +57 -0
  535. package/node_modules/micromark-factory-destination/readme.md +234 -0
  536. package/node_modules/micromark-factory-label/dev/index.d.ts +37 -0
  537. package/node_modules/micromark-factory-label/dev/index.d.ts.map +1 -0
  538. package/node_modules/micromark-factory-label/dev/index.js +172 -0
  539. package/node_modules/micromark-factory-label/index.d.ts +37 -0
  540. package/node_modules/micromark-factory-label/index.d.ts.map +1 -0
  541. package/node_modules/micromark-factory-label/index.js +148 -0
  542. package/node_modules/micromark-factory-label/license +22 -0
  543. package/node_modules/micromark-factory-label/package.json +60 -0
  544. package/node_modules/micromark-factory-label/readme.md +224 -0
  545. package/node_modules/micromark-factory-space/dev/index.d.ts +37 -0
  546. package/node_modules/micromark-factory-space/dev/index.d.ts.map +1 -0
  547. package/node_modules/micromark-factory-space/dev/index.js +67 -0
  548. package/node_modules/micromark-factory-space/index.d.ts +37 -0
  549. package/node_modules/micromark-factory-space/index.d.ts.map +1 -0
  550. package/node_modules/micromark-factory-space/index.js +64 -0
  551. package/node_modules/micromark-factory-space/license +22 -0
  552. package/node_modules/micromark-factory-space/package.json +55 -0
  553. package/node_modules/micromark-factory-space/readme.md +225 -0
  554. package/node_modules/micromark-factory-title/dev/index.d.ts +36 -0
  555. package/node_modules/micromark-factory-title/dev/index.d.ts.map +1 -0
  556. package/node_modules/micromark-factory-title/dev/index.js +169 -0
  557. package/node_modules/micromark-factory-title/index.d.ts +36 -0
  558. package/node_modules/micromark-factory-title/index.d.ts.map +1 -0
  559. package/node_modules/micromark-factory-title/index.js +158 -0
  560. package/node_modules/micromark-factory-title/license +22 -0
  561. package/node_modules/micromark-factory-title/package.json +58 -0
  562. package/node_modules/micromark-factory-title/readme.md +229 -0
  563. package/node_modules/micromark-factory-whitespace/dev/index.d.ts +22 -0
  564. package/node_modules/micromark-factory-whitespace/dev/index.d.ts.map +1 -0
  565. package/node_modules/micromark-factory-whitespace/dev/index.js +53 -0
  566. package/node_modules/micromark-factory-whitespace/index.d.ts +22 -0
  567. package/node_modules/micromark-factory-whitespace/index.d.ts.map +1 -0
  568. package/node_modules/micromark-factory-whitespace/index.js +44 -0
  569. package/node_modules/micromark-factory-whitespace/license +22 -0
  570. package/node_modules/micromark-factory-whitespace/package.json +57 -0
  571. package/node_modules/micromark-factory-whitespace/readme.md +205 -0
  572. package/node_modules/micromark-util-character/dev/index.d.ts +195 -0
  573. package/node_modules/micromark-util-character/dev/index.d.ts.map +1 -0
  574. package/node_modules/micromark-util-character/dev/index.js +252 -0
  575. package/node_modules/micromark-util-character/index.d.ts +195 -0
  576. package/node_modules/micromark-util-character/index.d.ts.map +1 -0
  577. package/node_modules/micromark-util-character/index.js +246 -0
  578. package/node_modules/micromark-util-character/license +22 -0
  579. package/node_modules/micromark-util-character/package.json +57 -0
  580. package/node_modules/micromark-util-character/readme.md +446 -0
  581. package/node_modules/micromark-util-chunked/dev/index.d.ts +41 -0
  582. package/node_modules/micromark-util-chunked/dev/index.d.ts.map +1 -0
  583. package/node_modules/micromark-util-chunked/dev/index.js +89 -0
  584. package/node_modules/micromark-util-chunked/index.d.ts +41 -0
  585. package/node_modules/micromark-util-chunked/index.d.ts.map +1 -0
  586. package/node_modules/micromark-util-chunked/index.js +81 -0
  587. package/node_modules/micromark-util-chunked/license +22 -0
  588. package/node_modules/micromark-util-chunked/package.json +57 -0
  589. package/node_modules/micromark-util-chunked/readme.md +219 -0
  590. package/node_modules/micromark-util-classify-character/dev/index.d.ts +18 -0
  591. package/node_modules/micromark-util-classify-character/dev/index.d.ts.map +1 -0
  592. package/node_modules/micromark-util-classify-character/dev/index.js +38 -0
  593. package/node_modules/micromark-util-classify-character/index.d.ts +18 -0
  594. package/node_modules/micromark-util-classify-character/index.d.ts.map +1 -0
  595. package/node_modules/micromark-util-classify-character/index.js +27 -0
  596. package/node_modules/micromark-util-classify-character/license +22 -0
  597. package/node_modules/micromark-util-classify-character/package.json +59 -0
  598. package/node_modules/micromark-util-classify-character/readme.md +205 -0
  599. package/node_modules/micromark-util-combine-extensions/index.d.ts +22 -0
  600. package/node_modules/micromark-util-combine-extensions/index.d.ts.map +1 -0
  601. package/node_modules/micromark-util-combine-extensions/index.js +143 -0
  602. package/node_modules/micromark-util-combine-extensions/license +22 -0
  603. package/node_modules/micromark-util-combine-extensions/package.json +52 -0
  604. package/node_modules/micromark-util-combine-extensions/readme.md +201 -0
  605. package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts +16 -0
  606. package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.d.ts.map +1 -0
  607. package/node_modules/micromark-util-decode-numeric-character-reference/dev/index.js +42 -0
  608. package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts +16 -0
  609. package/node_modules/micromark-util-decode-numeric-character-reference/index.d.ts.map +1 -0
  610. package/node_modules/micromark-util-decode-numeric-character-reference/index.js +32 -0
  611. package/node_modules/micromark-util-decode-numeric-character-reference/license +22 -0
  612. package/node_modules/micromark-util-decode-numeric-character-reference/package.json +59 -0
  613. package/node_modules/micromark-util-decode-numeric-character-reference/readme.md +184 -0
  614. package/node_modules/micromark-util-decode-string/dev/index.d.ts +14 -0
  615. package/node_modules/micromark-util-decode-string/dev/index.d.ts.map +1 -0
  616. package/node_modules/micromark-util-decode-string/dev/index.js +53 -0
  617. package/node_modules/micromark-util-decode-string/index.d.ts +14 -0
  618. package/node_modules/micromark-util-decode-string/index.d.ts.map +1 -0
  619. package/node_modules/micromark-util-decode-string/index.js +45 -0
  620. package/node_modules/micromark-util-decode-string/license +22 -0
  621. package/node_modules/micromark-util-decode-string/package.json +63 -0
  622. package/node_modules/micromark-util-decode-string/readme.md +179 -0
  623. package/node_modules/micromark-util-encode/index.d.ts +14 -0
  624. package/node_modules/micromark-util-encode/index.d.ts.map +1 -0
  625. package/node_modules/micromark-util-encode/index.js +33 -0
  626. package/node_modules/micromark-util-encode/license +22 -0
  627. package/node_modules/micromark-util-encode/package.json +47 -0
  628. package/node_modules/micromark-util-encode/readme.md +176 -0
  629. package/node_modules/micromark-util-html-tag-name/index.d.ts +30 -0
  630. package/node_modules/micromark-util-html-tag-name/index.d.ts.map +1 -0
  631. package/node_modules/micromark-util-html-tag-name/index.js +93 -0
  632. package/node_modules/micromark-util-html-tag-name/license +22 -0
  633. package/node_modules/micromark-util-html-tag-name/package.json +47 -0
  634. package/node_modules/micromark-util-html-tag-name/readme.md +193 -0
  635. package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts +21 -0
  636. package/node_modules/micromark-util-normalize-identifier/dev/index.d.ts.map +1 -0
  637. package/node_modules/micromark-util-normalize-identifier/dev/index.js +38 -0
  638. package/node_modules/micromark-util-normalize-identifier/index.d.ts +21 -0
  639. package/node_modules/micromark-util-normalize-identifier/index.d.ts.map +1 -0
  640. package/node_modules/micromark-util-normalize-identifier/index.js +33 -0
  641. package/node_modules/micromark-util-normalize-identifier/license +22 -0
  642. package/node_modules/micromark-util-normalize-identifier/package.json +58 -0
  643. package/node_modules/micromark-util-normalize-identifier/readme.md +187 -0
  644. package/node_modules/micromark-util-resolve-all/index.d.ts +22 -0
  645. package/node_modules/micromark-util-resolve-all/index.d.ts.map +1 -0
  646. package/node_modules/micromark-util-resolve-all/index.js +32 -0
  647. package/node_modules/micromark-util-resolve-all/license +22 -0
  648. package/node_modules/micromark-util-resolve-all/package.json +48 -0
  649. package/node_modules/micromark-util-resolve-all/readme.md +238 -0
  650. package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts +36 -0
  651. package/node_modules/micromark-util-sanitize-uri/dev/index.d.ts.map +1 -0
  652. package/node_modules/micromark-util-sanitize-uri/dev/index.js +124 -0
  653. package/node_modules/micromark-util-sanitize-uri/index.d.ts +36 -0
  654. package/node_modules/micromark-util-sanitize-uri/index.d.ts.map +1 -0
  655. package/node_modules/micromark-util-sanitize-uri/index.js +107 -0
  656. package/node_modules/micromark-util-sanitize-uri/license +22 -0
  657. package/node_modules/micromark-util-sanitize-uri/package.json +59 -0
  658. package/node_modules/micromark-util-sanitize-uri/readme.md +214 -0
  659. package/node_modules/micromark-util-subtokenize/dev/index.d.ts +12 -0
  660. package/node_modules/micromark-util-subtokenize/dev/index.d.ts.map +1 -0
  661. package/node_modules/micromark-util-subtokenize/dev/index.js +284 -0
  662. package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts +161 -0
  663. package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.d.ts.map +1 -0
  664. package/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js +288 -0
  665. package/node_modules/micromark-util-subtokenize/index.d.ts +12 -0
  666. package/node_modules/micromark-util-subtokenize/index.d.ts.map +1 -0
  667. package/node_modules/micromark-util-subtokenize/index.js +228 -0
  668. package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts +161 -0
  669. package/node_modules/micromark-util-subtokenize/lib/splice-buffer.d.ts.map +1 -0
  670. package/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +251 -0
  671. package/node_modules/micromark-util-subtokenize/license +22 -0
  672. package/node_modules/micromark-util-subtokenize/package.json +60 -0
  673. package/node_modules/micromark-util-subtokenize/readme.md +181 -0
  674. package/node_modules/micromark-util-symbol/lib/codes.d.ts +139 -0
  675. package/node_modules/micromark-util-symbol/lib/codes.d.ts.map +1 -0
  676. package/node_modules/micromark-util-symbol/lib/codes.js +158 -0
  677. package/node_modules/micromark-util-symbol/lib/constants.d.ts +37 -0
  678. package/node_modules/micromark-util-symbol/lib/constants.d.ts.map +1 -0
  679. package/node_modules/micromark-util-symbol/lib/constants.js +44 -0
  680. package/node_modules/micromark-util-symbol/lib/default.d.ts +5 -0
  681. package/node_modules/micromark-util-symbol/lib/default.d.ts.map +1 -0
  682. package/node_modules/micromark-util-symbol/lib/default.js +4 -0
  683. package/node_modules/micromark-util-symbol/lib/types.d.ts +106 -0
  684. package/node_modules/micromark-util-symbol/lib/types.d.ts.map +1 -0
  685. package/node_modules/micromark-util-symbol/lib/types.js +453 -0
  686. package/node_modules/micromark-util-symbol/lib/values.d.ts +102 -0
  687. package/node_modules/micromark-util-symbol/lib/values.d.ts.map +1 -0
  688. package/node_modules/micromark-util-symbol/lib/values.js +109 -0
  689. package/node_modules/micromark-util-symbol/license +22 -0
  690. package/node_modules/micromark-util-symbol/package.json +43 -0
  691. package/node_modules/micromark-util-symbol/readme.md +168 -0
  692. package/node_modules/micromark-util-types/index.d.ts +1312 -0
  693. package/node_modules/micromark-util-types/index.js +2 -0
  694. package/node_modules/micromark-util-types/license +22 -0
  695. package/node_modules/micromark-util-types/package.json +71 -0
  696. package/node_modules/micromark-util-types/readme.md +151 -0
  697. package/node_modules/ms/index.js +162 -0
  698. package/node_modules/ms/license.md +21 -0
  699. package/node_modules/ms/package.json +38 -0
  700. package/node_modules/ms/readme.md +59 -0
  701. package/node_modules/unist-util-is/index.d.ts +5 -0
  702. package/node_modules/unist-util-is/index.d.ts.map +1 -0
  703. package/node_modules/unist-util-is/index.js +7 -0
  704. package/node_modules/unist-util-is/lib/index.d.ts +111 -0
  705. package/node_modules/unist-util-is/lib/index.d.ts.map +1 -0
  706. package/node_modules/unist-util-is/lib/index.js +296 -0
  707. package/node_modules/unist-util-is/license +22 -0
  708. package/node_modules/unist-util-is/package.json +103 -0
  709. package/node_modules/unist-util-is/readme.md +351 -0
  710. package/node_modules/unist-util-stringify-position/index.d.ts +1 -0
  711. package/node_modules/unist-util-stringify-position/index.js +1 -0
  712. package/node_modules/unist-util-stringify-position/lib/index.d.ts +61 -0
  713. package/node_modules/unist-util-stringify-position/lib/index.js +84 -0
  714. package/node_modules/unist-util-stringify-position/license +22 -0
  715. package/node_modules/unist-util-stringify-position/package.json +80 -0
  716. package/node_modules/unist-util-stringify-position/readme.md +206 -0
  717. package/node_modules/unist-util-visit/index.d.ts +9 -0
  718. package/node_modules/unist-util-visit/index.js +2 -0
  719. package/node_modules/unist-util-visit/lib/index.d.ts +195 -0
  720. package/node_modules/unist-util-visit/lib/index.d.ts.map +1 -0
  721. package/node_modules/unist-util-visit/lib/index.js +312 -0
  722. package/node_modules/unist-util-visit/license +22 -0
  723. package/node_modules/unist-util-visit/package.json +108 -0
  724. package/node_modules/unist-util-visit/readme.md +313 -0
  725. package/node_modules/unist-util-visit-parents/index.d.ts +14 -0
  726. package/node_modules/unist-util-visit-parents/index.js +2 -0
  727. package/node_modules/unist-util-visit-parents/lib/color.d.ts +6 -0
  728. package/node_modules/unist-util-visit-parents/lib/color.d.ts.map +1 -0
  729. package/node_modules/unist-util-visit-parents/lib/color.js +7 -0
  730. package/node_modules/unist-util-visit-parents/lib/color.node.d.ts +6 -0
  731. package/node_modules/unist-util-visit-parents/lib/color.node.d.ts.map +1 -0
  732. package/node_modules/unist-util-visit-parents/lib/color.node.js +7 -0
  733. package/node_modules/unist-util-visit-parents/lib/index.d.ts +219 -0
  734. package/node_modules/unist-util-visit-parents/lib/index.d.ts.map +1 -0
  735. package/node_modules/unist-util-visit-parents/lib/index.js +399 -0
  736. package/node_modules/unist-util-visit-parents/license +22 -0
  737. package/node_modules/unist-util-visit-parents/package.json +106 -0
  738. package/node_modules/unist-util-visit-parents/readme.md +388 -0
  739. package/node_modules/zwitch/index.d.ts +67 -0
  740. package/node_modules/zwitch/index.js +118 -0
  741. package/node_modules/zwitch/license +22 -0
  742. package/node_modules/zwitch/package.json +72 -0
  743. package/node_modules/zwitch/readme.md +226 -0
  744. package/npm-shrinkwrap.json +737 -3
  745. package/openclaw.plugin.json +164 -89
  746. package/package.json +10 -7
  747. package/skills/feishu-drive/SKILL.md +5 -2
  748. package/dist/legacy-state-migrations-api.js +0 -73
  749. package/dist/monitor.state-DAHbcR2N.js +0 -173
  750. package/dist/send-result-BMQw-YhV.js +0 -287
@@ -1,74 +1,61 @@
1
- import { a as resolveDefaultFeishuAccountId, d as isRecord$1, i as listFeishuAccountIds, n as inspectFeishuCredentials, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-Bs5uJ4h0.js";
2
- import { i as resolveReceiveIdType, n as looksLikeFeishuId, r as normalizeFeishuTarget, t as detectIdType } from "./targets-BUjQ1TcA.js";
3
- import { a as readNativeFeishuCardJson, n as createFeishuSendReceipt, u as createFeishuCardInteractionEnvelope } from "./send-result-BMQw-YhV.js";
4
- import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, o as resolveConfiguredFeishuGroupSessionScope, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-CdLdoot3.js";
1
+ import { a as resolveDefaultFeishuAccountId, d as isRecord$1, i as listFeishuAccountIds, n as inspectFeishuCredentials, o as resolveFeishuAccount, r as listEnabledFeishuAccounts, s as resolveFeishuRuntimeAccount } from "./accounts-BDoGHJDk.js";
2
+ import { i as resolveReceiveIdType, n as looksLikeFeishuId, r as normalizeFeishuTarget } from "./targets-BUjQ1TcA.js";
3
+ import { A as resolveFeishuChatType, D as resolveFeishuGroupToolPolicy, N as createFeishuCardInteractionEnvelope, _ as canEnumerateAllFeishuPeers, a as readNativeFeishuCardJson, b as resolveFeishuChatReadPreliminaryAuthorization, g as canEnumerateAllFeishuGroups, h as authorizeFeishuChatMemberRead, k as normalizeFeishuChatType, m as assertFeishuChatReadAllowed, n as createFeishuSendReceipt, u as chunkFeishuMarkdown, v as isFeishuGroupReadAllowed, w as resolveFeishuGroupConfig, y as isFeishuGroupReadEnabled } from "./send-result-DsqTk27v.js";
4
+ import { a as parseFeishuTargetId, i as parseFeishuDirectConversationId, n as buildFeishuModelOverrideParentCandidates, o as resolveConfiguredFeishuGroupSessionScope, r as parseFeishuConversationId, t as buildFeishuConversationId } from "./conversation-id-BeJL-wq7.js";
5
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DXH5hux1.js";
5
6
  import { t as messageActionTargetAliases } from "./security-audit-BIeA3W3Q.js";
6
- import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DLaBl9m4.js";
7
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DnlMcrn5.js";
7
8
  import { t as collectFeishuSecurityAuditFindings } from "./security-audit-shared-BIHeF-S_.js";
8
- import { t as resolveFeishuSessionConversation } from "./session-conversation-BYuoVJwl.js";
9
+ import { t as resolveFeishuSessionConversation } from "./session-conversation-BksWrfzm.js";
9
10
  import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
10
11
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
11
12
  import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
13
+ import { ToolAuthorizationError, createActionGate } from "openclaw/plugin-sdk/channel-actions";
12
14
  import { adaptScopedAccountAccessor, createHybridChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
13
15
  import { buildChannelOutboundSessionRoute, createChatChannelPlugin, stripChannelTargetPrefix } from "openclaw/plugin-sdk/channel-core";
14
16
  import { createAccountStatusSink, createRuntimeOutboundDelegates, defineChannelMessageAdapter } from "openclaw/plugin-sdk/channel-outbound";
15
17
  import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
16
18
  import { createAllowlistProviderGroupPolicyWarningCollector, projectConfigAccountIdWarningCollector } from "openclaw/plugin-sdk/channel-policy";
17
19
  import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime";
18
- import { createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter, listDirectoryGroupEntriesFromMapKeysAndAllowFrom, listDirectoryUserEntriesFromAllowFromAndMapKeys } from "openclaw/plugin-sdk/directory-runtime";
19
- import { interactiveReplyToPresentation, normalizeInteractiveReply, normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
20
+ import { applyDirectoryQueryAndLimit, createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter, listDirectoryGroupEntriesFromMapKeysAndAllowFrom, listDirectoryUserEntriesFromAllowFrom, listDirectoryUserEntriesFromAllowFromAndMapKeys } from "openclaw/plugin-sdk/directory-runtime";
21
+ import { interactiveReplyToPresentation, normalizeInteractiveReply, normalizeMessagePresentation, renderMessagePresentationChartFallbackText, renderMessagePresentationFallbackText, renderMessagePresentationTableFallbackText, resolveInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
20
22
  import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
21
23
  import { buildProbeChannelStatusSummary, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
22
24
  import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
23
- import { chunkTextForOutbound, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
24
- import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2, normalizeAccountId, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
25
- import { createResolvedApproverActionAuthAdapter, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
26
- import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
27
- import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives";
25
+ import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
26
+ import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2 } from "openclaw/plugin-sdk/account-resolution";
27
+ import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
28
28
  import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
29
29
  import { normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/account-id";
30
+ import { DmPolicySchema, GroupPolicySchema, buildChannelConfigSchema, buildGroupEntrySchema, buildMultiAccountChannelSchema } from "openclaw/plugin-sdk/channel-config-schema";
30
31
  import { z } from "zod";
31
32
  import { buildSecretInputSchema, hasConfiguredSecretInput as hasConfiguredSecretInput$2 } from "openclaw/plugin-sdk/secret-input";
32
33
  import fs from "node:fs";
33
34
  import os from "node:os";
34
35
  import path from "node:path";
35
36
  import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
36
- import { loadSessionStore, resolveSessionFilePath, resolveStorePath, updateSessionStore } from "openclaw/plugin-sdk/session-store-runtime";
37
+ import { deleteSessionEntry, isValidAgentHarnessSessionStoreEntry, listSessionEntries, loadTranscriptEventsSync, parseSqliteSessionFileMarker, resolveSessionStoreBackupPaths, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
37
38
  import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
38
- import { createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
39
- import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, createSetupTranslator, formatDocsLink, hasConfiguredSecretInput as hasConfiguredSecretInput$1, mergeAllowFromEntries, patchTopLevelChannelConfigSection, promptSingleChannelSecretInput, splitSetupEntries } from "openclaw/plugin-sdk/setup";
39
+ import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, createSetupTranslator, formatDocsLink, hasConfiguredSecretInput as hasConfiguredSecretInput$1, mergeAllowFromEntries, patchTopLevelChannelConfigSection, promptSingleChannelSecretInput, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
40
40
  //#region extensions/feishu/src/approval-auth.ts
41
41
  function normalizeFeishuApproverId(value) {
42
42
  const trimmed = normalizeOptionalLowercaseString(normalizeFeishuTarget(String(value)));
43
43
  return trimmed?.startsWith("ou_") ? trimmed : void 0;
44
44
  }
45
- const feishuApprovalAuth = createResolvedApproverActionAuthAdapter({
45
+ const feishuApprovalAuth = createChannelApprovalAuth({
46
46
  channelLabel: "Feishu",
47
- resolveApprovers: ({ cfg, accountId }) => {
48
- const account = resolveFeishuAccount({
47
+ resolveInputs: ({ cfg, accountId }) => {
48
+ return { allowFrom: resolveFeishuAccount({
49
49
  cfg,
50
50
  accountId
51
- }).config;
52
- return resolveApprovalApprovers({
53
- allowFrom: account.allowFrom,
54
- normalizeApprover: normalizeFeishuApproverId
55
- });
51
+ }).config.allowFrom };
56
52
  },
57
- normalizeSenderId: (value) => normalizeFeishuApproverId(value)
58
- });
53
+ normalizeApprover: normalizeFeishuApproverId
54
+ }).approvalAuth;
59
55
  //#endregion
60
56
  //#region extensions/feishu/src/config-schema.ts
61
57
  const ChannelActionsSchema = z.object({ reactions: z.boolean().optional() }).strict().optional();
62
- const DmPolicySchema = z.enum([
63
- "open",
64
- "pairing",
65
- "allowlist"
66
- ]);
67
- const GroupPolicySchema = z.union([z.enum([
68
- "open",
69
- "allowlist",
70
- "disabled"
71
- ]), z.literal("allowall").transform(() => "open")]);
58
+ const FeishuGroupPolicySchema = z.union([GroupPolicySchema, z.literal("allowall").transform(() => "open")]);
72
59
  const FeishuDomainSchema = z.union([z.enum(["feishu", "lark"]), z.string().url().startsWith("https://")]);
73
60
  const FeishuConnectionModeSchema = z.enum(["websocket", "webhook"]);
74
61
  const TtsOverrideSchema = z.object({
@@ -115,12 +102,18 @@ const RenderModeSchema = z.enum([
115
102
  "raw",
116
103
  "card"
117
104
  ]).optional();
118
- const StreamingModeSchema = z.boolean().optional();
119
- const BlockStreamingSchema = z.boolean().optional();
120
105
  const BlockStreamingCoalesceSchema = z.object({
121
- enabled: z.boolean().optional(),
122
- minDelayMs: z.number().int().positive().optional(),
123
- maxDelayMs: z.number().int().positive().optional()
106
+ minChars: z.number().int().positive().optional(),
107
+ maxChars: z.number().int().positive().optional(),
108
+ idleMs: z.number().int().nonnegative().optional()
109
+ }).strict().optional();
110
+ const FeishuStreamingSchema = z.object({
111
+ mode: z.enum(["off", "partial"]).optional(),
112
+ chunkMode: z.enum(["length", "newline"]).optional(),
113
+ block: z.object({
114
+ enabled: z.boolean().optional(),
115
+ coalesce: BlockStreamingCoalesceSchema
116
+ }).strict().optional()
124
117
  }).strict().optional();
125
118
  const ChannelHeartbeatVisibilitySchema = z.object({
126
119
  visibility: z.enum(["visible", "hidden"]).optional(),
@@ -194,17 +187,12 @@ const ReactionNotificationModeSchema = z.enum([
194
187
  * causing the reply to appear as a topic (话题) under the original message.
195
188
  */
196
189
  const ReplyInThreadSchema = z.enum(["disabled", "enabled"]).optional();
197
- const FeishuGroupSchema = z.object({
198
- requireMention: z.boolean().optional(),
190
+ const FeishuGroupSchema = buildGroupEntrySchema({
199
191
  tools: ToolPolicySchema,
200
- skills: z.array(z.string()).optional(),
201
- enabled: z.boolean().optional(),
202
- allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
203
- systemPrompt: z.string().optional(),
204
192
  groupSessionScope: GroupSessionScopeSchema,
205
193
  topicSessionMode: TopicSessionModeSchema,
206
194
  replyInThread: ReplyInThreadSchema
207
- }).strict();
195
+ }).omit({ toolsBySender: true });
208
196
  const FeishuSharedConfigShape = {
209
197
  webhookHost: z.string().optional(),
210
198
  webhookPort: z.number().int().positive().optional(),
@@ -213,7 +201,7 @@ const FeishuSharedConfigShape = {
213
201
  configWrites: z.boolean().optional(),
214
202
  dmPolicy: DmPolicySchema.optional(),
215
203
  allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
216
- groupPolicy: GroupPolicySchema.optional(),
204
+ groupPolicy: FeishuGroupPolicySchema.optional(),
217
205
  groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
218
206
  groupSenderAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
219
207
  requireMention: z.boolean().optional(),
@@ -222,14 +210,11 @@ const FeishuSharedConfigShape = {
222
210
  dmHistoryLimit: z.number().int().min(0).optional(),
223
211
  dms: z.record(z.string(), DmConfigSchema).optional(),
224
212
  textChunkLimit: z.number().int().positive().optional(),
225
- chunkMode: z.enum(["length", "newline"]).optional(),
226
- blockStreaming: BlockStreamingSchema,
227
- blockStreamingCoalesce: BlockStreamingCoalesceSchema,
228
213
  mediaMaxMb: z.number().positive().optional(),
229
214
  httpTimeoutMs: z.number().int().positive().max(3e5).optional(),
230
215
  heartbeat: ChannelHeartbeatVisibilitySchema,
231
216
  renderMode: RenderModeSchema,
232
- streaming: StreamingModeSchema,
217
+ streaming: FeishuStreamingSchema,
233
218
  tools: FeishuToolsConfigSchema,
234
219
  actions: ChannelActionsSchema,
235
220
  replyInThread: ReplyInThreadSchema,
@@ -256,7 +241,7 @@ const FeishuAccountConfigSchema = z.object({
256
241
  groupSessionScope: GroupSessionScopeSchema,
257
242
  topicSessionMode: TopicSessionModeSchema
258
243
  }).strict();
259
- const FeishuConfigSchema = z.object({
244
+ const FeishuChannelConfigSchema = buildChannelConfigSchema(buildMultiAccountChannelSchema(z.object({
260
245
  enabled: z.boolean().optional(),
261
246
  defaultAccount: z.string().optional(),
262
247
  appId: z.string().optional(),
@@ -269,15 +254,17 @@ const FeishuConfigSchema = z.object({
269
254
  ...FeishuSharedConfigShape,
270
255
  dmPolicy: DmPolicySchema.optional().default("pairing"),
271
256
  reactionNotifications: ReactionNotificationModeSchema.optional().default("own"),
272
- groupPolicy: GroupPolicySchema.optional().default("allowlist"),
257
+ groupPolicy: FeishuGroupPolicySchema.optional().default("allowlist"),
273
258
  requireMention: z.boolean().optional(),
274
259
  groupSessionScope: GroupSessionScopeSchema,
275
260
  topicSessionMode: TopicSessionModeSchema,
276
261
  dynamicAgentCreation: DynamicAgentCreationSchema,
277
262
  typingIndicator: z.boolean().optional().default(true),
278
- resolveSenderNames: z.boolean().optional().default(true),
279
- accounts: z.record(z.string(), FeishuAccountConfigSchema.optional()).optional()
280
- }).strict().superRefine((value, ctx) => {
263
+ resolveSenderNames: z.boolean().optional().default(true)
264
+ }).strict(), {
265
+ accountSchema: FeishuAccountConfigSchema,
266
+ optionalAccount: true
267
+ }).superRefine((value, ctx) => {
281
268
  const defaultAccount = value.defaultAccount?.trim();
282
269
  if (defaultAccount && value.accounts && Object.keys(value.accounts).length > 0) {
283
270
  const normalizedDefaultAccount = normalizeAccountId$1(defaultAccount);
@@ -333,7 +320,7 @@ const FeishuConfigSchema = z.object({
333
320
  message: "channels.feishu.dmPolicy=\"open\" requires channels.feishu.allowFrom to include \"*\""
334
321
  });
335
322
  }
336
- });
323
+ }), { jsonSchemaMode: "input" });
337
324
  //#endregion
338
325
  //#region extensions/feishu/src/directory.static.ts
339
326
  function toFeishuDirectoryPeers(ids) {
@@ -374,6 +361,27 @@ async function listFeishuDirectoryGroups(params) {
374
361
  limit: params.limit
375
362
  }).map((entry) => entry.id));
376
363
  }
364
+ async function listAuthorizedFeishuDirectoryPeers(params) {
365
+ return toFeishuDirectoryPeers(listDirectoryUserEntriesFromAllowFrom({
366
+ allowFrom: resolveFeishuAccount({
367
+ cfg: params.cfg,
368
+ accountId: params.accountId
369
+ }).config.allowFrom,
370
+ query: params.query,
371
+ limit: params.limit,
372
+ normalizeId: (entry) => normalizeFeishuTarget(entry) ?? entry
373
+ }).map((entry) => entry.id));
374
+ }
375
+ async function listAuthorizedFeishuDirectoryGroups(params) {
376
+ const account = resolveFeishuAccount({
377
+ cfg: params.cfg,
378
+ accountId: params.accountId
379
+ });
380
+ return toFeishuDirectoryGroups(applyDirectoryQueryAndLimit(listDirectoryGroupEntriesFromMapKeysAndAllowFrom({
381
+ groups: Object.fromEntries(Object.entries(account.config.groups ?? {}).filter(([, group]) => group?.enabled !== false)),
382
+ allowFrom: account.config.groupAllowFrom
383
+ }).filter((entry) => isFeishuGroupReadAllowed(params.cfg, account, entry.id, false)).map((entry) => entry.id), params));
384
+ }
377
385
  //#endregion
378
386
  //#region extensions/feishu/src/doctor.ts
379
387
  const FEISHU_STATE_DIR = "feishu";
@@ -407,6 +415,12 @@ function existsFile(filePath) {
407
415
  return false;
408
416
  }
409
417
  }
418
+ function resolveFeishuAgentSessionsDir(agentId) {
419
+ return path.join(resolveStateDir(), "agents", normalizeAgentId(agentId), "sessions");
420
+ }
421
+ function isSqliteTranscriptMarker(value) {
422
+ return parseSqliteSessionFileMarker(value) !== void 0;
423
+ }
410
424
  function safeReadDir(dir) {
411
425
  try {
412
426
  return fs.readdirSync(dir, { withFileTypes: true });
@@ -472,9 +486,11 @@ function resolveConfiguredDefaultAgentId(cfg) {
472
486
  function collectFeishuSessionTargets(params) {
473
487
  const byStorePath = /* @__PURE__ */ new Map();
474
488
  const addTarget = (target) => {
475
- byStorePath.set(path.resolve(target.storePath), {
489
+ const resolvedStorePath = path.resolve(target.storePath);
490
+ byStorePath.set(`${normalizeAgentId(target.agentId)}\0${resolvedStorePath}`, {
476
491
  ...target,
477
- storePath: path.resolve(target.storePath)
492
+ agentId: normalizeAgentId(target.agentId),
493
+ storePath: resolvedStorePath
478
494
  });
479
495
  };
480
496
  for (const agentId of collectConfiguredAgentIds(params.cfg)) addTarget({
@@ -528,16 +544,23 @@ function collectCorruptFeishuStateJsonFindings(feishuStateDir) {
528
544
  function resolveSessionTranscriptCandidates(params) {
529
545
  const candidates = /* @__PURE__ */ new Set();
530
546
  const sessionsDir = path.dirname(params.storePath);
547
+ const agentSessionsDir = resolveFeishuAgentSessionsDir(params.agentId);
531
548
  const addSafeCandidate = (candidate) => {
532
549
  const resolved = path.isAbsolute(candidate) ? path.resolve(candidate) : path.resolve(sessionsDir, candidate);
533
- if (resolved === sessionsDir || !isPathWithinRoot(resolved, sessionsDir)) return;
550
+ const isStoreCandidate = isPathWithinRoot(resolved, sessionsDir);
551
+ const isAgentSessionCandidate = isPathWithinRoot(resolved, agentSessionsDir);
552
+ if (resolved === sessionsDir || resolved === agentSessionsDir || !isStoreCandidate && !isAgentSessionCandidate) return false;
534
553
  candidates.add(resolved);
554
+ return true;
535
555
  };
536
556
  if (typeof params.entry.sessionId === "string" && /^[a-z0-9][a-z0-9._-]{0,127}$/i.test(params.entry.sessionId)) {
537
- candidates.add(resolveSessionFilePath(params.entry.sessionId, typeof params.entry.sessionFile === "string" ? { sessionFile: params.entry.sessionFile } : void 0, {
538
- agentId: params.agentId,
539
- sessionsDir
540
- }));
557
+ let addedExplicitCandidate = false;
558
+ if (typeof params.entry.sessionFile === "string" && params.entry.sessionFile.trim()) {
559
+ const explicitSessionFile = params.entry.sessionFile.trim();
560
+ if (isSqliteTranscriptMarker(explicitSessionFile)) return [];
561
+ addedExplicitCandidate = addSafeCandidate(explicitSessionFile);
562
+ }
563
+ if (!addedExplicitCandidate) candidates.add(path.join(sessionsDir, `${params.entry.sessionId}.jsonl`));
541
564
  return [...candidates].toSorted();
542
565
  }
543
566
  if (typeof params.entry.sessionFile === "string" && params.entry.sessionFile.trim()) addSafeCandidate(params.entry.sessionFile.trim());
@@ -556,6 +579,47 @@ function isBlankUserMessage(value) {
556
579
  function isUserMessage(value) {
557
580
  return isRecord(value) && value.type === "message" && isRecord(value.message) && value.message.role === "user";
558
581
  }
582
+ function inspectTranscriptEntries(params) {
583
+ let blankUserMessageRun = 0;
584
+ let maxBlankUserMessageRun = 0;
585
+ for (const entry of params.entries) if (isBlankUserMessage(entry)) {
586
+ blankUserMessageRun += 1;
587
+ maxBlankUserMessageRun = Math.max(maxBlankUserMessageRun, blankUserMessageRun);
588
+ } else if (isUserMessage(entry)) blankUserMessageRun = 0;
589
+ if (params.entries.length === 0) {
590
+ if (params.allowMissingSessionHeader) return null;
591
+ return {
592
+ kind: "invalid-session-transcript",
593
+ sessionKey: params.sessionKey,
594
+ storePath: params.storePath,
595
+ path: params.transcriptPath,
596
+ reason: "empty transcript"
597
+ };
598
+ }
599
+ const firstEntry = params.entries[0];
600
+ if (!isSessionHeader(firstEntry) && (!params.allowMissingSessionHeader || !isUserMessage(firstEntry) && !isBlankUserMessage(firstEntry))) return {
601
+ kind: "invalid-session-transcript",
602
+ sessionKey: params.sessionKey,
603
+ storePath: params.storePath,
604
+ path: params.transcriptPath,
605
+ reason: "invalid session header"
606
+ };
607
+ if ((params.malformedLines ?? 0) > 0) return {
608
+ kind: "invalid-session-transcript",
609
+ sessionKey: params.sessionKey,
610
+ storePath: params.storePath,
611
+ path: params.transcriptPath,
612
+ reason: `${params.malformedLines} malformed JSONL line(s)`
613
+ };
614
+ if (maxBlankUserMessageRun >= BLANK_USER_MESSAGE_REPAIR_THRESHOLD) return {
615
+ kind: "blank-user-message-run",
616
+ sessionKey: params.sessionKey,
617
+ storePath: params.storePath,
618
+ path: params.transcriptPath,
619
+ count: maxBlankUserMessageRun
620
+ };
621
+ return null;
622
+ }
559
623
  function inspectSessionTranscript(params) {
560
624
  let stat;
561
625
  try {
@@ -585,52 +649,54 @@ function inspectSessionTranscript(params) {
585
649
  }
586
650
  const entries = [];
587
651
  let malformedLines = 0;
588
- let blankUserMessageRun = 0;
589
- let maxBlankUserMessageRun = 0;
590
652
  for (const line of raw.split(/\r?\n/)) {
591
653
  if (!line.trim()) continue;
592
654
  try {
593
655
  const entry = JSON.parse(line);
594
656
  entries.push(entry);
595
- if (isBlankUserMessage(entry)) {
596
- blankUserMessageRun += 1;
597
- maxBlankUserMessageRun = Math.max(maxBlankUserMessageRun, blankUserMessageRun);
598
- } else if (isUserMessage(entry)) blankUserMessageRun = 0;
599
657
  } catch {
600
658
  malformedLines += 1;
601
659
  }
602
660
  }
603
- if (entries.length === 0) return {
604
- kind: "invalid-session-transcript",
605
- sessionKey: params.sessionKey,
606
- storePath: params.storePath,
607
- path: params.transcriptPath,
608
- reason: "empty transcript"
609
- };
610
- if (!isSessionHeader(entries[0])) return {
611
- kind: "invalid-session-transcript",
612
- sessionKey: params.sessionKey,
613
- storePath: params.storePath,
614
- path: params.transcriptPath,
615
- reason: "invalid session header"
616
- };
617
- if (malformedLines > 0) return {
618
- kind: "invalid-session-transcript",
619
- sessionKey: params.sessionKey,
620
- storePath: params.storePath,
621
- path: params.transcriptPath,
622
- reason: `${malformedLines} malformed JSONL line(s)`
623
- };
624
- if (maxBlankUserMessageRun >= BLANK_USER_MESSAGE_REPAIR_THRESHOLD) return {
625
- kind: "blank-user-message-run",
661
+ return inspectTranscriptEntries({
662
+ ...params,
663
+ entries,
664
+ malformedLines
665
+ });
666
+ }
667
+ function inspectSqliteSessionTranscript(params) {
668
+ if (typeof params.entry.sessionFile !== "string") return null;
669
+ const marker = parseSqliteSessionFileMarker(params.entry.sessionFile);
670
+ if (!marker) return null;
671
+ const sessionId = typeof params.entry.sessionId === "string" && params.entry.sessionId.trim() ? params.entry.sessionId.trim() : marker.sessionId;
672
+ let entries;
673
+ try {
674
+ entries = loadTranscriptEventsSync({
675
+ agentId: marker.agentId,
676
+ sessionId,
677
+ sessionKey: params.sessionKey,
678
+ storePath: marker.storePath
679
+ });
680
+ } catch {
681
+ return {
682
+ kind: "invalid-session-transcript",
683
+ sessionKey: params.sessionKey,
684
+ storePath: params.storePath,
685
+ path: params.entry.sessionFile,
686
+ reason: "unreadable"
687
+ };
688
+ }
689
+ return inspectTranscriptEntries({
626
690
  sessionKey: params.sessionKey,
627
691
  storePath: params.storePath,
628
- path: params.transcriptPath,
629
- count: maxBlankUserMessageRun
630
- };
631
- return null;
692
+ transcriptPath: params.entry.sessionFile,
693
+ allowMissingSessionHeader: true,
694
+ entries
695
+ });
632
696
  }
633
697
  function collectFeishuSessionFindings(params) {
698
+ const sqliteFinding = inspectSqliteSessionTranscript(params);
699
+ if (sqliteFinding) return [sqliteFinding];
634
700
  const transcriptCandidates = resolveSessionTranscriptCandidates(params);
635
701
  const existing = transcriptCandidates.filter(existsFile);
636
702
  if (transcriptCandidates.length > 0 && existing.length === 0) return [{
@@ -682,24 +748,23 @@ function inspectFeishuDoctorState(params) {
682
748
  cfg: params.cfg,
683
749
  env,
684
750
  stateDir
685
- })) {
686
- const store = loadSessionStore(target.storePath, { skipCache: true });
687
- for (const [key, entry] of Object.entries(store).toSorted(([left], [right]) => left.localeCompare(right))) {
688
- if (!isFeishuSessionEntry(key, entry)) continue;
689
- const sessionEntry = toFeishuSessionEntry(entry);
690
- sessionEntries.push({
691
- key,
692
- storePath: target.storePath,
693
- agentId: target.agentId,
694
- entry: sessionEntry
695
- });
696
- findings.push(...collectFeishuSessionFindings({
697
- sessionKey: key,
698
- storePath: target.storePath,
699
- agentId: target.agentId,
700
- entry: sessionEntry
701
- }));
702
- }
751
+ })) for (const { sessionKey: key, entry } of listSessionEntries({
752
+ agentId: target.agentId,
753
+ storePath: target.storePath
754
+ }).filter(({ sessionKey, entry: sessionEntry }) => !isValidAgentHarnessSessionStoreEntry(sessionKey, sessionEntry) && isFeishuSessionEntry(sessionKey, sessionEntry)).toSorted((left, right) => left.sessionKey.localeCompare(right.sessionKey))) {
755
+ const sessionEntry = toFeishuSessionEntry(entry);
756
+ sessionEntries.push({
757
+ key,
758
+ storePath: target.storePath,
759
+ agentId: target.agentId,
760
+ entry: sessionEntry
761
+ });
762
+ findings.push(...collectFeishuSessionFindings({
763
+ sessionKey: key,
764
+ storePath: target.storePath,
765
+ agentId: target.agentId,
766
+ entry: sessionEntry
767
+ }));
703
768
  }
704
769
  return {
705
770
  stateDir,
@@ -735,13 +800,19 @@ function movePathToBackup(params) {
735
800
  return true;
736
801
  }
737
802
  function copyStoreBackup(params) {
738
- if (!existsFile(params.storePath)) return;
739
- const targetPath = path.join(params.backupDir, "session-stores", params.agentId, path.basename(params.storePath));
740
- fs.mkdirSync(path.dirname(targetPath), {
741
- recursive: true,
742
- mode: 448
743
- });
744
- fs.copyFileSync(params.storePath, resolveUniquePath(targetPath));
803
+ const targetDir = path.join(params.backupDir, "session-stores", params.agentId);
804
+ for (const sourcePath of resolveSessionStoreBackupPaths({
805
+ agentId: params.agentId,
806
+ storePath: params.storePath
807
+ })) {
808
+ if (!existsFile(sourcePath)) continue;
809
+ const targetPath = path.join(targetDir, path.basename(sourcePath));
810
+ fs.mkdirSync(path.dirname(targetPath), {
811
+ recursive: true,
812
+ mode: 448
813
+ });
814
+ fs.copyFileSync(sourcePath, resolveUniquePath(targetPath));
815
+ }
745
816
  }
746
817
  function collectSessionArtifactPaths(params) {
747
818
  const artifacts = /* @__PURE__ */ new Set();
@@ -821,15 +892,22 @@ async function repairFeishuDoctorState(params) {
821
892
  agentId: group.agentId
822
893
  });
823
894
  const keys = new Set(group.entries.map((entry) => entry.key));
824
- const removedEntries = await updateSessionStore(storePath, (store) => {
825
- const removed = [];
826
- for (const key of keys) if (Object.hasOwn(store, key)) {
827
- delete store[key];
828
- const entry = group.entries.find((candidate) => candidate.key === key);
829
- if (entry) removed.push(entry);
830
- }
831
- return removed;
832
- }, { skipMaintenance: true });
895
+ const removedEntries = [];
896
+ for (const key of keys) {
897
+ const currentEntry = listSessionEntries({
898
+ agentId: group.agentId,
899
+ storePath
900
+ }).find((candidate) => candidate.sessionKey === key)?.entry;
901
+ if (!currentEntry || isValidAgentHarnessSessionStoreEntry(key, currentEntry)) continue;
902
+ if (!await deleteSessionEntry({
903
+ agentId: group.agentId,
904
+ archiveTranscript: true,
905
+ sessionKey: key,
906
+ storePath
907
+ })) continue;
908
+ const entry = group.entries.find((candidate) => candidate.key === key);
909
+ if (entry) removedEntries.push(entry);
910
+ }
833
911
  const removed = removedEntries.length;
834
912
  removedSessionEntries += removed;
835
913
  if (removed > 0) {
@@ -913,189 +991,43 @@ async function runFeishuDoctorSequence(params) {
913
991
  warningNotes: report.warnings
914
992
  };
915
993
  }
916
- const feishuDoctor = { runConfigSequence: async ({ cfg, env, shouldRepair }) => await runFeishuDoctorSequence({
917
- cfg,
918
- env,
919
- shouldRepair
920
- }) };
994
+ const feishuDoctor = {
995
+ legacyConfigRules,
996
+ normalizeCompatibilityConfig,
997
+ runConfigSequence: async ({ cfg, env, shouldRepair }) => await runFeishuDoctorSequence({
998
+ cfg,
999
+ env,
1000
+ shouldRepair
1001
+ })
1002
+ };
921
1003
  //#endregion
922
- //#region extensions/feishu/src/policy.ts
923
- const FEISHU_PROVIDER_PREFIX_RE = /^(feishu|lark):/i;
924
- const FEISHU_TYPED_PREFIX_RE = /^(chat|group|channel|user|dm|open_id):/i;
925
- const FEISHU_ID_KIND = "plugin:feishu-id";
926
- const feishuIngressIdentity = defineStableChannelIngressIdentity({
927
- key: "feishu-id",
928
- kind: FEISHU_ID_KIND,
929
- normalize: normalizeFeishuAllowEntry,
930
- sensitivity: "pii",
931
- aliases: [{
932
- key: "feishu-alt-id",
933
- kind: FEISHU_ID_KIND,
934
- normalizeEntry: () => null,
935
- normalizeSubject: normalizeFeishuAllowEntry,
936
- sensitivity: "pii"
937
- }],
938
- isWildcardEntry: (entry) => normalizeFeishuAllowEntry(entry) === "*",
939
- resolveEntryId: ({ entryIndex }) => `feishu-entry-${entryIndex + 1}`
940
- });
941
- function normalizeFeishuAllowEntry(raw) {
942
- const trimmed = raw.trim();
943
- if (!trimmed) return "";
944
- if (trimmed === "*") return "*";
945
- let withoutProviderPrefix = trimmed;
946
- while (FEISHU_PROVIDER_PREFIX_RE.test(withoutProviderPrefix)) withoutProviderPrefix = withoutProviderPrefix.replace(FEISHU_PROVIDER_PREFIX_RE, "").trim();
947
- if (withoutProviderPrefix === "*") return "*";
948
- const lowered = normalizeOptionalLowercaseString(withoutProviderPrefix) ?? "";
949
- if (!lowered) return "";
950
- const prefixed = lowered.match(FEISHU_TYPED_PREFIX_RE);
951
- if (prefixed?.[1]) {
952
- const kind = [
953
- "chat",
954
- "group",
955
- "channel"
956
- ].includes(prefixed[1]) ? "chat" : "user";
957
- const value = withoutProviderPrefix.slice(prefixed[0].length).trim();
958
- return value === "*" ? "*" : value ? `${kind}:${value}` : "";
1004
+ //#region extensions/feishu/src/presentation-card.ts
1005
+ const FEISHU_CARD_MAX_BYTES = 30 * 1024;
1006
+ const FEISHU_CARD_MAX_ELEMENTS = 200;
1007
+ function countFeishuCardElements(value, ancestors = /* @__PURE__ */ new Set()) {
1008
+ if (Array.isArray(value)) return value.reduce((count, entry) => count + countFeishuCardElements(entry, ancestors), 0);
1009
+ if (!value || typeof value !== "object") return 0;
1010
+ if (ancestors.has(value)) return 201;
1011
+ ancestors.add(value);
1012
+ const record = value;
1013
+ let count = typeof record.tag === "string" ? 1 : 0;
1014
+ for (const entry of Object.values(record)) {
1015
+ count += countFeishuCardElements(entry, ancestors);
1016
+ if (count > FEISHU_CARD_MAX_ELEMENTS) break;
959
1017
  }
960
- const detectedType = detectIdType(withoutProviderPrefix);
961
- if (detectedType === "chat_id") return `chat:${withoutProviderPrefix}`;
962
- if (detectedType === "open_id" || detectedType === "user_id") return `user:${withoutProviderPrefix}`;
963
- return "";
964
- }
965
- function normalizeFeishuDmPolicy(policy) {
966
- return policy === "open" || policy === "pairing" || policy === "allowlist" || policy === "disabled" ? policy : "pairing";
967
- }
968
- function normalizeFeishuGroupPolicy(policy) {
969
- return policy === "allowall" ? "open" : policy;
970
- }
971
- function createFeishuIngressSubject(params) {
972
- const ids = [params.primaryId, ...params.alternateIds ?? []].map((value) => value?.trim()).filter((value) => Boolean(value));
973
- return {
974
- stableId: ids[0],
975
- aliases: { "feishu-alt-id": ids[1] }
976
- };
977
- }
978
- function createFeishuIngressResolver(params) {
979
- return createChannelIngressResolver({
980
- channelId: "feishu",
981
- accountId: normalizeAccountId(params.accountId) ?? "default",
982
- identity: feishuIngressIdentity,
983
- cfg: params.cfg,
984
- ...params.readAllowFromStore ? { readStoreAllowFrom: params.readAllowFromStore } : {}
985
- });
1018
+ ancestors.delete(value);
1019
+ return count;
986
1020
  }
987
- async function resolveFeishuDmIngressAccess(params) {
988
- return await createFeishuIngressResolver({
989
- cfg: params.cfg,
990
- accountId: params.accountId,
991
- readAllowFromStore: params.readAllowFromStore
992
- }).message({
993
- subject: createFeishuIngressSubject({
994
- primaryId: params.senderOpenId,
995
- alternateIds: [params.senderUserId]
996
- }),
997
- conversation: {
998
- kind: "direct",
999
- id: params.conversationId
1000
- },
1001
- event: { mayPair: params.mayPair },
1002
- dmPolicy: normalizeFeishuDmPolicy(params.dmPolicy),
1003
- groupPolicy: "disabled",
1004
- allowFrom: params.allowFrom ?? [],
1005
- ...params.command ? { command: params.command } : {}
1006
- });
1007
- }
1008
- async function resolveFeishuGroupConversationIngressAccess(params) {
1009
- const groupPolicy = normalizeFeishuGroupPolicy(params.groupPolicy);
1010
- const groupAllowFrom = groupPolicy === "allowlist" && params.groupExplicitlyConfigured ? [...params.groupAllowFrom ?? [], params.chatId] : params.groupAllowFrom ?? [];
1011
- return await createFeishuIngressResolver({
1012
- cfg: params.cfg,
1013
- accountId: params.accountId
1014
- }).message({
1015
- subject: createFeishuIngressSubject({ primaryId: params.chatId }),
1016
- conversation: {
1017
- kind: "group",
1018
- id: params.chatId
1019
- },
1020
- dmPolicy: "disabled",
1021
- groupPolicy,
1022
- groupAllowFrom
1023
- });
1024
- }
1025
- async function resolveFeishuGroupSenderActivationIngressAccess(params) {
1026
- const groupAllowFrom = params.allowFrom ?? [];
1027
- return await createFeishuIngressResolver({
1028
- cfg: params.cfg,
1029
- accountId: params.accountId
1030
- }).message({
1031
- subject: createFeishuIngressSubject({
1032
- primaryId: params.senderOpenId,
1033
- alternateIds: [params.senderUserId]
1034
- }),
1035
- conversation: {
1036
- kind: "group",
1037
- id: params.chatId
1038
- },
1039
- dmPolicy: "disabled",
1040
- groupPolicy: groupAllowFrom.length > 0 ? "allowlist" : "open",
1041
- groupAllowFrom,
1042
- mentionFacts: {
1043
- canDetectMention: true,
1044
- wasMentioned: params.mentionedBot
1045
- },
1046
- policy: { activation: {
1047
- requireMention: params.requireMention,
1048
- allowTextCommands: false
1049
- } },
1050
- ...params.command ? { command: params.command } : {}
1051
- });
1052
- }
1053
- function resolveFeishuGroupConfig(params) {
1054
- const groups = params.cfg?.groups ?? {};
1055
- const wildcard = groups["*"];
1056
- const groupId = params.groupId?.trim();
1057
- if (!groupId) return;
1058
- const direct = groups[groupId];
1059
- if (direct) return direct;
1060
- const lowered = normalizeOptionalLowercaseString(groupId) ?? "";
1061
- const matchKey = Object.keys(groups).find((key) => normalizeOptionalLowercaseString(key) === lowered);
1062
- if (matchKey) return groups[matchKey];
1063
- return wildcard;
1064
- }
1065
- function hasExplicitFeishuGroupConfig(params) {
1066
- const groups = params.cfg?.groups ?? {};
1067
- const groupId = params.groupId?.trim();
1068
- if (!groupId) return false;
1069
- if (Object.hasOwn(groups, groupId) && groupId !== "*") return true;
1070
- const lowered = normalizeOptionalLowercaseString(groupId) ?? "";
1071
- return Object.keys(groups).some((key) => key !== "*" && normalizeOptionalLowercaseString(key) === lowered);
1072
- }
1073
- function resolveFeishuGroupToolPolicy(params) {
1074
- const cfg = params.cfg.channels?.feishu;
1075
- if (!cfg) return;
1076
- return resolveFeishuGroupConfig({
1077
- cfg,
1078
- groupId: params.groupId
1079
- })?.tools;
1021
+ function isFeishuCardWithinEnvelope(card) {
1022
+ try {
1023
+ return Buffer.byteLength(JSON.stringify(card), "utf8") <= FEISHU_CARD_MAX_BYTES && countFeishuCardElements(card) <= FEISHU_CARD_MAX_ELEMENTS;
1024
+ } catch {
1025
+ return false;
1026
+ }
1080
1027
  }
1081
- function resolveFeishuReplyPolicy(params) {
1082
- if (params.isDirectMessage) return { requireMention: false };
1083
- const feishuCfg = params.cfg.channels?.feishu;
1084
- const resolvedCfg = resolveMergedAccountConfig({
1085
- channelConfig: feishuCfg,
1086
- accounts: feishuCfg?.accounts,
1087
- accountId: normalizeAccountId(params.accountId),
1088
- normalizeAccountId,
1089
- omitKeys: ["defaultAccount"]
1090
- });
1091
- const groupRequireMention = resolveFeishuGroupConfig({
1092
- cfg: resolvedCfg,
1093
- groupId: params.groupId
1094
- })?.requireMention;
1095
- return { requireMention: typeof groupRequireMention === "boolean" ? groupRequireMention : typeof resolvedCfg.requireMention === "boolean" ? resolvedCfg.requireMention : params.groupPolicy !== "open" };
1028
+ function assertFeishuCardWithinEnvelope(card, label = "Feishu card") {
1029
+ if (!isFeishuCardWithinEnvelope(card)) throw new Error(`${label} exceeds the 30 KB or 200-element API limit.`);
1096
1030
  }
1097
- //#endregion
1098
- //#region extensions/feishu/src/presentation-card.ts
1099
1031
  function escapeFeishuCardMarkdownText(text) {
1100
1032
  return text.replace(/[&<>]/g, (char) => {
1101
1033
  switch (char) {
@@ -1117,11 +1049,13 @@ function resolveSafeFeishuButtonUrl(url) {
1117
1049
  }
1118
1050
  }
1119
1051
  function resolveFeishuButtonUrl(button) {
1052
+ if (button.action?.type === "url" || button.action?.type === "web-app") return button.action.url;
1053
+ if (button.action) return;
1120
1054
  return button.url ?? button.webApp?.url ?? button.web_app?.url;
1121
1055
  }
1122
1056
  function resolveFeishuCommandButtonValue(button) {
1123
- if (button.action?.type === "callback") return;
1124
1057
  if (button.action?.type === "command") return button.action.command;
1058
+ if (button.action) return;
1125
1059
  return button.value;
1126
1060
  }
1127
1061
  function mapFeishuButtonType(style) {
@@ -1171,6 +1105,14 @@ function buildFeishuCardElementsForBlock(block) {
1171
1105
  }];
1172
1106
  if (block.type === "divider") return [{ tag: "hr" }];
1173
1107
  if (block.type === "buttons") return block.buttons.map((button) => buildFeishuPayloadButton(button)).filter((button) => Boolean(button));
1108
+ if (block.type === "chart") return [{
1109
+ tag: "markdown",
1110
+ content: escapeFeishuCardMarkdownText(renderMessagePresentationChartFallbackText(block))
1111
+ }];
1112
+ if (block.type === "table") return [{
1113
+ tag: "markdown",
1114
+ content: escapeFeishuCardMarkdownText(renderMessagePresentationTableFallbackText(block))
1115
+ }];
1174
1116
  const labels = block.options.map((option) => `- ${option.label}`).join("\n");
1175
1117
  return [{
1176
1118
  tag: "markdown",
@@ -1427,7 +1369,7 @@ function applyNewAppSecurityPolicy(cfg, accountId, openId, groupPolicy) {
1427
1369
  next = patchFeishuConfig(next, accountId, groupPatch);
1428
1370
  return next;
1429
1371
  }
1430
- const loadAppRegistrationModule = createLazyRuntimeModule(() => import("./app-registration-BwQ-aGTe.js"));
1372
+ const loadAppRegistrationModule = createLazyRuntimeModule(() => import("./app-registration-BzkyrVZu.js"));
1431
1373
  async function promptFeishuDomain(params) {
1432
1374
  return await params.prompter.select({
1433
1375
  message: t("wizard.feishu.domainPrompt"),
@@ -1454,7 +1396,7 @@ async function promptFeishuSetupMethod(prompter) {
1454
1396
  initialValue: "manual"
1455
1397
  });
1456
1398
  }
1457
- async function runScanToCreate(prompter, domain) {
1399
+ async function runScanToCreate(prompter, domain, beforePersistentEffect) {
1458
1400
  const { beginAppRegistration, initAppRegistration, pollAppRegistration, printQrCode } = await loadAppRegistrationModule();
1459
1401
  try {
1460
1402
  await initAppRegistration(domain);
@@ -1462,6 +1404,7 @@ async function runScanToCreate(prompter, domain) {
1462
1404
  await prompter.note(t("wizard.feishu.scanUnavailable"), t("wizard.feishu.setupTitle"));
1463
1405
  return null;
1464
1406
  }
1407
+ await beforePersistentEffect?.();
1465
1408
  const begin = await beginAppRegistration(domain);
1466
1409
  await prompter.note(t("wizard.feishu.scanQr"), t("wizard.feishu.scanTitle"));
1467
1410
  await printQrCode(begin.qrUrl);
@@ -1508,7 +1451,7 @@ async function runNewAppFlow(params) {
1508
1451
  initialValue: currentDomain
1509
1452
  });
1510
1453
  scanDomain = selectedDomain;
1511
- const scanResult = setupMethod === "scan" ? await runScanToCreate(prompter, selectedDomain) : null;
1454
+ const scanResult = setupMethod === "scan" ? await runScanToCreate(prompter, selectedDomain, options?.beforePersistentEffect) : null;
1512
1455
  if (scanResult) {
1513
1456
  appId = scanResult.appId;
1514
1457
  appSecret = scanResult.appSecret;
@@ -1651,7 +1594,7 @@ const feishuSetupWizard = {
1651
1594
  });
1652
1595
  let probeResult = null;
1653
1596
  if (configured && account.configured) try {
1654
- const { probeFeishu } = await import("./probe-Dxyo9zlw.js").then((n) => n.n);
1597
+ const { probeFeishu } = await import("./probe-BgboTHIn.js").then((n) => n.n);
1655
1598
  probeResult = await probeFeishu(account);
1656
1599
  } catch {}
1657
1600
  if (!configured) return [formatFeishuStatusLine("needs-credentials")];
@@ -1687,11 +1630,7 @@ const feishuSetupWizard = {
1687
1630
  });
1688
1631
  },
1689
1632
  dmPolicy: feishuDmPolicy,
1690
- disable: (cfg) => patchTopLevelChannelConfigSection({
1691
- cfg,
1692
- channel,
1693
- patch: { enabled: false }
1694
- })
1633
+ disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
1695
1634
  };
1696
1635
  //#endregion
1697
1636
  //#region extensions/feishu/src/channel.ts
@@ -1727,7 +1666,7 @@ const meta = {
1727
1666
  order: 70,
1728
1667
  preferSessionLookupForAnnounceTarget: true
1729
1668
  };
1730
- const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-pvr-Y5ji.js"), "feishuChannelRuntime");
1669
+ const loadFeishuChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-By2uqa3Q.js"), "feishuChannelRuntime");
1731
1670
  function toFeishuMessageSendResult(result, kind) {
1732
1671
  const receipt = result.receipt ?? createFeishuSendReceipt({
1733
1672
  messageId: result.messageId,
@@ -1771,9 +1710,22 @@ const feishuMessageAdapter = defineChannelMessageAdapter({
1771
1710
  }
1772
1711
  });
1773
1712
  async function createFeishuActionClient(account) {
1774
- const { createFeishuClient } = await import("./client-B7EAV_Ss.js").then((n) => n.t);
1713
+ const { createFeishuClient } = await import("./client-87BmeMpj.js").then((n) => n.t);
1775
1714
  return createFeishuClient(account);
1776
1715
  }
1716
+ async function resolveFeishuChatTypeById(params) {
1717
+ const client = await createFeishuActionClient(params.account);
1718
+ return resolveFeishuChatType(await params.runtime.getChatInfo(client, params.chatId));
1719
+ }
1720
+ async function resolveFeishuMessageChatType(params) {
1721
+ const knownChatType = normalizeFeishuChatType(params.message.chatType);
1722
+ if (knownChatType) return knownChatType;
1723
+ return resolveFeishuChatTypeById({
1724
+ account: params.account,
1725
+ chatId: params.message.chatId,
1726
+ runtime: params.runtime
1727
+ });
1728
+ }
1777
1729
  const collectFeishuSecurityWarnings = createAllowlistProviderGroupPolicyWarningCollector({
1778
1730
  providerConfigPresent: (cfg) => cfg.channels?.feishu !== void 0,
1779
1731
  resolveGroupPolicy: ({ cfg, accountId }) => resolveFeishuAccount({
@@ -2017,6 +1969,119 @@ function resolveFeishuMessageId(params) {
2017
1969
  "reply_to"
2018
1970
  ]);
2019
1971
  }
1972
+ function resolveFeishuMessageReadTarget(ctx) {
1973
+ const explicitChatId = resolveFeishuChatId({ params: ctx.params });
1974
+ const currentChatId = resolveFeishuChatId({
1975
+ params: {},
1976
+ toolContext: ctx.toolContext
1977
+ });
1978
+ const chatId = explicitChatId ?? currentChatId;
1979
+ if (!chatId) return;
1980
+ const normalizedChatId = normalizeFeishuTarget(chatId) ?? chatId.trim();
1981
+ if (normalizedChatId !== (currentChatId ? normalizeFeishuTarget(currentChatId) ?? currentChatId.trim() : void 0)) return { chatId: normalizedChatId };
1982
+ return {
1983
+ chatId: normalizedChatId,
1984
+ chatType: ctx.toolContext?.currentChatType === "direct" ? "p2p" : ctx.toolContext?.currentChatType === "group" || ctx.toolContext?.currentChatType === "channel" ? "group" : void 0
1985
+ };
1986
+ }
1987
+ function assertFeishuMessageMatchesReadTarget(params) {
1988
+ if ((normalizeFeishuTarget(params.messageChatId) ?? params.messageChatId.trim()) !== params.authorizedChatId) throw new ToolAuthorizationError("Feishu message target is not allowed.");
1989
+ }
1990
+ async function authorizeFeishuMessageReadTarget(params) {
1991
+ const authorize = (chatType) => assertFeishuChatReadAllowed({
1992
+ cfg: params.ctx.cfg,
1993
+ account: params.account,
1994
+ chatId: params.target.chatId,
1995
+ chatType,
1996
+ ctx: params.ctx
1997
+ });
1998
+ if (params.target.chatType) return authorize(params.target.chatType);
1999
+ const preliminary = resolveFeishuChatReadPreliminaryAuthorization({
2000
+ cfg: params.ctx.cfg,
2001
+ account: params.account,
2002
+ chatId: params.target.chatId,
2003
+ ctx: params.ctx
2004
+ });
2005
+ if (preliminary.decision === "allow") return preliminary.chatId;
2006
+ if (preliminary.decision === "deny") throw new ToolAuthorizationError("Feishu read target is not allowed.");
2007
+ await getAuthorizedFeishuChatInfo({
2008
+ ctx: params.ctx,
2009
+ account: params.account,
2010
+ runtime: params.runtime,
2011
+ chatId: params.target.chatId
2012
+ });
2013
+ return preliminary.chatId;
2014
+ }
2015
+ async function getAuthorizedFeishuChatInfo(params) {
2016
+ const preliminary = resolveFeishuChatReadPreliminaryAuthorization({
2017
+ cfg: params.ctx.cfg,
2018
+ account: params.account,
2019
+ chatId: params.chatId,
2020
+ ctx: params.ctx
2021
+ });
2022
+ if (preliminary.decision === "deny") throw new ToolAuthorizationError("Feishu read target is not allowed.");
2023
+ const client = await createFeishuActionClient(params.account);
2024
+ let chat;
2025
+ try {
2026
+ chat = await params.runtime.getChatInfo(client, preliminary.chatId);
2027
+ } catch (error) {
2028
+ if (preliminary.decision === "needs-metadata") assertFeishuChatReadAllowed({
2029
+ cfg: params.ctx.cfg,
2030
+ account: params.account,
2031
+ chatId: preliminary.chatId,
2032
+ ctx: params.ctx
2033
+ });
2034
+ throw error;
2035
+ }
2036
+ assertFeishuChatReadAllowed({
2037
+ cfg: params.ctx.cfg,
2038
+ account: params.account,
2039
+ chatId: preliminary.chatId,
2040
+ chatType: resolveFeishuChatType(chat),
2041
+ ctx: params.ctx
2042
+ });
2043
+ return {
2044
+ chat,
2045
+ client
2046
+ };
2047
+ }
2048
+ async function getAuthorizedFeishuMessage(params) {
2049
+ const target = resolveFeishuMessageReadTarget(params.ctx);
2050
+ if (!target && params.ctx.conversationReadOrigin !== "direct-operator") throw new ToolAuthorizationError("Feishu message reads require a chat target or current conversation.");
2051
+ const authorizedChatId = target ? await authorizeFeishuMessageReadTarget({
2052
+ ctx: params.ctx,
2053
+ account: params.account,
2054
+ runtime: params.runtime,
2055
+ target
2056
+ }) : void 0;
2057
+ const message = await params.runtime.getMessageFeishu({
2058
+ cfg: params.ctx.cfg,
2059
+ messageId: params.messageId,
2060
+ accountId: params.ctx.accountId ?? void 0
2061
+ });
2062
+ if (!message) return null;
2063
+ if (authorizedChatId) assertFeishuMessageMatchesReadTarget({
2064
+ authorizedChatId,
2065
+ messageChatId: message.chatId
2066
+ });
2067
+ assertFeishuChatReadAllowed({
2068
+ cfg: params.ctx.cfg,
2069
+ account: params.account,
2070
+ chatId: message.chatId,
2071
+ chatType: await resolveFeishuMessageChatType({
2072
+ account: params.account,
2073
+ message,
2074
+ runtime: params.runtime
2075
+ }),
2076
+ ctx: params.ctx
2077
+ });
2078
+ return message;
2079
+ }
2080
+ async function requireAuthorizedFeishuMessage(params) {
2081
+ const message = await getAuthorizedFeishuMessage(params);
2082
+ if (!message) throw new Error(`Feishu message not found: ${params.messageId}`);
2083
+ return message;
2084
+ }
2020
2085
  function resolveFeishuMemberId(params) {
2021
2086
  return readFirstString(params, [
2022
2087
  "memberId",
@@ -2030,6 +2095,9 @@ function resolveFeishuMemberId(params) {
2030
2095
  ]);
2031
2096
  }
2032
2097
  function resolveFeishuMemberIdType(params) {
2098
+ return resolveRequestedFeishuMemberIdType(params) ?? "open_id";
2099
+ }
2100
+ function resolveRequestedFeishuMemberIdType(params) {
2033
2101
  const raw = readFirstString(params, [
2034
2102
  "memberIdType",
2035
2103
  "member_id_type",
@@ -2044,7 +2112,7 @@ function resolveFeishuMemberIdType(params) {
2044
2112
  "union_id"
2045
2113
  ])) return "user_id";
2046
2114
  if (readFirstString(params, ["unionId", "union_id"]) && !readFirstString(params, ["openId", "open_id"])) return "union_id";
2047
- return "open_id";
2115
+ if (readFirstString(params, ["openId", "open_id"])) return "open_id";
2048
2116
  }
2049
2117
  const feishuPlugin = createChatChannelPlugin({
2050
2118
  base: {
@@ -2076,7 +2144,7 @@ const feishuPlugin = createChatChannelPlugin({
2076
2144
  mentions: { stripPatterns: () => ["<at user_id=\"[^\"]*\">[^<]*</at>"] },
2077
2145
  reload: { configPrefixes: ["channels.feishu"] },
2078
2146
  doctor: feishuDoctor,
2079
- configSchema: buildChannelConfigSchema(FeishuConfigSchema),
2147
+ configSchema: FeishuChannelConfigSchema,
2080
2148
  config: {
2081
2149
  ...feishuConfigAdapter,
2082
2150
  setAccountEnabled: ({ cfg, accountId, enabled }) => {
@@ -2153,21 +2221,44 @@ const feishuPlugin = createChatChannelPlugin({
2153
2221
  const presentation = normalizeMessagePresentation(ctx.params.presentation) ?? (interactive ? interactiveReplyToPresentation(interactive) : void 0);
2154
2222
  const mediaUrl = readFeishuMediaParam(ctx.params);
2155
2223
  const audioAsVoice = readBooleanParam(ctx.params, ["asVoice", "audioAsVoice"]);
2156
- const card = presentation ? buildFeishuPresentationCard({
2224
+ if (textCard && !presentation) assertFeishuCardWithinEnvelope(textCard, "Feishu native card");
2225
+ const generatedCard = presentation ? buildFeishuPresentationCard({
2157
2226
  presentation,
2158
2227
  fallbackText: textCard ? void 0 : resolveInteractiveTextFallback({
2159
2228
  text,
2160
2229
  interactive
2161
2230
  })
2162
- }) : textCard;
2231
+ }) : void 0;
2232
+ const presentationCard = generatedCard && isFeishuCardWithinEnvelope(generatedCard) ? generatedCard : void 0;
2233
+ const presentationFellBack = Boolean(generatedCard && !presentationCard);
2234
+ const card = presentation ? presentationCard : textCard;
2163
2235
  if (card && mediaUrl) throw new Error(`Feishu ${ctx.action} does not support card with media.`);
2164
- if (!card && !text && !mediaUrl) throw new Error(`Feishu ${ctx.action} requires text/message, media, or card.`);
2236
+ if (!card && !text && !mediaUrl && !presentationFellBack) throw new Error(`Feishu ${ctx.action} requires text/message, media, or card.`);
2165
2237
  const runtime = await loadFeishuChannelRuntime();
2166
2238
  const maybeSendMedia = runtime.feishuOutbound.sendMedia;
2167
2239
  if (mediaUrl && !maybeSendMedia) throw new Error("Feishu media sending is not available.");
2168
2240
  const sendMedia = maybeSendMedia;
2169
2241
  let result;
2170
- if (card) {
2242
+ if (presentationFellBack && presentation) {
2243
+ const sendPayload = runtime.feishuOutbound.sendPayload;
2244
+ if (!sendPayload) throw new Error("Feishu presentation fallback delivery is not available.");
2245
+ const fallbackText = textCard ? void 0 : text;
2246
+ result = await sendPayload({
2247
+ cfg: ctx.cfg,
2248
+ to,
2249
+ text: fallbackText ?? "",
2250
+ payload: {
2251
+ text: fallbackText,
2252
+ presentation,
2253
+ ...mediaUrl ? { mediaUrl } : {},
2254
+ ...audioAsVoice === void 0 ? {} : { audioAsVoice }
2255
+ },
2256
+ accountId: ctx.accountId ?? void 0,
2257
+ mediaLocalRoots: ctx.mediaLocalRoots,
2258
+ ...replyInThread ? { threadId: replyToMessageId } : { replyToId: replyToMessageId },
2259
+ ...audioAsVoice === void 0 ? {} : { audioAsVoice }
2260
+ });
2261
+ } else if (card) {
2171
2262
  if (containsLegacyFeishuCardCommandValue(card)) throw new Error("Feishu card buttons that trigger text or commands must use structured interaction envelopes.");
2172
2263
  result = await runtime.sendCardFeishu({
2173
2264
  cfg: ctx.cfg,
@@ -2205,11 +2296,11 @@ const feishuPlugin = createChatChannelPlugin({
2205
2296
  if (ctx.action === "read") {
2206
2297
  const messageId = resolveFeishuMessageId(ctx.params);
2207
2298
  if (!messageId) throw new Error("Feishu read requires messageId.");
2208
- const { getMessageFeishu } = await loadFeishuChannelRuntime();
2209
- const message = await getMessageFeishu({
2210
- cfg: ctx.cfg,
2211
- messageId,
2212
- accountId: ctx.accountId ?? void 0
2299
+ const message = await getAuthorizedFeishuMessage({
2300
+ ctx,
2301
+ account,
2302
+ runtime: await loadFeishuChannelRuntime(),
2303
+ messageId
2213
2304
  });
2214
2305
  if (!message) return {
2215
2306
  isError: true,
@@ -2231,12 +2322,18 @@ const feishuPlugin = createChatChannelPlugin({
2231
2322
  if (!messageId) throw new Error("Feishu edit requires messageId.");
2232
2323
  const text = readFirstString(ctx.params, ["text", "message"]);
2233
2324
  const card = ctx.params.card && typeof ctx.params.card === "object" ? ctx.params.card : void 0;
2234
- const { editMessageFeishu } = await loadFeishuChannelRuntime();
2325
+ const runtime = await loadFeishuChannelRuntime();
2326
+ await requireAuthorizedFeishuMessage({
2327
+ ctx,
2328
+ account,
2329
+ runtime,
2330
+ messageId
2331
+ });
2235
2332
  return jsonActionResult({
2236
2333
  ok: true,
2237
2334
  channel: "feishu",
2238
2335
  action: "edit",
2239
- ...await editMessageFeishu({
2336
+ ...await runtime.editMessageFeishu({
2240
2337
  cfg: ctx.cfg,
2241
2338
  messageId,
2242
2339
  text,
@@ -2248,12 +2345,18 @@ const feishuPlugin = createChatChannelPlugin({
2248
2345
  if (ctx.action === "pin") {
2249
2346
  const messageId = resolveFeishuMessageId(ctx.params);
2250
2347
  if (!messageId) throw new Error("Feishu pin requires messageId.");
2251
- const { createPinFeishu } = await loadFeishuChannelRuntime();
2348
+ const runtime = await loadFeishuChannelRuntime();
2349
+ await requireAuthorizedFeishuMessage({
2350
+ ctx,
2351
+ account,
2352
+ runtime,
2353
+ messageId
2354
+ });
2252
2355
  return jsonActionResult({
2253
2356
  ok: true,
2254
2357
  channel: "feishu",
2255
2358
  action: "pin",
2256
- pin: await createPinFeishu({
2359
+ pin: await runtime.createPinFeishu({
2257
2360
  cfg: ctx.cfg,
2258
2361
  messageId,
2259
2362
  accountId: ctx.accountId ?? void 0
@@ -2263,8 +2366,14 @@ const feishuPlugin = createChatChannelPlugin({
2263
2366
  if (ctx.action === "unpin") {
2264
2367
  const messageId = resolveFeishuMessageId(ctx.params);
2265
2368
  if (!messageId) throw new Error("Feishu unpin requires messageId.");
2266
- const { removePinFeishu } = await loadFeishuChannelRuntime();
2267
- await removePinFeishu({
2369
+ const runtime = await loadFeishuChannelRuntime();
2370
+ await requireAuthorizedFeishuMessage({
2371
+ ctx,
2372
+ account,
2373
+ runtime,
2374
+ messageId
2375
+ });
2376
+ await runtime.removePinFeishu({
2268
2377
  cfg: ctx.cfg,
2269
2378
  messageId,
2270
2379
  accountId: ctx.accountId ?? void 0
@@ -2279,7 +2388,14 @@ const feishuPlugin = createChatChannelPlugin({
2279
2388
  if (ctx.action === "list-pins") {
2280
2389
  const chatId = resolveFeishuChatId(ctx);
2281
2390
  if (!chatId) throw new Error("Feishu list-pins requires chatId or channelId.");
2282
- const { listPinsFeishu } = await loadFeishuChannelRuntime();
2391
+ const runtime = await loadFeishuChannelRuntime();
2392
+ await getAuthorizedFeishuChatInfo({
2393
+ ctx,
2394
+ account,
2395
+ runtime,
2396
+ chatId
2397
+ });
2398
+ const { listPinsFeishu } = runtime;
2283
2399
  return jsonActionResult({
2284
2400
  ok: true,
2285
2401
  channel: "feishu",
@@ -2299,39 +2415,97 @@ const feishuPlugin = createChatChannelPlugin({
2299
2415
  const chatId = resolveFeishuChatId(ctx);
2300
2416
  if (!chatId) throw new Error("Feishu channel-info requires chatId or channelId.");
2301
2417
  const runtime = await loadFeishuChannelRuntime();
2302
- const client = await createFeishuActionClient(account);
2303
- const channel = await runtime.getChatInfo(client, chatId);
2418
+ const { chat: channel, client } = await getAuthorizedFeishuChatInfo({
2419
+ ctx,
2420
+ account,
2421
+ runtime,
2422
+ chatId
2423
+ });
2424
+ const chatType = resolveFeishuChatType(channel);
2304
2425
  if (!(ctx.params.includeMembers === true || ctx.params.members === true)) return jsonActionResult({
2305
2426
  ok: true,
2306
2427
  provider: "feishu",
2307
2428
  action: "channel-info",
2308
2429
  channel
2309
2430
  });
2431
+ const requestedMemberIdType = resolveRequestedFeishuMemberIdType(ctx.params);
2432
+ const authorization = authorizeFeishuChatMemberRead({
2433
+ cfg: ctx.cfg,
2434
+ account,
2435
+ chatId,
2436
+ chatType,
2437
+ ctx,
2438
+ memberIdType: requestedMemberIdType
2439
+ });
2310
2440
  return jsonActionResult({
2311
2441
  ok: true,
2312
2442
  provider: "feishu",
2313
2443
  action: "channel-info",
2314
2444
  channel,
2315
- members: await runtime.getChatMembers(client, chatId, readOptionalPositiveInteger(ctx.params, ["pageSize", "page_size"]), readFirstString(ctx.params, ["pageToken", "page_token"]), resolveFeishuMemberIdType(ctx.params))
2445
+ members: authorization.kind === "direct" ? runtime.buildFeishuDirectChatMembers(authorization) : await runtime.getChatMembers(client, chatId, readOptionalPositiveInteger(ctx.params, ["pageSize", "page_size"]), readFirstString(ctx.params, ["pageToken", "page_token"]), resolveFeishuMemberIdType(ctx.params))
2316
2446
  });
2317
2447
  }
2318
2448
  if (ctx.action === "member-info") {
2319
2449
  const runtime = await loadFeishuChannelRuntime();
2320
- const client = await createFeishuActionClient(account);
2321
2450
  const memberId = resolveFeishuMemberId(ctx.params);
2322
- if (memberId) return jsonActionResult({
2323
- ok: true,
2324
- channel: "feishu",
2325
- action: "member-info",
2326
- member: await runtime.getFeishuMemberInfo(client, memberId, resolveFeishuMemberIdType(ctx.params))
2327
- });
2451
+ if (memberId) {
2452
+ const chatId = resolveFeishuChatId(ctx);
2453
+ if (!chatId) throw new Error("Feishu member-info requires chatId or channelId when memberId is provided.");
2454
+ const { chat, client } = await getAuthorizedFeishuChatInfo({
2455
+ ctx,
2456
+ account,
2457
+ runtime,
2458
+ chatId
2459
+ });
2460
+ const requestedMemberIdType = resolveRequestedFeishuMemberIdType(ctx.params);
2461
+ const memberIdType = resolveFeishuMemberIdType(ctx.params);
2462
+ const authorization = authorizeFeishuChatMemberRead({
2463
+ cfg: ctx.cfg,
2464
+ account,
2465
+ chatId,
2466
+ chatType: resolveFeishuChatType(chat),
2467
+ ctx,
2468
+ memberId,
2469
+ memberIdType: requestedMemberIdType
2470
+ });
2471
+ if (authorization.kind === "group") {
2472
+ await runtime.assertFeishuChatMember(client, chatId, memberId, memberIdType);
2473
+ return jsonActionResult({
2474
+ ok: true,
2475
+ channel: "feishu",
2476
+ action: "member-info",
2477
+ member: await runtime.getFeishuMemberInfo(client, memberId, memberIdType)
2478
+ });
2479
+ }
2480
+ return jsonActionResult({
2481
+ ok: true,
2482
+ channel: "feishu",
2483
+ action: "member-info",
2484
+ member: await runtime.getFeishuMemberInfo(client, authorization.memberId, authorization.memberIdType)
2485
+ });
2486
+ }
2328
2487
  const chatId = resolveFeishuChatId(ctx);
2329
2488
  if (!chatId) throw new Error("Feishu member-info requires memberId or chatId/channelId.");
2489
+ const { chat, client } = await getAuthorizedFeishuChatInfo({
2490
+ ctx,
2491
+ account,
2492
+ runtime,
2493
+ chatId
2494
+ });
2495
+ const requestedMemberIdType = resolveRequestedFeishuMemberIdType(ctx.params);
2496
+ const authorization = authorizeFeishuChatMemberRead({
2497
+ cfg: ctx.cfg,
2498
+ account,
2499
+ chatId,
2500
+ chatType: resolveFeishuChatType(chat),
2501
+ ctx,
2502
+ memberIdType: requestedMemberIdType
2503
+ });
2330
2504
  return jsonActionResult({
2331
2505
  ok: true,
2332
2506
  channel: "feishu",
2333
2507
  action: "member-info",
2334
- ...await runtime.getChatMembers(client, chatId, readOptionalPositiveInteger(ctx.params, ["pageSize", "page_size"]), readFirstString(ctx.params, ["pageToken", "page_token"]), resolveFeishuMemberIdType(ctx.params))
2508
+ ...authorization.kind === "direct" ? runtime.buildFeishuDirectChatMembers(authorization) : await runtime.getChatMembers(client, chatId, readOptionalPositiveInteger(ctx.params, ["pageSize", "page_size"]), readFirstString(ctx.params, ["pageToken", "page_token"]), resolveFeishuMemberIdType(ctx.params))
2335
2509
  });
2336
2510
  }
2337
2511
  if (ctx.action === "channel-list") {
@@ -2339,43 +2513,33 @@ const feishuPlugin = createChatChannelPlugin({
2339
2513
  const query = readFirstString(ctx.params, ["query"]);
2340
2514
  const limit = readOptionalPositiveInteger(ctx.params, ["limit"]);
2341
2515
  const scope = readFirstString(ctx.params, ["scope", "kind"]) ?? "all";
2516
+ const directOperator = ctx.conversationReadOrigin === "direct-operator";
2517
+ const listGroups = directOperator || canEnumerateAllFeishuGroups(ctx.cfg, account) ? runtime.listFeishuDirectoryGroupsLive : listAuthorizedFeishuDirectoryGroups;
2518
+ const listPeers = directOperator || canEnumerateAllFeishuPeers(account) ? runtime.listFeishuDirectoryPeersLive : listAuthorizedFeishuDirectoryPeers;
2519
+ const directoryParams = {
2520
+ cfg: ctx.cfg,
2521
+ query,
2522
+ limit,
2523
+ accountId: ctx.accountId ?? void 0,
2524
+ fallbackToStatic: false
2525
+ };
2526
+ const groupDirectoryParams = {
2527
+ ...directoryParams,
2528
+ filter: directOperator ? (group) => isFeishuGroupReadEnabled(ctx.cfg, account, group.id) : canEnumerateAllFeishuGroups(ctx.cfg, account) ? (group) => isFeishuGroupReadAllowed(ctx.cfg, account, group.id, false) : void 0
2529
+ };
2342
2530
  if (scope === "groups" || scope === "group" || scope === "channels" || scope === "channel") return jsonActionResult({
2343
2531
  ok: true,
2344
2532
  channel: "feishu",
2345
2533
  action: "channel-list",
2346
- groups: await runtime.listFeishuDirectoryGroupsLive({
2347
- cfg: ctx.cfg,
2348
- query,
2349
- limit,
2350
- fallbackToStatic: false,
2351
- accountId: ctx.accountId ?? void 0
2352
- })
2534
+ groups: await listGroups(groupDirectoryParams)
2353
2535
  });
2354
2536
  if (scope === "peers" || scope === "peer" || scope === "members" || scope === "member" || scope === "users" || scope === "user") return jsonActionResult({
2355
2537
  ok: true,
2356
2538
  channel: "feishu",
2357
2539
  action: "channel-list",
2358
- peers: await runtime.listFeishuDirectoryPeersLive({
2359
- cfg: ctx.cfg,
2360
- query,
2361
- limit,
2362
- fallbackToStatic: false,
2363
- accountId: ctx.accountId ?? void 0
2364
- })
2540
+ peers: await listPeers(directoryParams)
2365
2541
  });
2366
- const [groups, peers] = await Promise.all([runtime.listFeishuDirectoryGroupsLive({
2367
- cfg: ctx.cfg,
2368
- query,
2369
- limit,
2370
- fallbackToStatic: false,
2371
- accountId: ctx.accountId ?? void 0
2372
- }), runtime.listFeishuDirectoryPeersLive({
2373
- cfg: ctx.cfg,
2374
- query,
2375
- limit,
2376
- fallbackToStatic: false,
2377
- accountId: ctx.accountId ?? void 0
2378
- })]);
2542
+ const [groups, peers] = await Promise.all([listGroups(groupDirectoryParams), listPeers(directoryParams)]);
2379
2543
  return jsonActionResult({
2380
2544
  ok: true,
2381
2545
  channel: "feishu",
@@ -2392,18 +2556,24 @@ const feishuPlugin = createChatChannelPlugin({
2392
2556
  const clearAll = ctx.params.clearAll === true;
2393
2557
  if (remove) {
2394
2558
  if (!emoji) throw new Error("Emoji is required to remove a Feishu reaction.");
2395
- const { listReactionsFeishu, removeReactionFeishu } = await loadFeishuChannelRuntime();
2396
- const ownReaction = (await listReactionsFeishu({
2559
+ const runtime = await loadFeishuChannelRuntime();
2560
+ await requireAuthorizedFeishuMessage({
2561
+ ctx,
2562
+ account,
2563
+ runtime,
2564
+ messageId
2565
+ });
2566
+ const ownReaction = (await runtime.listReactionsFeishu({
2397
2567
  cfg: ctx.cfg,
2398
2568
  messageId,
2399
2569
  emojiType: emoji,
2400
2570
  accountId: ctx.accountId ?? void 0
2401
- })).find((entry) => entry.operatorType === "app");
2571
+ })).find((entry) => entry.operatorType === "app" && Boolean(account.appId) && entry.operatorId === account.appId);
2402
2572
  if (!ownReaction) return jsonActionResult({
2403
2573
  ok: true,
2404
2574
  removed: null
2405
2575
  });
2406
- await removeReactionFeishu({
2576
+ await runtime.removeReactionFeishu({
2407
2577
  cfg: ctx.cfg,
2408
2578
  messageId,
2409
2579
  reactionId: ownReaction.reactionId,
@@ -2416,15 +2586,22 @@ const feishuPlugin = createChatChannelPlugin({
2416
2586
  }
2417
2587
  if (!emoji) {
2418
2588
  if (!clearAll) throw new Error("Emoji is required to add a Feishu reaction. Set clearAll=true to remove all bot reactions.");
2419
- const { listReactionsFeishu, removeReactionFeishu } = await loadFeishuChannelRuntime();
2420
- const reactions = await listReactionsFeishu({
2589
+ const runtime = await loadFeishuChannelRuntime();
2590
+ await requireAuthorizedFeishuMessage({
2591
+ ctx,
2592
+ account,
2593
+ runtime,
2594
+ messageId
2595
+ });
2596
+ const reactions = await runtime.listReactionsFeishu({
2421
2597
  cfg: ctx.cfg,
2422
2598
  messageId,
2423
2599
  accountId: ctx.accountId ?? void 0
2424
2600
  });
2425
2601
  let removed = 0;
2426
- for (const reaction of reactions.filter((entry) => entry.operatorType === "app")) {
2427
- await removeReactionFeishu({
2602
+ const ownReactions = reactions.filter((entry) => entry.operatorType === "app" && Boolean(account.appId) && entry.operatorId === account.appId);
2603
+ for (const reaction of ownReactions) {
2604
+ await runtime.removeReactionFeishu({
2428
2605
  cfg: ctx.cfg,
2429
2606
  messageId,
2430
2607
  reactionId: reaction.reactionId,
@@ -2437,8 +2614,14 @@ const feishuPlugin = createChatChannelPlugin({
2437
2614
  removed
2438
2615
  });
2439
2616
  }
2440
- const { addReactionFeishu } = await loadFeishuChannelRuntime();
2441
- await addReactionFeishu({
2617
+ const runtime = await loadFeishuChannelRuntime();
2618
+ await requireAuthorizedFeishuMessage({
2619
+ ctx,
2620
+ account,
2621
+ runtime,
2622
+ messageId
2623
+ });
2624
+ await runtime.addReactionFeishu({
2442
2625
  cfg: ctx.cfg,
2443
2626
  messageId,
2444
2627
  emojiType: emoji,
@@ -2452,10 +2635,16 @@ const feishuPlugin = createChatChannelPlugin({
2452
2635
  if (ctx.action === "reactions") {
2453
2636
  const messageId = resolveFeishuMessageId(ctx.params);
2454
2637
  if (!messageId) throw new Error("Feishu reactions lookup requires messageId.");
2455
- const { listReactionsFeishu } = await loadFeishuChannelRuntime();
2638
+ const runtime = await loadFeishuChannelRuntime();
2639
+ await requireAuthorizedFeishuMessage({
2640
+ ctx,
2641
+ account,
2642
+ runtime,
2643
+ messageId
2644
+ });
2456
2645
  return jsonActionResult({
2457
2646
  ok: true,
2458
- reactions: await listReactionsFeishu({
2647
+ reactions: await runtime.listReactionsFeishu({
2459
2648
  cfg: ctx.cfg,
2460
2649
  messageId,
2461
2650
  accountId: ctx.accountId ?? void 0
@@ -2513,10 +2702,7 @@ const feishuPlugin = createChatChannelPlugin({
2513
2702
  };
2514
2703
  return { to: `chat:${parsed?.chatId ?? conversationId.trim()}` };
2515
2704
  },
2516
- resolveSessionConversation: ({ kind, rawId }) => resolveFeishuSessionConversation({
2517
- kind,
2518
- rawId
2519
- }),
2705
+ resolveSessionConversation: resolveFeishuSessionConversation,
2520
2706
  resolveOutboundSessionRoute: (params) => resolveFeishuOutboundSessionRoute(params),
2521
2707
  targetResolver: {
2522
2708
  looksLikeId: looksLikeFeishuId,
@@ -2569,7 +2755,7 @@ const feishuPlugin = createChatChannelPlugin({
2569
2755
  })
2570
2756
  }),
2571
2757
  gateway: { startAccount: async (ctx) => {
2572
- const { monitorFeishuProvider } = await import("./monitor-CsbheK9J.js");
2758
+ const { monitorFeishuProvider } = await import("./monitor-CHl0bWzb.js");
2573
2759
  const account = resolveFeishuRuntimeAccount({
2574
2760
  cfg: ctx.cfg,
2575
2761
  accountId: ctx.accountId
@@ -2613,9 +2799,16 @@ const feishuPlugin = createChatChannelPlugin({
2613
2799
  });
2614
2800
  }
2615
2801
  } },
2802
+ threading: { buildToolContext: ({ context, hasRepliedRef }) => ({
2803
+ currentChannelId: normalizeOptionalString(context.NativeChannelId) ?? normalizeOptionalString(context.To),
2804
+ currentChatType: context.ChatType === "direct" || context.ChatType === "group" || context.ChatType === "channel" ? context.ChatType : void 0,
2805
+ currentMessagingTarget: normalizeOptionalString(context.To),
2806
+ currentThreadTs: context.MessageThreadId != null ? String(context.MessageThreadId) : void 0,
2807
+ hasRepliedRef
2808
+ }) },
2616
2809
  outbound: {
2617
2810
  deliveryMode: "direct",
2618
- chunker: chunkTextForOutbound,
2811
+ chunker: chunkFeishuMarkdown,
2619
2812
  chunkerMode: "markdown",
2620
2813
  textChunkLimit: 4e3,
2621
2814
  sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text),
@@ -2656,4 +2849,4 @@ const feishuPlugin = createChatChannelPlugin({
2656
2849
  }
2657
2850
  });
2658
2851
  //#endregion
2659
- export { setFeishuNamedAccountEnabled$1 as a, normalizeFeishuAllowEntry as c, resolveFeishuGroupConversationIngressAccess as d, resolveFeishuGroupSenderActivationIngressAccess as f, listFeishuDirectoryPeers as h, feishuSetupAdapter as i, resolveFeishuDmIngressAccess as l, listFeishuDirectoryGroups as m, feishuSetupWizard as n, buildFeishuPresentationCardElements as o, resolveFeishuReplyPolicy as p, runFeishuLogin as r, hasExplicitFeishuGroupConfig as s, feishuPlugin as t, resolveFeishuGroupConfig as u };
2852
+ export { setFeishuNamedAccountEnabled$1 as a, isFeishuCardWithinEnvelope as c, feishuSetupAdapter as i, listFeishuDirectoryGroups as l, feishuSetupWizard as n, assertFeishuCardWithinEnvelope as o, runFeishuLogin as r, buildFeishuPresentationCardElements as s, feishuPlugin as t, listFeishuDirectoryPeers as u };