@openclaw/matrix 2026.9.5 → 2026.9.7

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 (2291) hide show
  1. package/assets/icon.png +0 -0
  2. package/dist/.setup/account-selection-B7axQ80R.mjs +196 -0
  3. package/dist/.setup/accounts-WkgrIxMt.mjs +138 -0
  4. package/dist/.setup/approval-handler.runtime-C-pw3NvY.mjs +408 -0
  5. package/dist/.setup/approval-reactions-BrS5ECU0.mjs +196 -0
  6. package/dist/.setup/channel-DXenXmj0.mjs +1198 -0
  7. package/dist/.setup/channel.runtime-BXUawOno.mjs +71 -0
  8. package/dist/.setup/channel.setup-DWfLaXqT.mjs +372 -0
  9. package/dist/.setup/cli-IhZO2OEj.mjs +1300 -0
  10. package/dist/.setup/cli-metadata-nowEgdY0.mjs +22 -0
  11. package/dist/.setup/client-BXATebyo.mjs +27 -0
  12. package/dist/.setup/client-Ccv77kwh.mjs +916 -0
  13. package/dist/.setup/client-bootstrap-BiHX55is.mjs +75 -0
  14. package/dist/.setup/config-update-5m1Un5gJ.mjs +145 -0
  15. package/dist/.setup/create-client-DRZ580E3.mjs +64 -0
  16. package/dist/.setup/credentials-C9qDO5-2.mjs +74 -0
  17. package/dist/.setup/credentials-read-KD4o5biZ.mjs +77 -0
  18. package/dist/.setup/crypto-runtime-DPjIDF8H.mjs +1077 -0
  19. package/dist/.setup/crypto-snapshot-doctor.runtime-44FrCPR7.mjs +91 -0
  20. package/dist/.setup/deps-CLQ4EOq7.mjs +162 -0
  21. package/dist/.setup/device-health-U-yoVjPw.mjs +21 -0
  22. package/dist/.setup/direct-management-Cn2t8n1V.mjs +300 -0
  23. package/dist/.setup/directory-live-_sw-Q7KO.mjs +118 -0
  24. package/dist/.setup/doctor-DMvEBx6o.mjs +49 -0
  25. package/dist/.setup/doctor-contract-De6geW0h.mjs +350 -0
  26. package/dist/.setup/draft-stream-CdVMstpR.mjs +157 -0
  27. package/dist/.setup/encryption-guidance-B6797jNA.mjs +16 -0
  28. package/dist/.setup/exec-approvals-fsiMQ1ce.mjs +186 -0
  29. package/dist/.setup/file-sync-store-B-9bMb_O.mjs +187 -0
  30. package/dist/.setup/http-client-C1XvVD3K.mjs +362 -0
  31. package/dist/.setup/idb-persistence-DBvfre1X.mjs +227 -0
  32. package/dist/.setup/idb-persistence-lock-D_mDu4Cf.mjs +27 -0
  33. package/dist/.setup/inbound-dedupe-BGrMrTTu.mjs +48 -0
  34. package/dist/.setup/joined-room-encryption-TZoOKXgh.mjs +67 -0
  35. package/dist/.setup/logger-CVv56jzH.mjs +74 -0
  36. package/dist/.setup/logging-mhnFQGzB.mjs +96 -0
  37. package/dist/.setup/messages-Buz27pi5.mjs +324 -0
  38. package/dist/.setup/monitor-BBg5qgov.mjs +4352 -0
  39. package/dist/.setup/onboarding-hJaieQj5.mjs +482 -0
  40. package/dist/.setup/outbound-C9vBijaH.mjs +199 -0
  41. package/dist/.setup/profile-B3DD2jYa.mjs +100 -0
  42. package/dist/.setup/profile-update-CmxIAd4c.mjs +66 -0
  43. package/dist/.setup/reaction-events-mnzc_JvP.mjs +168 -0
  44. package/dist/.setup/resolve-targets-BFq3q4c9.mjs +87 -0
  45. package/dist/.setup/room-info-BbTGRJcR.mjs +134 -0
  46. package/dist/.setup/sdk-DmRVM0VA.mjs +1907 -0
  47. package/dist/.setup/send-GOF64QRc.mjs +2117 -0
  48. package/dist/.setup/send-currentness-C2rMVVIQ.mjs +87 -0
  49. package/dist/.setup/setup-bootstrap-AzalcuCW.mjs +62 -0
  50. package/dist/.setup/setup-core-BeifoeL4.mjs +377 -0
  51. package/dist/.setup/setup-plugin-api-Bsbdw41x.mjs +3 -0
  52. package/dist/.setup/startup-verification-Aiy_xVdI.mjs +204 -0
  53. package/dist/.setup/storage-BXS2cB2i.mjs +288 -0
  54. package/dist/.setup/storage-metadata-BDRZ7vpX.mjs +371 -0
  55. package/dist/.setup/storage-paths-B51JM-pC.mjs +53 -0
  56. package/dist/.setup/subagent-hooks-D5kd_kzN.mjs +52 -0
  57. package/dist/.setup/sync-cache-state-C6sEmvJK.mjs +192 -0
  58. package/dist/.setup/thread-bindings-jXu_9cHE.mjs +443 -0
  59. package/dist/.setup/thread-bindings-shared-hxKkYC1W.mjs +89 -0
  60. package/dist/.setup/tool-actions-Ce7Okg6m.mjs +746 -0
  61. package/dist/.setup/url-validation-CF6pG6eE.mjs +36 -0
  62. package/dist/.setup/verification-C45rOZkM.mjs +329 -0
  63. package/dist/api.js +7 -7
  64. package/dist/channel-plugin-api.js +1 -1
  65. package/dist/cli-metadata.js +1 -1
  66. package/dist/contract-api.js +2 -2
  67. package/dist/doctor-contract-api.js +144 -290
  68. package/dist/helper-api.js +3 -3
  69. package/dist/index.js +1 -1
  70. package/dist/plugin-entry.handlers.runtime.js +17 -9
  71. package/dist/runtime-api.js +4 -4
  72. package/dist/session-binding-contract-api.js +1 -1
  73. package/dist/setup-entry.js +1 -1
  74. package/dist/setup-plugin-api.js +1 -1
  75. package/dist/subagent-hooks-api.js +1 -1
  76. package/dist/thread-bindings-runtime.js +1 -1
  77. package/node_modules/@babel/runtime/package.json +486 -0
  78. package/node_modules/@openclaw/fs-safe/CHANGELOG.md +1289 -0
  79. package/node_modules/@openclaw/fs-safe/LICENSE +22 -0
  80. package/node_modules/@openclaw/fs-safe/README.md +672 -0
  81. package/node_modules/@openclaw/fs-safe/SECURITY.md +45 -0
  82. package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts +32 -0
  83. package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +323 -0
  84. package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +41 -0
  85. package/node_modules/@openclaw/fs-safe/dist/advanced.js +40 -0
  86. package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts +1 -0
  87. package/node_modules/@openclaw/fs-safe/dist/archive-crc32.js +19 -0
  88. package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts +11 -0
  89. package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +101 -0
  90. package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts +23 -0
  91. package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +180 -0
  92. package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts +13 -0
  93. package/node_modules/@openclaw/fs-safe/dist/archive-entry.js +85 -0
  94. package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts +12 -0
  95. package/node_modules/@openclaw/fs-safe/dist/archive-errors.js +23 -0
  96. package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts +20 -0
  97. package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.js +99 -0
  98. package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts +18 -0
  99. package/node_modules/@openclaw/fs-safe/dist/archive-input.js +98 -0
  100. package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts +7 -0
  101. package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +71 -0
  102. package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts +56 -0
  103. package/node_modules/@openclaw/fs-safe/dist/archive-limits.js +131 -0
  104. package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +22 -0
  105. package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +282 -0
  106. package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts +1 -0
  107. package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.js +12 -0
  108. package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
  109. package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts +85 -0
  110. package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +119 -0
  111. package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts +5 -0
  112. package/node_modules/@openclaw/fs-safe/dist/archive-read.js +234 -0
  113. package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +32 -0
  114. package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +308 -0
  115. package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +27 -0
  116. package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +127 -0
  117. package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts +29 -0
  118. package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +203 -0
  119. package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +7 -0
  120. package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.js +96 -0
  121. package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts +1 -0
  122. package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.js +160 -0
  123. package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +21 -0
  124. package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +267 -0
  125. package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +24 -0
  126. package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +10 -0
  127. package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +4 -0
  128. package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +30 -0
  129. package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +12 -0
  130. package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +150 -0
  131. package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts +4 -0
  132. package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +24 -0
  133. package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +17 -0
  134. package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +149 -0
  135. package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +4 -0
  136. package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +21 -0
  137. package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +20 -0
  138. package/node_modules/@openclaw/fs-safe/dist/archive.js +332 -0
  139. package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts +1 -0
  140. package/node_modules/@openclaw/fs-safe/dist/async-lock.js +17 -0
  141. package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +6 -0
  142. package/node_modules/@openclaw/fs-safe/dist/atomic.js +4 -0
  143. package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts +2 -0
  144. package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.js +15 -0
  145. package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +25 -0
  146. package/node_modules/@openclaw/fs-safe/dist/bounded-read.js +143 -0
  147. package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts +3 -0
  148. package/node_modules/@openclaw/fs-safe/dist/byte-budget.js +9 -0
  149. package/node_modules/@openclaw/fs-safe/dist/byte-view.d.ts +2 -0
  150. package/node_modules/@openclaw/fs-safe/dist/byte-view.js +13 -0
  151. package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts +19 -0
  152. package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +36 -0
  153. package/node_modules/@openclaw/fs-safe/dist/config.d.ts +2 -0
  154. package/node_modules/@openclaw/fs-safe/dist/config.js +2 -0
  155. package/node_modules/@openclaw/fs-safe/dist/containment.d.ts +1 -0
  156. package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +21 -0
  157. package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +71 -0
  158. package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts +2 -0
  159. package/node_modules/@openclaw/fs-safe/dist/copy-policy.js +8 -0
  160. package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +18 -0
  161. package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +29 -0
  162. package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts +8 -0
  163. package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +245 -0
  164. package/node_modules/@openclaw/fs-safe/dist/copy.d.ts +15 -0
  165. package/node_modules/@openclaw/fs-safe/dist/copy.js +143 -0
  166. package/node_modules/@openclaw/fs-safe/dist/create-owned-file.d.ts +7 -0
  167. package/node_modules/@openclaw/fs-safe/dist/create-owned-file.js +16 -0
  168. package/node_modules/@openclaw/fs-safe/dist/create.d.ts +17 -0
  169. package/node_modules/@openclaw/fs-safe/dist/create.js +388 -0
  170. package/node_modules/@openclaw/fs-safe/dist/creation-boundary.d.ts +60 -0
  171. package/node_modules/@openclaw/fs-safe/dist/creation-boundary.js +371 -0
  172. package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.d.ts +2 -0
  173. package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.js +71 -0
  174. package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts +11 -0
  175. package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +96 -0
  176. package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts +14 -0
  177. package/node_modules/@openclaw/fs-safe/dist/device-path.js +139 -0
  178. package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +43 -0
  179. package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +286 -0
  180. package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts +2 -0
  181. package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.js +21 -0
  182. package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +54 -0
  183. package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +176 -0
  184. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +39 -0
  185. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +285 -0
  186. package/node_modules/@openclaw/fs-safe/dist/directory-receipt.d.ts +23 -0
  187. package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +121 -0
  188. package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +4 -0
  189. package/node_modules/@openclaw/fs-safe/dist/durability.js +3 -0
  190. package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts +1 -0
  191. package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +22 -0
  192. package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts +2 -0
  193. package/node_modules/@openclaw/fs-safe/dist/error-detail.js +13 -0
  194. package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +15 -0
  195. package/node_modules/@openclaw/fs-safe/dist/errors.js +27 -0
  196. package/node_modules/@openclaw/fs-safe/dist/file-cleanup.d.ts +19 -0
  197. package/node_modules/@openclaw/fs-safe/dist/file-cleanup.js +81 -0
  198. package/node_modules/@openclaw/fs-safe/dist/file-contents.d.ts +5 -0
  199. package/node_modules/@openclaw/fs-safe/dist/file-contents.js +40 -0
  200. package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts +15 -0
  201. package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +190 -0
  202. package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +16 -0
  203. package/node_modules/@openclaw/fs-safe/dist/file-hash.js +296 -0
  204. package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +7 -0
  205. package/node_modules/@openclaw/fs-safe/dist/file-identity.js +56 -0
  206. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.d.ts +22 -0
  207. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.js +98 -0
  208. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.d.ts +17 -0
  209. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +58 -0
  210. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +3 -0
  211. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +303 -0
  212. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.d.ts +17 -0
  213. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.js +66 -0
  214. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.d.ts +25 -0
  215. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.js +392 -0
  216. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.d.ts +40 -0
  217. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.js +209 -0
  218. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.d.ts +16 -0
  219. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.js +275 -0
  220. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.d.ts +11 -0
  221. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.js +58 -0
  222. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.d.ts +1 -0
  223. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.js +90 -0
  224. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.d.ts +34 -0
  225. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.js +288 -0
  226. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.d.ts +19 -0
  227. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +199 -0
  228. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts +17 -0
  229. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +341 -0
  230. package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +23 -0
  231. package/node_modules/@openclaw/fs-safe/dist/file-lock.js +66 -0
  232. package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts +8 -0
  233. package/node_modules/@openclaw/fs-safe/dist/file-observation.js +22 -0
  234. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +34 -0
  235. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +174 -0
  236. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +11 -0
  237. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +110 -0
  238. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +15 -0
  239. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +319 -0
  240. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +9 -0
  241. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +128 -0
  242. package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +62 -0
  243. package/node_modules/@openclaw/fs-safe/dist/file-store.js +360 -0
  244. package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +4 -0
  245. package/node_modules/@openclaw/fs-safe/dist/file-sync.js +19 -0
  246. package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +8 -0
  247. package/node_modules/@openclaw/fs-safe/dist/filename.js +138 -0
  248. package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +12 -0
  249. package/node_modules/@openclaw/fs-safe/dist/fs.js +30 -0
  250. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +25 -0
  251. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +281 -0
  252. package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +32 -0
  253. package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +81 -0
  254. package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts +1 -0
  255. package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +68 -0
  256. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts +3 -0
  257. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +127 -0
  258. package/node_modules/@openclaw/fs-safe/dist/guest.d.ts +8 -0
  259. package/node_modules/@openclaw/fs-safe/dist/guest.js +433 -0
  260. package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts +11 -0
  261. package/node_modules/@openclaw/fs-safe/dist/home-dir.js +149 -0
  262. package/node_modules/@openclaw/fs-safe/dist/index.d.ts +9 -0
  263. package/node_modules/@openclaw/fs-safe/dist/index.js +5 -0
  264. package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +25 -0
  265. package/node_modules/@openclaw/fs-safe/dist/install-path.js +136 -0
  266. package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +32 -0
  267. package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +105 -0
  268. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts +14 -0
  269. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +154 -0
  270. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +19 -0
  271. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +355 -0
  272. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts +5 -0
  273. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.js +65 -0
  274. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +44 -0
  275. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +210 -0
  276. package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +8 -0
  277. package/node_modules/@openclaw/fs-safe/dist/json-store.js +15 -0
  278. package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts +1 -0
  279. package/node_modules/@openclaw/fs-safe/dist/json-stringify.js +7 -0
  280. package/node_modules/@openclaw/fs-safe/dist/json.d.ts +49 -0
  281. package/node_modules/@openclaw/fs-safe/dist/json.js +323 -0
  282. package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts +8 -0
  283. package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +81 -0
  284. package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +13 -0
  285. package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.js +84 -0
  286. package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +20 -0
  287. package/node_modules/@openclaw/fs-safe/dist/local-roots.js +160 -0
  288. package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts +9 -0
  289. package/node_modules/@openclaw/fs-safe/dist/lock-config.js +12 -0
  290. package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts +30 -0
  291. package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +224 -0
  292. package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts +7 -0
  293. package/node_modules/@openclaw/fs-safe/dist/move-path-stage.js +56 -0
  294. package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts +20 -0
  295. package/node_modules/@openclaw/fs-safe/dist/move-path.js +390 -0
  296. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +8 -0
  297. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +41 -0
  298. package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +199 -0
  299. package/node_modules/@openclaw/fs-safe/dist/native-binding.js +8 -0
  300. package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +16 -0
  301. package/node_modules/@openclaw/fs-safe/dist/native-config.js +71 -0
  302. package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts +16 -0
  303. package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.js +37 -0
  304. package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.d.ts +3 -0
  305. package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.js +11 -0
  306. package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +15 -0
  307. package/node_modules/@openclaw/fs-safe/dist/native-operations.js +111 -0
  308. package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +34 -0
  309. package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +147 -0
  310. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +6 -0
  311. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +252 -0
  312. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +4 -0
  313. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +478 -0
  314. package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.d.ts +11 -0
  315. package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.js +61 -0
  316. package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.d.ts +13 -0
  317. package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.js +209 -0
  318. package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.d.ts +3 -0
  319. package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.js +8 -0
  320. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +45 -0
  321. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +442 -0
  322. package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.d.ts +13 -0
  323. package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.js +303 -0
  324. package/node_modules/@openclaw/fs-safe/dist/native.d.ts +13 -0
  325. package/node_modules/@openclaw/fs-safe/dist/native.js +209 -0
  326. package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +7 -0
  327. package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.js +46 -0
  328. package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts +15 -0
  329. package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +102 -0
  330. package/node_modules/@openclaw/fs-safe/dist/output.d.ts +16 -0
  331. package/node_modules/@openclaw/fs-safe/dist/output.js +139 -0
  332. package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +7 -0
  333. package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +46 -0
  334. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.d.ts +1 -0
  335. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.js +54 -0
  336. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.d.ts +5 -0
  337. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.js +64 -0
  338. package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +32 -0
  339. package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +39 -0
  340. package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts +6 -0
  341. package/node_modules/@openclaw/fs-safe/dist/path-case.js +136 -0
  342. package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts +24 -0
  343. package/node_modules/@openclaw/fs-safe/dist/path-policy.js +49 -0
  344. package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +6 -0
  345. package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +104 -0
  346. package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts +13 -0
  347. package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.js +37 -0
  348. package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +6 -0
  349. package/node_modules/@openclaw/fs-safe/dist/path-segment-route.js +24 -0
  350. package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts +11 -0
  351. package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.js +394 -0
  352. package/node_modules/@openclaw/fs-safe/dist/path.d.ts +20 -0
  353. package/node_modules/@openclaw/fs-safe/dist/path.js +185 -0
  354. package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +32 -0
  355. package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +194 -0
  356. package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +5 -0
  357. package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +4 -0
  358. package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +48 -0
  359. package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +319 -0
  360. package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +52 -0
  361. package/node_modules/@openclaw/fs-safe/dist/permissions.js +131 -0
  362. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +23 -0
  363. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +421 -0
  364. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts +38 -0
  365. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.js +205 -0
  366. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +18 -0
  367. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.js +70 -0
  368. package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +30 -0
  369. package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +98 -0
  370. package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts +1 -0
  371. package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +22 -0
  372. package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.d.ts +3 -0
  373. package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +35 -0
  374. package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.d.ts +4 -0
  375. package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.js +31 -0
  376. package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.d.ts +5 -0
  377. package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +185 -0
  378. package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +68 -0
  379. package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.js +1 -0
  380. package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +12 -0
  381. package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +300 -0
  382. package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts +8 -0
  383. package/node_modules/@openclaw/fs-safe/dist/positional-read.js +36 -0
  384. package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts +4 -0
  385. package/node_modules/@openclaw/fs-safe/dist/private-directory.js +30 -0
  386. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.d.ts +3 -0
  387. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.js +72 -0
  388. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts +53 -0
  389. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +358 -0
  390. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +7 -0
  391. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +341 -0
  392. package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +13 -0
  393. package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +60 -0
  394. package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +27 -0
  395. package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.js +22 -0
  396. package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +19 -0
  397. package/node_modules/@openclaw/fs-safe/dist/publish-file.js +332 -0
  398. package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts +7 -0
  399. package/node_modules/@openclaw/fs-safe/dist/read-open-flags.js +13 -0
  400. package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +17 -0
  401. package/node_modules/@openclaw/fs-safe/dist/read-opened-file.js +18 -0
  402. package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +3 -0
  403. package/node_modules/@openclaw/fs-safe/dist/realpath.js +43 -0
  404. package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts +2 -0
  405. package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.js +8 -0
  406. package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +37 -0
  407. package/node_modules/@openclaw/fs-safe/dist/regular-file.js +317 -0
  408. package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts +6 -0
  409. package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +275 -0
  410. package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.d.ts +4 -0
  411. package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.js +36 -0
  412. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +32 -0
  413. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +369 -0
  414. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +20 -0
  415. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +101 -0
  416. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +46 -0
  417. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +168 -0
  418. package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.d.ts +21 -0
  419. package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.js +123 -0
  420. package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts +2 -0
  421. package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.js +10 -0
  422. package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.d.ts +26 -0
  423. package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.js +47 -0
  424. package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts +5 -0
  425. package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.js +30 -0
  426. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +49 -0
  427. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +368 -0
  428. package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +55 -0
  429. package/node_modules/@openclaw/fs-safe/dist/replace-file-types.js +1 -0
  430. package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +6 -0
  431. package/node_modules/@openclaw/fs-safe/dist/replace-file.js +356 -0
  432. package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.d.ts +26 -0
  433. package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.js +193 -0
  434. package/node_modules/@openclaw/fs-safe/dist/retained-file-types.d.ts +50 -0
  435. package/node_modules/@openclaw/fs-safe/dist/retained-file-types.js +1 -0
  436. package/node_modules/@openclaw/fs-safe/dist/retained-file.d.ts +3 -0
  437. package/node_modules/@openclaw/fs-safe/dist/retained-file.js +121 -0
  438. package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts +29 -0
  439. package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +186 -0
  440. package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +43 -0
  441. package/node_modules/@openclaw/fs-safe/dist/root-context.js +233 -0
  442. package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +16 -0
  443. package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +93 -0
  444. package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts +12 -0
  445. package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +225 -0
  446. package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.d.ts +9 -0
  447. package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +28 -0
  448. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +46 -0
  449. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +433 -0
  450. package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts +22 -0
  451. package/node_modules/@openclaw/fs-safe/dist/root-directory.js +141 -0
  452. package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts +10 -0
  453. package/node_modules/@openclaw/fs-safe/dist/root-entries.js +61 -0
  454. package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +16 -0
  455. package/node_modules/@openclaw/fs-safe/dist/root-errors.js +92 -0
  456. package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +20 -0
  457. package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +81 -0
  458. package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +46 -0
  459. package/node_modules/@openclaw/fs-safe/dist/root-file.js +205 -0
  460. package/node_modules/@openclaw/fs-safe/dist/root-handle-context.d.ts +4 -0
  461. package/node_modules/@openclaw/fs-safe/dist/root-handle-context.js +12 -0
  462. package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +117 -0
  463. package/node_modules/@openclaw/fs-safe/dist/root-impl.js +1446 -0
  464. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +10 -0
  465. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +205 -0
  466. package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +7 -0
  467. package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.js +16 -0
  468. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +7 -0
  469. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +90 -0
  470. package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +84 -0
  471. package/node_modules/@openclaw/fs-safe/dist/root-options.js +18 -0
  472. package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts +12 -0
  473. package/node_modules/@openclaw/fs-safe/dist/root-path-errors.js +22 -0
  474. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +12 -0
  475. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +160 -0
  476. package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +55 -0
  477. package/node_modules/@openclaw/fs-safe/dist/root-path-observation.js +180 -0
  478. package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts +4 -0
  479. package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +151 -0
  480. package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +53 -0
  481. package/node_modules/@openclaw/fs-safe/dist/root-path.js +440 -0
  482. package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +8 -0
  483. package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.js +22 -0
  484. package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +58 -0
  485. package/node_modules/@openclaw/fs-safe/dist/root-paths.js +296 -0
  486. package/node_modules/@openclaw/fs-safe/dist/root-public-types.d.ts +11 -0
  487. package/node_modules/@openclaw/fs-safe/dist/root-public-types.js +1 -0
  488. package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts +25 -0
  489. package/node_modules/@openclaw/fs-safe/dist/root-read-admission.js +86 -0
  490. package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +12 -0
  491. package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.js +87 -0
  492. package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts +16 -0
  493. package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.js +37 -0
  494. package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +6 -0
  495. package/node_modules/@openclaw/fs-safe/dist/root-remove.js +464 -0
  496. package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts +13 -0
  497. package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.js +34 -0
  498. package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +48 -0
  499. package/node_modules/@openclaw/fs-safe/dist/root-walk.js +234 -0
  500. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +65 -0
  501. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +299 -0
  502. package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts +11 -0
  503. package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.js +23 -0
  504. package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +43 -0
  505. package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +180 -0
  506. package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.d.ts +14 -0
  507. package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.js +162 -0
  508. package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts +7 -0
  509. package/node_modules/@openclaw/fs-safe/dist/root-write-mode.js +72 -0
  510. package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts +23 -0
  511. package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +85 -0
  512. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +11 -0
  513. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +95 -0
  514. package/node_modules/@openclaw/fs-safe/dist/root.d.ts +2 -0
  515. package/node_modules/@openclaw/fs-safe/dist/root.js +1 -0
  516. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +12 -0
  517. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +80 -0
  518. package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +29 -0
  519. package/node_modules/@openclaw/fs-safe/dist/secret-file.js +333 -0
  520. package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts +3 -0
  521. package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +58 -0
  522. package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts +20 -0
  523. package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +68 -0
  524. package/node_modules/@openclaw/fs-safe/dist/secret.d.ts +3 -0
  525. package/node_modules/@openclaw/fs-safe/dist/secret.js +3 -0
  526. package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts +10 -0
  527. package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +79 -0
  528. package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +31 -0
  529. package/node_modules/@openclaw/fs-safe/dist/secure-file.js +298 -0
  530. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +29 -0
  531. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +176 -0
  532. package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts +34 -0
  533. package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.js +110 -0
  534. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +17 -0
  535. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +301 -0
  536. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +28 -0
  537. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +132 -0
  538. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +4 -0
  539. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +442 -0
  540. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.d.ts +18 -0
  541. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.js +60 -0
  542. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.d.ts +41 -0
  543. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.js +113 -0
  544. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +31 -0
  545. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.js +1 -0
  546. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts +20 -0
  547. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.js +48 -0
  548. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +14 -0
  549. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +113 -0
  550. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +67 -0
  551. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +374 -0
  552. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.d.ts +13 -0
  553. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.js +47 -0
  554. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts +2 -0
  555. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +79 -0
  556. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.d.ts +34 -0
  557. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.js +228 -0
  558. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.d.ts +7 -0
  559. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.js +55 -0
  560. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts +68 -0
  561. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.js +1 -0
  562. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts +13 -0
  563. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +282 -0
  564. package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +27 -0
  565. package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +148 -0
  566. package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.d.ts +16 -0
  567. package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.js +57 -0
  568. package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts +55 -0
  569. package/node_modules/@openclaw/fs-safe/dist/staged-file-types.js +1 -0
  570. package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.d.ts +39 -0
  571. package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.js +1 -0
  572. package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts +10 -0
  573. package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +57 -0
  574. package/node_modules/@openclaw/fs-safe/dist/store.d.ts +3 -0
  575. package/node_modules/@openclaw/fs-safe/dist/store.js +3 -0
  576. package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +7 -0
  577. package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +88 -0
  578. package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts +4 -0
  579. package/node_modules/@openclaw/fs-safe/dist/string-coerce.js +16 -0
  580. package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts +5 -0
  581. package/node_modules/@openclaw/fs-safe/dist/suppressed-error.js +15 -0
  582. package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts +11 -0
  583. package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +109 -0
  584. package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts +13 -0
  585. package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.js +88 -0
  586. package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +31 -0
  587. package/node_modules/@openclaw/fs-safe/dist/temp-target.js +236 -0
  588. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts +14 -0
  589. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +387 -0
  590. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +23 -0
  591. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +150 -0
  592. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +42 -0
  593. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +341 -0
  594. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +24 -0
  595. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +398 -0
  596. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.d.ts +8 -0
  597. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.js +52 -0
  598. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +39 -0
  599. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.js +1 -0
  600. package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +3 -0
  601. package/node_modules/@openclaw/fs-safe/dist/temp.js +2 -0
  602. package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +35 -0
  603. package/node_modules/@openclaw/fs-safe/dist/test-hooks.js +13 -0
  604. package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +14 -0
  605. package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +18 -0
  606. package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +8 -0
  607. package/node_modules/@openclaw/fs-safe/dist/timing.js +59 -0
  608. package/node_modules/@openclaw/fs-safe/dist/trash.d.ts +4 -0
  609. package/node_modules/@openclaw/fs-safe/dist/trash.js +245 -0
  610. package/node_modules/@openclaw/fs-safe/dist/types.d.ts +22 -0
  611. package/node_modules/@openclaw/fs-safe/dist/types.js +1 -0
  612. package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts +2 -0
  613. package/node_modules/@openclaw/fs-safe/dist/unicode-path.js +16 -0
  614. package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +37 -0
  615. package/node_modules/@openclaw/fs-safe/dist/walk.js +207 -0
  616. package/node_modules/@openclaw/fs-safe/dist/watch-alias.d.ts +6 -0
  617. package/node_modules/@openclaw/fs-safe/dist/watch-alias.js +88 -0
  618. package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +9 -0
  619. package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +93 -0
  620. package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +36 -0
  621. package/node_modules/@openclaw/fs-safe/dist/watch-native.js +73 -0
  622. package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +28 -0
  623. package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +300 -0
  624. package/node_modules/@openclaw/fs-safe/dist/watch-stream.d.ts +8 -0
  625. package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +32 -0
  626. package/node_modules/@openclaw/fs-safe/dist/watch-types.d.ts +60 -0
  627. package/node_modules/@openclaw/fs-safe/dist/watch-types.js +1 -0
  628. package/node_modules/@openclaw/fs-safe/dist/watch.d.ts +5 -0
  629. package/node_modules/@openclaw/fs-safe/dist/watch.js +530 -0
  630. package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts +1 -0
  631. package/node_modules/@openclaw/fs-safe/dist/windows-command.js +34 -0
  632. package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +24 -0
  633. package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +100 -0
  634. package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +39 -0
  635. package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +122 -0
  636. package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.d.ts +5 -0
  637. package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.js +21 -0
  638. package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.cs +336 -0
  639. package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.ps1 +90 -0
  640. package/node_modules/@openclaw/fs-safe/dist/windows-security-command.d.ts +33 -0
  641. package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +414 -0
  642. package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +9 -0
  643. package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +112 -0
  644. package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +13 -0
  645. package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +49 -0
  646. package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts +4 -0
  647. package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +27 -0
  648. package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts +1 -0
  649. package/node_modules/@openclaw/fs-safe/dist/write-queue.js +15 -0
  650. package/node_modules/@openclaw/fs-safe/docs/advanced.md +271 -0
  651. package/node_modules/@openclaw/fs-safe/docs/archive.md +859 -0
  652. package/node_modules/@openclaw/fs-safe/docs/assets/readme-banner.jpg +0 -0
  653. package/node_modules/@openclaw/fs-safe/docs/atomic.md +611 -0
  654. package/node_modules/@openclaw/fs-safe/docs/config.md +136 -0
  655. package/node_modules/@openclaw/fs-safe/docs/contributing.md +360 -0
  656. package/node_modules/@openclaw/fs-safe/docs/copy.md +199 -0
  657. package/node_modules/@openclaw/fs-safe/docs/creation.md +132 -0
  658. package/node_modules/@openclaw/fs-safe/docs/directory-identity.md +85 -0
  659. package/node_modules/@openclaw/fs-safe/docs/durability.md +445 -0
  660. package/node_modules/@openclaw/fs-safe/docs/entries.md +109 -0
  661. package/node_modules/@openclaw/fs-safe/docs/errors.md +240 -0
  662. package/node_modules/@openclaw/fs-safe/docs/file-contents.md +68 -0
  663. package/node_modules/@openclaw/fs-safe/docs/file-store.md +369 -0
  664. package/node_modules/@openclaw/fs-safe/docs/filename.md +110 -0
  665. package/node_modules/@openclaw/fs-safe/docs/guest.md +152 -0
  666. package/node_modules/@openclaw/fs-safe/docs/in-place-write.md +81 -0
  667. package/node_modules/@openclaw/fs-safe/docs/index.md +87 -0
  668. package/node_modules/@openclaw/fs-safe/docs/install-path.md +216 -0
  669. package/node_modules/@openclaw/fs-safe/docs/install.md +252 -0
  670. package/node_modules/@openclaw/fs-safe/docs/json-store.md +240 -0
  671. package/node_modules/@openclaw/fs-safe/docs/json.md +225 -0
  672. package/node_modules/@openclaw/fs-safe/docs/local-roots.md +150 -0
  673. package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +205 -0
  674. package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +48 -0
  675. package/node_modules/@openclaw/fs-safe/docs/mutation-policy-proof.md +69 -0
  676. package/node_modules/@openclaw/fs-safe/docs/native-helper.md +193 -0
  677. package/node_modules/@openclaw/fs-safe/docs/native.md +351 -0
  678. package/node_modules/@openclaw/fs-safe/docs/output.md +193 -0
  679. package/node_modules/@openclaw/fs-safe/docs/path-case.md +64 -0
  680. package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +74 -0
  681. package/node_modules/@openclaw/fs-safe/docs/path-scope.md +159 -0
  682. package/node_modules/@openclaw/fs-safe/docs/path-suffix-aliases.md +204 -0
  683. package/node_modules/@openclaw/fs-safe/docs/path.md +219 -0
  684. package/node_modules/@openclaw/fs-safe/docs/permissions.md +352 -0
  685. package/node_modules/@openclaw/fs-safe/docs/positional-read.md +63 -0
  686. package/node_modules/@openclaw/fs-safe/docs/private-file-store.md +68 -0
  687. package/node_modules/@openclaw/fs-safe/docs/public-api.md +188 -0
  688. package/node_modules/@openclaw/fs-safe/docs/quickstart.md +154 -0
  689. package/node_modules/@openclaw/fs-safe/docs/reading.md +196 -0
  690. package/node_modules/@openclaw/fs-safe/docs/regular-file.md +193 -0
  691. package/node_modules/@openclaw/fs-safe/docs/retained-file.md +115 -0
  692. package/node_modules/@openclaw/fs-safe/docs/root.md +571 -0
  693. package/node_modules/@openclaw/fs-safe/docs/secret-file.md +318 -0
  694. package/node_modules/@openclaw/fs-safe/docs/secure-file.md +112 -0
  695. package/node_modules/@openclaw/fs-safe/docs/security-model.md +272 -0
  696. package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +599 -0
  697. package/node_modules/@openclaw/fs-safe/docs/staged-file.md +192 -0
  698. package/node_modules/@openclaw/fs-safe/docs/staged-symlink.md +124 -0
  699. package/node_modules/@openclaw/fs-safe/docs/store.md +129 -0
  700. package/node_modules/@openclaw/fs-safe/docs/temp.md +780 -0
  701. package/node_modules/@openclaw/fs-safe/docs/test-hooks.md +110 -0
  702. package/node_modules/@openclaw/fs-safe/docs/testing.md +399 -0
  703. package/node_modules/@openclaw/fs-safe/docs/timing.md +123 -0
  704. package/node_modules/@openclaw/fs-safe/docs/types.md +217 -0
  705. package/node_modules/@openclaw/fs-safe/docs/walk.md +283 -0
  706. package/node_modules/@openclaw/fs-safe/docs/watch.md +251 -0
  707. package/node_modules/@openclaw/fs-safe/docs/writing.md +662 -0
  708. package/node_modules/@openclaw/fs-safe/package.json +204 -0
  709. package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
  710. package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +29 -0
  711. package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
  712. package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +29 -0
  713. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
  714. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +32 -0
  715. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
  716. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +32 -0
  717. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
  718. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +32 -0
  719. package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
  720. package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +32 -0
  721. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
  722. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +29 -0
  723. package/node_modules/argparse/lib/argparse.js +3820 -0
  724. package/node_modules/argparse/package.json +38 -0
  725. package/node_modules/content-type/README.md +81 -0
  726. package/node_modules/content-type/dist/index.d.ts +54 -0
  727. package/node_modules/content-type/dist/index.js +291 -0
  728. package/node_modules/content-type/dist/index.js.map +1 -0
  729. package/node_modules/content-type/package.json +61 -0
  730. package/node_modules/core-util-is/LICENSE +19 -0
  731. package/node_modules/core-util-is/README.md +3 -0
  732. package/node_modules/core-util-is/lib/util.js +107 -0
  733. package/node_modules/core-util-is/package.json +38 -0
  734. package/node_modules/file-type/package.json +275 -0
  735. package/node_modules/file-type/readme.md +605 -0
  736. package/node_modules/file-type/source/detectors/zip.js +653 -0
  737. package/node_modules/file-type/source/index.js +1956 -0
  738. package/node_modules/file-type/source/supported.js +370 -0
  739. package/node_modules/immediate/LICENSE.txt +20 -0
  740. package/node_modules/immediate/README.md +93 -0
  741. package/node_modules/immediate/dist/immediate.js +75 -0
  742. package/node_modules/immediate/dist/immediate.min.js +1 -0
  743. package/node_modules/immediate/lib/browser.js +69 -0
  744. package/node_modules/immediate/lib/index.js +73 -0
  745. package/node_modules/immediate/package.json +42 -0
  746. package/node_modules/inherits/LICENSE +16 -0
  747. package/node_modules/inherits/README.md +42 -0
  748. package/node_modules/inherits/inherits.js +9 -0
  749. package/node_modules/inherits/inherits_browser.js +27 -0
  750. package/node_modules/inherits/package.json +29 -0
  751. package/node_modules/isarray/.npmignore +1 -0
  752. package/node_modules/isarray/.travis.yml +4 -0
  753. package/node_modules/isarray/Makefile +6 -0
  754. package/node_modules/isarray/README.md +60 -0
  755. package/node_modules/isarray/component.json +19 -0
  756. package/node_modules/isarray/index.js +5 -0
  757. package/node_modules/isarray/package.json +45 -0
  758. package/node_modules/isarray/test.js +20 -0
  759. package/node_modules/jszip/.codeclimate.yml +16 -0
  760. package/node_modules/jszip/.editorconfig +8 -0
  761. package/node_modules/jszip/.eslintrc.js +43 -0
  762. package/node_modules/jszip/.github/FUNDING.yml +1 -0
  763. package/node_modules/jszip/.github/actions/setup/action.yml +23 -0
  764. package/node_modules/jszip/.github/workflows/benchmark.yml +38 -0
  765. package/node_modules/jszip/.github/workflows/main.yml +55 -0
  766. package/node_modules/jszip/CHANGES.md +210 -0
  767. package/node_modules/jszip/LICENSE.markdown +651 -0
  768. package/node_modules/jszip/README.markdown +33 -0
  769. package/node_modules/jszip/dist/jszip.js +11586 -0
  770. package/node_modules/jszip/dist/jszip.min.js +13 -0
  771. package/node_modules/jszip/index.d.ts +344 -0
  772. package/node_modules/jszip/lib/base64.js +106 -0
  773. package/node_modules/jszip/lib/compressedObject.js +74 -0
  774. package/node_modules/jszip/lib/compressions.js +14 -0
  775. package/node_modules/jszip/lib/crc32.js +77 -0
  776. package/node_modules/jszip/lib/defaults.js +11 -0
  777. package/node_modules/jszip/lib/external.js +18 -0
  778. package/node_modules/jszip/lib/flate.js +85 -0
  779. package/node_modules/jszip/lib/generate/ZipFileWorker.js +539 -0
  780. package/node_modules/jszip/lib/generate/index.js +57 -0
  781. package/node_modules/jszip/lib/index.js +55 -0
  782. package/node_modules/jszip/lib/license_header.js +11 -0
  783. package/node_modules/jszip/lib/load.js +88 -0
  784. package/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
  785. package/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
  786. package/node_modules/jszip/lib/nodejsUtils.js +57 -0
  787. package/node_modules/jszip/lib/object.js +384 -0
  788. package/node_modules/jszip/lib/readable-stream-browser.js +10 -0
  789. package/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
  790. package/node_modules/jszip/lib/reader/DataReader.js +116 -0
  791. package/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
  792. package/node_modules/jszip/lib/reader/StringReader.js +38 -0
  793. package/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
  794. package/node_modules/jszip/lib/reader/readerFor.js +28 -0
  795. package/node_modules/jszip/lib/signature.js +7 -0
  796. package/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
  797. package/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
  798. package/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
  799. package/node_modules/jszip/lib/stream/DataWorker.js +116 -0
  800. package/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
  801. package/node_modules/jszip/lib/stream/StreamHelper.js +214 -0
  802. package/node_modules/jszip/lib/support.js +38 -0
  803. package/node_modules/jszip/lib/utf8.js +275 -0
  804. package/node_modules/jszip/lib/utils.js +510 -0
  805. package/node_modules/jszip/lib/zipEntries.js +261 -0
  806. package/node_modules/jszip/lib/zipEntry.js +293 -0
  807. package/node_modules/jszip/lib/zipObject.js +133 -0
  808. package/node_modules/jszip/package.json +67 -0
  809. package/node_modules/jszip/sponsors.md +21 -0
  810. package/node_modules/jszip/tsconfig.json +101 -0
  811. package/node_modules/jszip/vendor/FileSaver.js +247 -0
  812. package/node_modules/lie/README.md +62 -0
  813. package/node_modules/lie/dist/lie.js +350 -0
  814. package/node_modules/lie/dist/lie.min.js +1 -0
  815. package/node_modules/lie/dist/lie.polyfill.js +358 -0
  816. package/node_modules/lie/dist/lie.polyfill.min.js +1 -0
  817. package/node_modules/lie/lib/browser.js +273 -0
  818. package/node_modules/lie/lib/index.js +298 -0
  819. package/node_modules/lie/license.md +7 -0
  820. package/node_modules/lie/lie.d.ts +244 -0
  821. package/node_modules/lie/package.json +69 -0
  822. package/node_modules/lie/polyfill.js +4 -0
  823. package/node_modules/matrix-js-sdk/CHANGELOG.md +20 -0
  824. package/node_modules/matrix-js-sdk/lib/@types/json.d.ts.map +1 -1
  825. package/node_modules/matrix-js-sdk/lib/@types/json.js.map +1 -1
  826. package/node_modules/matrix-js-sdk/lib/client.d.ts +74 -5
  827. package/node_modules/matrix-js-sdk/lib/client.d.ts.map +1 -1
  828. package/node_modules/matrix-js-sdk/lib/client.js +83 -7
  829. package/node_modules/matrix-js-sdk/lib/client.js.map +1 -1
  830. package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.d.ts +42 -23
  831. package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.d.ts.map +1 -1
  832. package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.js +7 -0
  833. package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.js.map +1 -1
  834. package/node_modules/matrix-js-sdk/lib/embedded.d.ts +35 -1
  835. package/node_modules/matrix-js-sdk/lib/embedded.d.ts.map +1 -1
  836. package/node_modules/matrix-js-sdk/lib/embedded.js +49 -1
  837. package/node_modules/matrix-js-sdk/lib/embedded.js.map +1 -1
  838. package/node_modules/matrix-js-sdk/lib/http-api/fetch.d.ts +0 -1
  839. package/node_modules/matrix-js-sdk/lib/http-api/fetch.d.ts.map +1 -1
  840. package/node_modules/matrix-js-sdk/lib/http-api/fetch.js +3 -22
  841. package/node_modules/matrix-js-sdk/lib/http-api/fetch.js.map +1 -1
  842. package/node_modules/matrix-js-sdk/lib/http-api/logging.d.ts +10 -0
  843. package/node_modules/matrix-js-sdk/lib/http-api/logging.d.ts.map +1 -0
  844. package/node_modules/matrix-js-sdk/lib/http-api/logging.js +46 -0
  845. package/node_modules/matrix-js-sdk/lib/http-api/logging.js.map +1 -0
  846. package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.d.ts +5 -0
  847. package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.d.ts.map +1 -1
  848. package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.js.map +1 -1
  849. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts +82 -0
  850. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts.map +1 -1
  851. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js +25 -0
  852. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js.map +1 -1
  853. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts +41 -2
  854. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
  855. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js +59 -1
  856. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
  857. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js +7 -4
  858. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js.map +1 -1
  859. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts +17 -0
  860. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts.map +1 -1
  861. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js +68 -29
  862. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js.map +1 -1
  863. package/node_modules/matrix-js-sdk/lib/models/room-receipts.d.ts +9 -3
  864. package/node_modules/matrix-js-sdk/lib/models/room-receipts.d.ts.map +1 -1
  865. package/node_modules/matrix-js-sdk/lib/models/room-receipts.js +51 -11
  866. package/node_modules/matrix-js-sdk/lib/models/room-receipts.js.map +1 -1
  867. package/node_modules/matrix-js-sdk/lib/oauth/authorize.d.ts +7 -2
  868. package/node_modules/matrix-js-sdk/lib/oauth/authorize.d.ts.map +1 -1
  869. package/node_modules/matrix-js-sdk/lib/oauth/authorize.js +10 -4
  870. package/node_modules/matrix-js-sdk/lib/oauth/authorize.js.map +1 -1
  871. package/node_modules/matrix-js-sdk/lib/oauth/fetch.d.ts +17 -0
  872. package/node_modules/matrix-js-sdk/lib/oauth/fetch.d.ts.map +1 -0
  873. package/node_modules/matrix-js-sdk/lib/oauth/fetch.js +47 -0
  874. package/node_modules/matrix-js-sdk/lib/oauth/fetch.js.map +1 -0
  875. package/node_modules/matrix-js-sdk/lib/oauth/index.d.ts +15 -2
  876. package/node_modules/matrix-js-sdk/lib/oauth/index.d.ts.map +1 -1
  877. package/node_modules/matrix-js-sdk/lib/oauth/index.js +33 -12
  878. package/node_modules/matrix-js-sdk/lib/oauth/index.js.map +1 -1
  879. package/node_modules/matrix-js-sdk/lib/rust-crypto/index.d.ts +17 -0
  880. package/node_modules/matrix-js-sdk/lib/rust-crypto/index.d.ts.map +1 -1
  881. package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js +4 -2
  882. package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js.map +1 -1
  883. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.d.ts +6 -26
  884. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
  885. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js +19 -54
  886. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js.map +1 -1
  887. package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.d.ts.map +1 -1
  888. package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js +65 -27
  889. package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js.map +1 -1
  890. package/node_modules/matrix-js-sdk/lib/sliding-sync.d.ts +17 -0
  891. package/node_modules/matrix-js-sdk/lib/sliding-sync.d.ts.map +1 -1
  892. package/node_modules/matrix-js-sdk/lib/sliding-sync.js +21 -9
  893. package/node_modules/matrix-js-sdk/lib/sliding-sync.js.map +1 -1
  894. package/node_modules/matrix-js-sdk/lib/sync.d.ts +9 -1
  895. package/node_modules/matrix-js-sdk/lib/sync.d.ts.map +1 -1
  896. package/node_modules/matrix-js-sdk/lib/sync.js +54 -29
  897. package/node_modules/matrix-js-sdk/lib/sync.js.map +1 -1
  898. package/node_modules/matrix-js-sdk/package.json +5 -5
  899. package/node_modules/matrix-js-sdk/src/@types/json.ts +11 -2
  900. package/node_modules/matrix-js-sdk/src/client.ts +126 -11
  901. package/node_modules/matrix-js-sdk/src/common-crypto/CryptoBackend.ts +45 -23
  902. package/node_modules/matrix-js-sdk/src/embedded.ts +67 -4
  903. package/node_modules/matrix-js-sdk/src/http-api/fetch.ts +2 -23
  904. package/node_modules/matrix-js-sdk/src/http-api/logging.ts +46 -0
  905. package/node_modules/matrix-js-sdk/src/matrixrtc/EncryptionManager.ts +6 -0
  906. package/node_modules/matrix-js-sdk/src/matrixrtc/LivekitTransport.ts +86 -0
  907. package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +81 -1
  908. package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManager.ts +7 -7
  909. package/node_modules/matrix-js-sdk/src/matrixrtc/RTCEncryptionManager.ts +80 -31
  910. package/node_modules/matrix-js-sdk/src/models/room-receipts.ts +54 -10
  911. package/node_modules/matrix-js-sdk/src/oauth/authorize.ts +10 -2
  912. package/node_modules/matrix-js-sdk/src/oauth/fetch.ts +54 -0
  913. package/node_modules/matrix-js-sdk/src/oauth/index.ts +29 -10
  914. package/node_modules/matrix-js-sdk/src/rust-crypto/index.ts +23 -0
  915. package/node_modules/matrix-js-sdk/src/rust-crypto/rust-crypto.ts +25 -67
  916. package/node_modules/matrix-js-sdk/src/sliding-sync-sdk.ts +73 -33
  917. package/node_modules/matrix-js-sdk/src/sliding-sync.ts +31 -14
  918. package/node_modules/matrix-js-sdk/src/sync.ts +58 -35
  919. package/node_modules/pako/CHANGELOG.md +164 -0
  920. package/node_modules/pako/LICENSE +21 -0
  921. package/node_modules/pako/README.md +191 -0
  922. package/node_modules/pako/dist/pako.js +6818 -0
  923. package/node_modules/pako/dist/pako.min.js +1 -0
  924. package/node_modules/pako/dist/pako_deflate.js +3997 -0
  925. package/node_modules/pako/dist/pako_deflate.min.js +1 -0
  926. package/node_modules/pako/dist/pako_inflate.js +3300 -0
  927. package/node_modules/pako/dist/pako_inflate.min.js +1 -0
  928. package/node_modules/pako/index.js +14 -0
  929. package/node_modules/pako/lib/deflate.js +400 -0
  930. package/node_modules/pako/lib/inflate.js +423 -0
  931. package/node_modules/pako/lib/utils/common.js +105 -0
  932. package/node_modules/pako/lib/utils/strings.js +187 -0
  933. package/node_modules/pako/lib/zlib/README +59 -0
  934. package/node_modules/pako/lib/zlib/adler32.js +51 -0
  935. package/node_modules/pako/lib/zlib/constants.js +68 -0
  936. package/node_modules/pako/lib/zlib/crc32.js +59 -0
  937. package/node_modules/pako/lib/zlib/deflate.js +1874 -0
  938. package/node_modules/pako/lib/zlib/gzheader.js +58 -0
  939. package/node_modules/pako/lib/zlib/inffast.js +345 -0
  940. package/node_modules/pako/lib/zlib/inflate.js +1556 -0
  941. package/node_modules/pako/lib/zlib/inftrees.js +343 -0
  942. package/node_modules/pako/lib/zlib/messages.js +32 -0
  943. package/node_modules/pako/lib/zlib/trees.js +1222 -0
  944. package/node_modules/pako/lib/zlib/zstream.js +47 -0
  945. package/node_modules/pako/package.json +44 -0
  946. package/node_modules/process-nextick-args/index.js +45 -0
  947. package/node_modules/process-nextick-args/license.md +19 -0
  948. package/node_modules/process-nextick-args/package.json +25 -0
  949. package/node_modules/process-nextick-args/readme.md +18 -0
  950. package/node_modules/readable-stream/.travis.yml +34 -0
  951. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  952. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  953. package/node_modules/readable-stream/LICENSE +47 -0
  954. package/node_modules/readable-stream/README.md +58 -0
  955. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  956. package/node_modules/readable-stream/duplex-browser.js +1 -0
  957. package/node_modules/readable-stream/duplex.js +1 -0
  958. package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
  959. package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
  960. package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
  961. package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
  962. package/node_modules/readable-stream/lib/_stream_writable.js +685 -0
  963. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
  964. package/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
  965. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  966. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  967. package/node_modules/readable-stream/package.json +52 -0
  968. package/node_modules/readable-stream/passthrough.js +1 -0
  969. package/node_modules/readable-stream/readable-browser.js +7 -0
  970. package/node_modules/readable-stream/readable.js +19 -0
  971. package/node_modules/readable-stream/transform.js +1 -0
  972. package/node_modules/readable-stream/writable-browser.js +1 -0
  973. package/node_modules/readable-stream/writable.js +8 -0
  974. package/node_modules/safe-buffer/LICENSE +21 -0
  975. package/node_modules/safe-buffer/README.md +584 -0
  976. package/node_modules/safe-buffer/index.d.ts +187 -0
  977. package/node_modules/safe-buffer/index.js +62 -0
  978. package/node_modules/safe-buffer/package.json +37 -0
  979. package/node_modules/setimmediate/LICENSE.txt +20 -0
  980. package/node_modules/setimmediate/package.json +30 -0
  981. package/node_modules/setimmediate/setImmediate.js +186 -0
  982. package/node_modules/string_decoder/.travis.yml +50 -0
  983. package/node_modules/string_decoder/LICENSE +48 -0
  984. package/node_modules/string_decoder/README.md +47 -0
  985. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  986. package/node_modules/string_decoder/package.json +31 -0
  987. package/node_modules/strtok3/lib/types.js +1 -0
  988. package/node_modules/typebox/build/compile/code.mjs +1 -2
  989. package/node_modules/typebox/build/compile/validator.mjs +5 -1
  990. package/node_modules/typebox/build/format/iri.mjs +16 -9
  991. package/node_modules/typebox/build/guard/emit.mjs +2 -2
  992. package/node_modules/typebox/build/guard/guard.d.mts +7 -5
  993. package/node_modules/typebox/build/guard/guard.mjs +14 -9
  994. package/node_modules/typebox/build/guard/index.mjs +6 -0
  995. package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
  996. package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
  997. package/node_modules/typebox/build/guard/unicode/unicode_segment.mjs +165 -0
  998. package/node_modules/typebox/build/schema/build.mjs +2 -3
  999. package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
  1000. package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
  1001. package/node_modules/typebox/build/schema/engine/_refine.mjs +13 -5
  1002. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +2 -1
  1003. package/node_modules/typebox/build/schema/engine/dependencies.mjs +2 -1
  1004. package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +2 -1
  1005. package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +1 -1
  1006. package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +2 -2
  1007. package/node_modules/typebox/build/schema/engine/format.mjs +9 -2
  1008. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +3 -2
  1009. package/node_modules/typebox/build/schema/engine/properties.mjs +3 -2
  1010. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -1
  1011. package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +1 -1
  1012. package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +2 -2
  1013. package/node_modules/typebox/build/schema/engine/ref.d.mts +1 -1
  1014. package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
  1015. package/node_modules/typebox/build/schema/engine/schema.mjs +24 -24
  1016. package/node_modules/typebox/build/schema/parse.mjs +3 -0
  1017. package/node_modules/typebox/build/schema/pointer/pointer.d.mts +1 -6
  1018. package/node_modules/typebox/build/schema/pointer/pointer.mjs +47 -64
  1019. package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
  1020. package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
  1021. package/node_modules/typebox/build/system/settings/settings.d.mts +11 -0
  1022. package/node_modules/typebox/build/system/settings/settings.mjs +14 -0
  1023. package/node_modules/typebox/build/type/extends/inference.d.mts +1 -1
  1024. package/node_modules/typebox/build/type/extends/inference.mjs +15 -2
  1025. package/node_modules/typebox/build/type/extends/tuple.d.mts +2 -1
  1026. package/node_modules/typebox/build/type/extends/tuple.mjs +21 -1
  1027. package/node_modules/typebox/build/value/parse/parse.mjs +10 -4
  1028. package/node_modules/typebox/package.json +1 -1
  1029. package/node_modules/typebox/readme.md +3 -1
  1030. package/node_modules/util-deprecate/History.md +16 -0
  1031. package/node_modules/util-deprecate/LICENSE +24 -0
  1032. package/node_modules/util-deprecate/README.md +53 -0
  1033. package/node_modules/util-deprecate/browser.js +67 -0
  1034. package/node_modules/util-deprecate/node.js +6 -0
  1035. package/node_modules/util-deprecate/package.json +27 -0
  1036. package/node_modules/zod/README.md +2 -2
  1037. package/node_modules/zod/compile.cjs +19 -0
  1038. package/node_modules/zod/index.cjs +19 -0
  1039. package/node_modules/zod/locales/index.cjs +19 -0
  1040. package/node_modules/zod/mini/index.cjs +19 -0
  1041. package/node_modules/zod/package.json +8 -7
  1042. package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
  1043. package/node_modules/zod/src/v4/classic/external.ts +2 -0
  1044. package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
  1045. package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
  1046. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
  1047. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
  1048. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  1049. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
  1050. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
  1051. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
  1052. package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
  1053. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
  1054. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  1055. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
  1056. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
  1057. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
  1058. package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
  1059. package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
  1060. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
  1061. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
  1062. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  1063. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
  1064. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
  1065. package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
  1066. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
  1067. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
  1068. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
  1069. package/node_modules/zod/src/v4/core/api.ts +44 -28
  1070. package/node_modules/zod/src/v4/core/checks.ts +62 -102
  1071. package/node_modules/zod/src/v4/core/compile.ts +218 -93
  1072. package/node_modules/zod/src/v4/core/core.ts +1 -3
  1073. package/node_modules/zod/src/v4/core/doc.ts +6 -2
  1074. package/node_modules/zod/src/v4/core/errors.ts +3 -6
  1075. package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
  1076. package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
  1077. package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
  1078. package/node_modules/zod/src/v4/core/parse.ts +37 -16
  1079. package/node_modules/zod/src/v4/core/regexes.ts +14 -4
  1080. package/node_modules/zod/src/v4/core/schemas.ts +296 -132
  1081. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  1082. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
  1083. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  1084. package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
  1085. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  1086. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  1087. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  1088. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
  1089. package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
  1090. package/node_modules/zod/src/v4/core/util.ts +218 -147
  1091. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  1092. package/node_modules/zod/src/v4/locales/ar.ts +2 -0
  1093. package/node_modules/zod/src/v4/locales/az.ts +2 -0
  1094. package/node_modules/zod/src/v4/locales/be.ts +2 -0
  1095. package/node_modules/zod/src/v4/locales/bg.ts +2 -0
  1096. package/node_modules/zod/src/v4/locales/bn.ts +2 -0
  1097. package/node_modules/zod/src/v4/locales/ca.ts +2 -0
  1098. package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
  1099. package/node_modules/zod/src/v4/locales/cs.ts +2 -0
  1100. package/node_modules/zod/src/v4/locales/da.ts +2 -0
  1101. package/node_modules/zod/src/v4/locales/de.ts +2 -0
  1102. package/node_modules/zod/src/v4/locales/el.ts +2 -0
  1103. package/node_modules/zod/src/v4/locales/en.ts +2 -0
  1104. package/node_modules/zod/src/v4/locales/eo.ts +2 -0
  1105. package/node_modules/zod/src/v4/locales/es.ts +2 -0
  1106. package/node_modules/zod/src/v4/locales/fa.ts +2 -0
  1107. package/node_modules/zod/src/v4/locales/fi.ts +2 -0
  1108. package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
  1109. package/node_modules/zod/src/v4/locales/fr.ts +2 -0
  1110. package/node_modules/zod/src/v4/locales/gu.ts +2 -0
  1111. package/node_modules/zod/src/v4/locales/he.ts +2 -0
  1112. package/node_modules/zod/src/v4/locales/hi.ts +2 -0
  1113. package/node_modules/zod/src/v4/locales/hr.ts +2 -0
  1114. package/node_modules/zod/src/v4/locales/hu.ts +2 -0
  1115. package/node_modules/zod/src/v4/locales/hy.ts +2 -0
  1116. package/node_modules/zod/src/v4/locales/id.ts +2 -0
  1117. package/node_modules/zod/src/v4/locales/index.ts +1 -0
  1118. package/node_modules/zod/src/v4/locales/is.ts +2 -0
  1119. package/node_modules/zod/src/v4/locales/it.ts +2 -0
  1120. package/node_modules/zod/src/v4/locales/ja.ts +2 -0
  1121. package/node_modules/zod/src/v4/locales/ka.ts +2 -0
  1122. package/node_modules/zod/src/v4/locales/km.ts +2 -0
  1123. package/node_modules/zod/src/v4/locales/kn.ts +2 -0
  1124. package/node_modules/zod/src/v4/locales/ko.ts +2 -0
  1125. package/node_modules/zod/src/v4/locales/lt.ts +2 -0
  1126. package/node_modules/zod/src/v4/locales/mk.ts +2 -0
  1127. package/node_modules/zod/src/v4/locales/ms.ts +2 -0
  1128. package/node_modules/zod/src/v4/locales/ne.ts +2 -0
  1129. package/node_modules/zod/src/v4/locales/nl.ts +2 -0
  1130. package/node_modules/zod/src/v4/locales/nn.ts +2 -0
  1131. package/node_modules/zod/src/v4/locales/no.ts +2 -0
  1132. package/node_modules/zod/src/v4/locales/ota.ts +2 -0
  1133. package/node_modules/zod/src/v4/locales/pl.ts +2 -0
  1134. package/node_modules/zod/src/v4/locales/ps.ts +2 -0
  1135. package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
  1136. package/node_modules/zod/src/v4/locales/pt.ts +2 -0
  1137. package/node_modules/zod/src/v4/locales/ro.ts +2 -0
  1138. package/node_modules/zod/src/v4/locales/ru.ts +2 -0
  1139. package/node_modules/zod/src/v4/locales/sk.ts +2 -0
  1140. package/node_modules/zod/src/v4/locales/sl.ts +2 -0
  1141. package/node_modules/zod/src/v4/locales/sv.ts +2 -0
  1142. package/node_modules/zod/src/v4/locales/ta.ts +2 -0
  1143. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  1144. package/node_modules/zod/src/v4/locales/th.ts +2 -0
  1145. package/node_modules/zod/src/v4/locales/tk.ts +2 -0
  1146. package/node_modules/zod/src/v4/locales/tr.ts +2 -0
  1147. package/node_modules/zod/src/v4/locales/uk.ts +2 -0
  1148. package/node_modules/zod/src/v4/locales/ur.ts +2 -0
  1149. package/node_modules/zod/src/v4/locales/uz.ts +2 -0
  1150. package/node_modules/zod/src/v4/locales/vi.ts +2 -0
  1151. package/node_modules/zod/src/v4/locales/yo.ts +2 -0
  1152. package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
  1153. package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
  1154. package/node_modules/zod/src/v4/mini/external.ts +2 -0
  1155. package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
  1156. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
  1157. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
  1158. package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
  1159. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
  1160. package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
  1161. package/node_modules/zod/v3/ZodError.cjs +19 -0
  1162. package/node_modules/zod/v3/errors.cjs +19 -0
  1163. package/node_modules/zod/v3/external.cjs +19 -0
  1164. package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
  1165. package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
  1166. package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
  1167. package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
  1168. package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
  1169. package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
  1170. package/node_modules/zod/v3/helpers/util.cjs +19 -0
  1171. package/node_modules/zod/v3/index.cjs +19 -0
  1172. package/node_modules/zod/v3/standard-schema.cjs +19 -0
  1173. package/node_modules/zod/v3/types.cjs +19 -0
  1174. package/node_modules/zod/v4/classic/checks.cjs +19 -0
  1175. package/node_modules/zod/v4/classic/coerce.cjs +19 -0
  1176. package/node_modules/zod/v4/classic/compat.cjs +19 -0
  1177. package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
  1178. package/node_modules/zod/v4/classic/errors.cjs +19 -0
  1179. package/node_modules/zod/v4/classic/external.cjs +22 -1
  1180. package/node_modules/zod/v4/classic/external.d.cts +1 -1
  1181. package/node_modules/zod/v4/classic/external.d.ts +1 -1
  1182. package/node_modules/zod/v4/classic/external.js +1 -1
  1183. package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
  1184. package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
  1185. package/node_modules/zod/v4/classic/in-out.cjs +19 -0
  1186. package/node_modules/zod/v4/classic/index.cjs +19 -0
  1187. package/node_modules/zod/v4/classic/iso.cjs +19 -0
  1188. package/node_modules/zod/v4/classic/parse.cjs +19 -0
  1189. package/node_modules/zod/v4/classic/schemas.cjs +100 -35
  1190. package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
  1191. package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
  1192. package/node_modules/zod/v4/classic/schemas.js +77 -33
  1193. package/node_modules/zod/v4/core/api.cjs +45 -22
  1194. package/node_modules/zod/v4/core/api.d.cts +12 -6
  1195. package/node_modules/zod/v4/core/api.d.ts +12 -6
  1196. package/node_modules/zod/v4/core/api.js +25 -22
  1197. package/node_modules/zod/v4/core/checks.cjs +51 -97
  1198. package/node_modules/zod/v4/core/checks.d.cts +17 -1
  1199. package/node_modules/zod/v4/core/checks.d.ts +17 -1
  1200. package/node_modules/zod/v4/core/checks.js +31 -96
  1201. package/node_modules/zod/v4/core/compile.cjs +173 -78
  1202. package/node_modules/zod/v4/core/compile.d.cts +18 -4
  1203. package/node_modules/zod/v4/core/compile.d.ts +18 -4
  1204. package/node_modules/zod/v4/core/compile.js +154 -79
  1205. package/node_modules/zod/v4/core/core.cjs +20 -1
  1206. package/node_modules/zod/v4/core/core.js +1 -1
  1207. package/node_modules/zod/v4/core/doc.cjs +26 -2
  1208. package/node_modules/zod/v4/core/doc.js +7 -2
  1209. package/node_modules/zod/v4/core/errors.cjs +21 -5
  1210. package/node_modules/zod/v4/core/errors.js +2 -5
  1211. package/node_modules/zod/v4/core/index.cjs +19 -0
  1212. package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
  1213. package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
  1214. package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
  1215. package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
  1216. package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
  1217. package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
  1218. package/node_modules/zod/v4/core/json-schema.cjs +19 -0
  1219. package/node_modules/zod/v4/core/memoizer.cjs +111 -23
  1220. package/node_modules/zod/v4/core/memoizer.js +69 -23
  1221. package/node_modules/zod/v4/core/parse.cjs +56 -16
  1222. package/node_modules/zod/v4/core/parse.js +37 -16
  1223. package/node_modules/zod/v4/core/regexes.cjs +31 -6
  1224. package/node_modules/zod/v4/core/regexes.d.cts +3 -0
  1225. package/node_modules/zod/v4/core/regexes.d.ts +3 -0
  1226. package/node_modules/zod/v4/core/regexes.js +10 -4
  1227. package/node_modules/zod/v4/core/registries.cjs +19 -0
  1228. package/node_modules/zod/v4/core/schemas.cjs +302 -114
  1229. package/node_modules/zod/v4/core/schemas.d.cts +28 -8
  1230. package/node_modules/zod/v4/core/schemas.d.ts +28 -8
  1231. package/node_modules/zod/v4/core/schemas.js +279 -113
  1232. package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
  1233. package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
  1234. package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
  1235. package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
  1236. package/node_modules/zod/v4/core/to-json-schema.js +7 -6
  1237. package/node_modules/zod/v4/core/util.cjs +177 -143
  1238. package/node_modules/zod/v4/core/util.d.cts +25 -4
  1239. package/node_modules/zod/v4/core/util.d.ts +25 -4
  1240. package/node_modules/zod/v4/core/util.js +156 -143
  1241. package/node_modules/zod/v4/core/versions.cjs +21 -2
  1242. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  1243. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  1244. package/node_modules/zod/v4/core/versions.js +2 -2
  1245. package/node_modules/zod/v4/core/visit.cjs +19 -0
  1246. package/node_modules/zod/v4/index.cjs +19 -0
  1247. package/node_modules/zod/v4/locales/ar.cjs +2 -0
  1248. package/node_modules/zod/v4/locales/ar.js +2 -0
  1249. package/node_modules/zod/v4/locales/az.cjs +2 -0
  1250. package/node_modules/zod/v4/locales/az.js +2 -0
  1251. package/node_modules/zod/v4/locales/be.cjs +2 -0
  1252. package/node_modules/zod/v4/locales/be.js +2 -0
  1253. package/node_modules/zod/v4/locales/bg.cjs +2 -0
  1254. package/node_modules/zod/v4/locales/bg.js +2 -0
  1255. package/node_modules/zod/v4/locales/bn.cjs +2 -0
  1256. package/node_modules/zod/v4/locales/bn.js +2 -0
  1257. package/node_modules/zod/v4/locales/ca.cjs +2 -0
  1258. package/node_modules/zod/v4/locales/ca.js +2 -0
  1259. package/node_modules/zod/v4/locales/ckb.cjs +2 -0
  1260. package/node_modules/zod/v4/locales/ckb.js +2 -0
  1261. package/node_modules/zod/v4/locales/cs.cjs +2 -0
  1262. package/node_modules/zod/v4/locales/cs.js +2 -0
  1263. package/node_modules/zod/v4/locales/da.cjs +2 -0
  1264. package/node_modules/zod/v4/locales/da.js +2 -0
  1265. package/node_modules/zod/v4/locales/de.cjs +2 -0
  1266. package/node_modules/zod/v4/locales/de.js +2 -0
  1267. package/node_modules/zod/v4/locales/el.cjs +2 -0
  1268. package/node_modules/zod/v4/locales/el.js +2 -0
  1269. package/node_modules/zod/v4/locales/en.cjs +2 -0
  1270. package/node_modules/zod/v4/locales/en.js +2 -0
  1271. package/node_modules/zod/v4/locales/eo.cjs +2 -0
  1272. package/node_modules/zod/v4/locales/eo.js +2 -0
  1273. package/node_modules/zod/v4/locales/es.cjs +2 -0
  1274. package/node_modules/zod/v4/locales/es.js +2 -0
  1275. package/node_modules/zod/v4/locales/fa.cjs +2 -0
  1276. package/node_modules/zod/v4/locales/fa.js +2 -0
  1277. package/node_modules/zod/v4/locales/fi.cjs +2 -0
  1278. package/node_modules/zod/v4/locales/fi.js +2 -0
  1279. package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
  1280. package/node_modules/zod/v4/locales/fr-CA.js +2 -0
  1281. package/node_modules/zod/v4/locales/fr.cjs +2 -0
  1282. package/node_modules/zod/v4/locales/fr.js +2 -0
  1283. package/node_modules/zod/v4/locales/gu.cjs +2 -0
  1284. package/node_modules/zod/v4/locales/gu.js +2 -0
  1285. package/node_modules/zod/v4/locales/he.cjs +2 -0
  1286. package/node_modules/zod/v4/locales/he.js +2 -0
  1287. package/node_modules/zod/v4/locales/hi.cjs +2 -0
  1288. package/node_modules/zod/v4/locales/hi.js +2 -0
  1289. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  1290. package/node_modules/zod/v4/locales/hr.js +2 -0
  1291. package/node_modules/zod/v4/locales/hu.cjs +2 -0
  1292. package/node_modules/zod/v4/locales/hu.js +2 -0
  1293. package/node_modules/zod/v4/locales/hy.cjs +2 -0
  1294. package/node_modules/zod/v4/locales/hy.js +2 -0
  1295. package/node_modules/zod/v4/locales/id.cjs +2 -0
  1296. package/node_modules/zod/v4/locales/id.js +2 -0
  1297. package/node_modules/zod/v4/locales/index.cjs +22 -1
  1298. package/node_modules/zod/v4/locales/index.d.cts +1 -0
  1299. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  1300. package/node_modules/zod/v4/locales/index.js +1 -0
  1301. package/node_modules/zod/v4/locales/is.cjs +2 -0
  1302. package/node_modules/zod/v4/locales/is.js +2 -0
  1303. package/node_modules/zod/v4/locales/it.cjs +2 -0
  1304. package/node_modules/zod/v4/locales/it.js +2 -0
  1305. package/node_modules/zod/v4/locales/ja.cjs +2 -0
  1306. package/node_modules/zod/v4/locales/ja.js +2 -0
  1307. package/node_modules/zod/v4/locales/ka.cjs +2 -0
  1308. package/node_modules/zod/v4/locales/ka.js +2 -0
  1309. package/node_modules/zod/v4/locales/km.cjs +2 -0
  1310. package/node_modules/zod/v4/locales/km.js +2 -0
  1311. package/node_modules/zod/v4/locales/kn.cjs +2 -0
  1312. package/node_modules/zod/v4/locales/kn.js +2 -0
  1313. package/node_modules/zod/v4/locales/ko.cjs +2 -0
  1314. package/node_modules/zod/v4/locales/ko.js +2 -0
  1315. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  1316. package/node_modules/zod/v4/locales/lt.js +2 -0
  1317. package/node_modules/zod/v4/locales/mk.cjs +2 -0
  1318. package/node_modules/zod/v4/locales/mk.js +2 -0
  1319. package/node_modules/zod/v4/locales/ms.cjs +2 -0
  1320. package/node_modules/zod/v4/locales/ms.js +2 -0
  1321. package/node_modules/zod/v4/locales/ne.cjs +2 -0
  1322. package/node_modules/zod/v4/locales/ne.js +2 -0
  1323. package/node_modules/zod/v4/locales/nl.cjs +2 -0
  1324. package/node_modules/zod/v4/locales/nl.js +2 -0
  1325. package/node_modules/zod/v4/locales/nn.cjs +2 -0
  1326. package/node_modules/zod/v4/locales/nn.js +2 -0
  1327. package/node_modules/zod/v4/locales/no.cjs +2 -0
  1328. package/node_modules/zod/v4/locales/no.js +2 -0
  1329. package/node_modules/zod/v4/locales/ota.cjs +2 -0
  1330. package/node_modules/zod/v4/locales/ota.js +2 -0
  1331. package/node_modules/zod/v4/locales/pl.cjs +2 -0
  1332. package/node_modules/zod/v4/locales/pl.js +2 -0
  1333. package/node_modules/zod/v4/locales/ps.cjs +2 -0
  1334. package/node_modules/zod/v4/locales/ps.js +2 -0
  1335. package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
  1336. package/node_modules/zod/v4/locales/pt-BR.js +2 -0
  1337. package/node_modules/zod/v4/locales/pt.cjs +2 -0
  1338. package/node_modules/zod/v4/locales/pt.js +2 -0
  1339. package/node_modules/zod/v4/locales/ro.cjs +2 -0
  1340. package/node_modules/zod/v4/locales/ro.js +2 -0
  1341. package/node_modules/zod/v4/locales/ru.cjs +2 -0
  1342. package/node_modules/zod/v4/locales/ru.js +2 -0
  1343. package/node_modules/zod/v4/locales/sk.cjs +2 -0
  1344. package/node_modules/zod/v4/locales/sk.js +2 -0
  1345. package/node_modules/zod/v4/locales/sl.cjs +2 -0
  1346. package/node_modules/zod/v4/locales/sl.js +2 -0
  1347. package/node_modules/zod/v4/locales/sv.cjs +2 -0
  1348. package/node_modules/zod/v4/locales/sv.js +2 -0
  1349. package/node_modules/zod/v4/locales/ta.cjs +2 -0
  1350. package/node_modules/zod/v4/locales/ta.js +2 -0
  1351. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  1352. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  1353. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  1354. package/node_modules/zod/v4/locales/tg.js +117 -0
  1355. package/node_modules/zod/v4/locales/th.cjs +2 -0
  1356. package/node_modules/zod/v4/locales/th.js +2 -0
  1357. package/node_modules/zod/v4/locales/tk.cjs +2 -0
  1358. package/node_modules/zod/v4/locales/tk.js +2 -0
  1359. package/node_modules/zod/v4/locales/tr.cjs +2 -0
  1360. package/node_modules/zod/v4/locales/tr.js +2 -0
  1361. package/node_modules/zod/v4/locales/uk.cjs +2 -0
  1362. package/node_modules/zod/v4/locales/uk.js +2 -0
  1363. package/node_modules/zod/v4/locales/ur.cjs +2 -0
  1364. package/node_modules/zod/v4/locales/ur.js +2 -0
  1365. package/node_modules/zod/v4/locales/uz.cjs +2 -0
  1366. package/node_modules/zod/v4/locales/uz.js +2 -0
  1367. package/node_modules/zod/v4/locales/vi.cjs +2 -0
  1368. package/node_modules/zod/v4/locales/vi.js +2 -0
  1369. package/node_modules/zod/v4/locales/yo.cjs +2 -0
  1370. package/node_modules/zod/v4/locales/yo.js +2 -0
  1371. package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
  1372. package/node_modules/zod/v4/locales/zh-CN.js +2 -0
  1373. package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
  1374. package/node_modules/zod/v4/locales/zh-TW.js +2 -0
  1375. package/node_modules/zod/v4/mini/checks.cjs +19 -0
  1376. package/node_modules/zod/v4/mini/coerce.cjs +19 -0
  1377. package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
  1378. package/node_modules/zod/v4/mini/external.cjs +22 -1
  1379. package/node_modules/zod/v4/mini/external.d.cts +1 -1
  1380. package/node_modules/zod/v4/mini/external.d.ts +1 -1
  1381. package/node_modules/zod/v4/mini/external.js +1 -1
  1382. package/node_modules/zod/v4/mini/in-out.cjs +19 -0
  1383. package/node_modules/zod/v4/mini/index.cjs +19 -0
  1384. package/node_modules/zod/v4/mini/iso.cjs +19 -0
  1385. package/node_modules/zod/v4/mini/parse.cjs +19 -0
  1386. package/node_modules/zod/v4/mini/schemas.cjs +44 -8
  1387. package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
  1388. package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
  1389. package/node_modules/zod/v4/mini/schemas.js +21 -6
  1390. package/node_modules/zod/v4-mini/index.cjs +19 -0
  1391. package/openclaw.plugin.json +24 -0
  1392. package/package.json +11 -8
  1393. package/dist/.setup/account-selection-5koohRSQ.mjs +0 -203
  1394. package/dist/.setup/accounts-BF5hyc-1.mjs +0 -129
  1395. package/dist/.setup/approval-handler.runtime-CoZCYGUH.mjs +0 -415
  1396. package/dist/.setup/approval-ids-CZOcdJ-5.mjs +0 -7
  1397. package/dist/.setup/approval-reaction-auth-B51E4ZDa.mjs +0 -27
  1398. package/dist/.setup/approval-reactions-B0hfA6qz.mjs +0 -196
  1399. package/dist/.setup/channel-q6TBKEiG.mjs +0 -1414
  1400. package/dist/.setup/channel.runtime-DcDBdxe6.mjs +0 -71
  1401. package/dist/.setup/channel.setup-DZQ5rf9k.mjs +0 -357
  1402. package/dist/.setup/cli-Cx_cNaXN.mjs +0 -1410
  1403. package/dist/.setup/cli-metadata-DHU1H-Vr.mjs +0 -22
  1404. package/dist/.setup/client-By2B3Wz4.mjs +0 -27
  1405. package/dist/.setup/client-DsJUnWlV.mjs +0 -863
  1406. package/dist/.setup/client-bootstrap-DGX0f-4x.mjs +0 -78
  1407. package/dist/.setup/config-secret-input.runtime-CwsP3--c.mjs +0 -2
  1408. package/dist/.setup/config-update-B_4qZ5bV.mjs +0 -167
  1409. package/dist/.setup/create-client-DQXAZjTw.mjs +0 -61
  1410. package/dist/.setup/credentials-CeRipapZ.mjs +0 -85
  1411. package/dist/.setup/credentials-read-Dp7BoEdm.mjs +0 -66
  1412. package/dist/.setup/credentials-write.runtime-M_bUf3rL.mjs +0 -14
  1413. package/dist/.setup/crypto-runtime-9oxuU30y.mjs +0 -1138
  1414. package/dist/.setup/crypto-snapshot-doctor.runtime-DXpLbQ7y.mjs +0 -91
  1415. package/dist/.setup/deps-mtxF2mHI.mjs +0 -169
  1416. package/dist/.setup/device-health-CWOuIirq.mjs +0 -21
  1417. package/dist/.setup/direct-management-B2Bno2xL.mjs +0 -346
  1418. package/dist/.setup/directory-live-CatwztQc.mjs +0 -153
  1419. package/dist/.setup/doctor-BLCvdOFo.mjs +0 -64
  1420. package/dist/.setup/doctor-contract-HyWFZQVG.mjs +0 -167
  1421. package/dist/.setup/draft-stream-DIFZDNrb.mjs +0 -159
  1422. package/dist/.setup/encryption-guidance-DYEbeYj-.mjs +0 -16
  1423. package/dist/.setup/http-client-BJjo-iw5.mjs +0 -395
  1424. package/dist/.setup/idb-persistence-CIfFUjP3.mjs +0 -237
  1425. package/dist/.setup/idb-persistence-lock-B3fZXyF_.mjs +0 -32
  1426. package/dist/.setup/inbound-dedupe-BSlv35xl.mjs +0 -48
  1427. package/dist/.setup/joined-room-encryption-BCtxQ3hR.mjs +0 -67
  1428. package/dist/.setup/logger-xBjiRIp1.mjs +0 -78
  1429. package/dist/.setup/logging-rgm8ep9H.mjs +0 -99
  1430. package/dist/.setup/messages-SW0NPYnR.mjs +0 -317
  1431. package/dist/.setup/monitor-DQfYX5rA.mjs +0 -4650
  1432. package/dist/.setup/outbound-DRWtSUe-.mjs +0 -228
  1433. package/dist/.setup/probe.runtime-qPRZE3Yf.mjs +0 -2
  1434. package/dist/.setup/profile-ClrB3IgR.mjs +0 -108
  1435. package/dist/.setup/profile-update-DPttQz3-.mjs +0 -70
  1436. package/dist/.setup/reaction-events-CdAk_rh_.mjs +0 -167
  1437. package/dist/.setup/resolve-targets-drjgAdIe.mjs +0 -140
  1438. package/dist/.setup/resolver.runtime-Ci6ddcPh.mjs +0 -5
  1439. package/dist/.setup/rolldown-runtime-8H4AJuhK.mjs +0 -14
  1440. package/dist/.setup/room-info-DHd1j3qM.mjs +0 -153
  1441. package/dist/.setup/sdk-BkKE4ANj.mjs +0 -2168
  1442. package/dist/.setup/send-currentness-BrGXL7b8.mjs +0 -90
  1443. package/dist/.setup/send-h0gZ_-qk.mjs +0 -2219
  1444. package/dist/.setup/setup-bootstrap-BYgBD504.mjs +0 -62
  1445. package/dist/.setup/setup-core-BUcDAM7q.mjs +0 -386
  1446. package/dist/.setup/setup-plugin-api-DoTm4v2q.mjs +0 -3
  1447. package/dist/.setup/setup-surface-V_Q-enq-.mjs +0 -482
  1448. package/dist/.setup/startup-verification-Bq5qeEGn.mjs +0 -233
  1449. package/dist/.setup/storage-DJ-oUgmX.mjs +0 -335
  1450. package/dist/.setup/storage-metadata-BQJjHC_i.mjs +0 -388
  1451. package/dist/.setup/storage-paths-DVCANXTc.mjs +0 -53
  1452. package/dist/.setup/subagent-hooks-jFgft_Mr.mjs +0 -52
  1453. package/dist/.setup/sync-cache-state-CFiZIPhA.mjs +0 -240
  1454. package/dist/.setup/thread-bindings-Hy96ujd3.mjs +0 -444
  1455. package/dist/.setup/thread-bindings-shared-oNPiyMWY.mjs +0 -92
  1456. package/dist/.setup/tool-actions.runtime-Dckttu43.mjs +0 -854
  1457. package/dist/.setup/url-validation-GRHde6lq.mjs +0 -36
  1458. package/dist/.setup/verification-CKqBZ9mI.mjs +0 -346
  1459. package/node_modules/markdown-it/node_modules/argparse/lib/argparse.js +0 -3804
  1460. package/node_modules/markdown-it/node_modules/argparse/package.json +0 -38
  1461. package/node_modules/matrix-js-sdk/node_modules/@babel/runtime/package.json +0 -486
  1462. package/node_modules/matrix-js-sdk/node_modules/content-type/README.md +0 -71
  1463. package/node_modules/matrix-js-sdk/node_modules/content-type/dist/index.d.ts +0 -46
  1464. package/node_modules/matrix-js-sdk/node_modules/content-type/dist/index.js +0 -176
  1465. package/node_modules/matrix-js-sdk/node_modules/content-type/dist/index.js.map +0 -1
  1466. package/node_modules/matrix-js-sdk/node_modules/content-type/package.json +0 -52
  1467. package/node_modules/music-metadata/node_modules/debug/LICENSE +0 -20
  1468. package/node_modules/music-metadata/node_modules/debug/README.md +0 -481
  1469. package/node_modules/music-metadata/node_modules/debug/package.json +0 -64
  1470. package/node_modules/music-metadata/node_modules/debug/src/browser.js +0 -272
  1471. package/node_modules/music-metadata/node_modules/debug/src/common.js +0 -292
  1472. package/node_modules/music-metadata/node_modules/debug/src/index.js +0 -10
  1473. package/node_modules/music-metadata/node_modules/debug/src/node.js +0 -263
  1474. package/node_modules/music-metadata/node_modules/file-type/package.json +0 -274
  1475. package/node_modules/music-metadata/node_modules/file-type/readme.md +0 -600
  1476. package/node_modules/music-metadata/node_modules/file-type/source/detectors/zip.js +0 -648
  1477. package/node_modules/music-metadata/node_modules/file-type/source/index.js +0 -1929
  1478. package/node_modules/music-metadata/node_modules/file-type/source/supported.js +0 -368
  1479. package/node_modules/music-metadata/node_modules/ms/index.js +0 -162
  1480. package/node_modules/music-metadata/node_modules/ms/license.md +0 -21
  1481. package/node_modules/music-metadata/node_modules/ms/package.json +0 -38
  1482. package/node_modules/music-metadata/node_modules/ms/readme.md +0 -59
  1483. package/node_modules/typebox/build/guard/string.mjs +0 -168
  1484. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/LICENSE +0 -0
  1485. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/README.md +0 -0
  1486. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/OverloadYield.js +0 -0
  1487. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/applyDecoratedDescriptor.js +0 -0
  1488. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/applyDecs2311.js +0 -0
  1489. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/arrayLikeToArray.js +0 -0
  1490. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/arrayWithHoles.js +0 -0
  1491. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/arrayWithoutHoles.js +0 -0
  1492. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/assertClassBrand.js +0 -0
  1493. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/assertThisInitialized.js +0 -0
  1494. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/asyncGeneratorDelegate.js +0 -0
  1495. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/asyncIterator.js +0 -0
  1496. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/asyncToGenerator.js +0 -0
  1497. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/awaitAsyncGenerator.js +0 -0
  1498. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/callSuper.js +0 -0
  1499. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/checkInRHS.js +0 -0
  1500. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/checkPrivateRedeclaration.js +0 -0
  1501. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classCallCheck.js +0 -0
  1502. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classNameTDZError.js +0 -0
  1503. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateFieldGet2.js +0 -0
  1504. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateFieldInitSpec.js +0 -0
  1505. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateFieldLooseBase.js +0 -0
  1506. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateFieldLooseKey.js +0 -0
  1507. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateFieldSet2.js +0 -0
  1508. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateGetter.js +0 -0
  1509. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateMethodInitSpec.js +0 -0
  1510. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateSetter.js +0 -0
  1511. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classStaticPrivateMethodGet.js +0 -0
  1512. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/construct.js +0 -0
  1513. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/createClass.js +0 -0
  1514. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/createForOfIteratorHelper.js +0 -0
  1515. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/createForOfIteratorHelperLoose.js +0 -0
  1516. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/createSuper.js +0 -0
  1517. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/defaults.js +0 -0
  1518. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/defineAccessor.js +0 -0
  1519. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/defineProperty.js +0 -0
  1520. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/OverloadYield.js +0 -0
  1521. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/applyDecoratedDescriptor.js +0 -0
  1522. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/applyDecs2311.js +0 -0
  1523. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/arrayLikeToArray.js +0 -0
  1524. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/arrayWithHoles.js +0 -0
  1525. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/arrayWithoutHoles.js +0 -0
  1526. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/assertClassBrand.js +0 -0
  1527. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/assertThisInitialized.js +0 -0
  1528. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/asyncGeneratorDelegate.js +0 -0
  1529. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/asyncIterator.js +0 -0
  1530. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/asyncToGenerator.js +0 -0
  1531. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/awaitAsyncGenerator.js +0 -0
  1532. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/callSuper.js +0 -0
  1533. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/checkInRHS.js +0 -0
  1534. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/checkPrivateRedeclaration.js +0 -0
  1535. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classCallCheck.js +0 -0
  1536. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classNameTDZError.js +0 -0
  1537. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateFieldGet2.js +0 -0
  1538. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateFieldInitSpec.js +0 -0
  1539. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateFieldLooseBase.js +0 -0
  1540. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateFieldLooseKey.js +0 -0
  1541. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateFieldSet2.js +0 -0
  1542. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateGetter.js +0 -0
  1543. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateMethodInitSpec.js +0 -0
  1544. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateSetter.js +0 -0
  1545. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classStaticPrivateMethodGet.js +0 -0
  1546. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/construct.js +0 -0
  1547. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/createClass.js +0 -0
  1548. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/createForOfIteratorHelper.js +0 -0
  1549. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/createForOfIteratorHelperLoose.js +0 -0
  1550. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/createSuper.js +0 -0
  1551. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/defaults.js +0 -0
  1552. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/defineAccessor.js +0 -0
  1553. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/defineProperty.js +0 -0
  1554. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/extends.js +0 -0
  1555. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/get.js +0 -0
  1556. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/getPrototypeOf.js +0 -0
  1557. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/identity.js +0 -0
  1558. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/importDeferProxy.js +0 -0
  1559. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/inherits.js +0 -0
  1560. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/inheritsLoose.js +0 -0
  1561. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/initializerDefineProperty.js +0 -0
  1562. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/initializerWarningHelper.js +0 -0
  1563. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/instanceof.js +0 -0
  1564. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/interopRequireDefault.js +0 -0
  1565. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/interopRequireWildcard.js +0 -0
  1566. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/isNativeFunction.js +0 -0
  1567. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/isNativeReflectConstruct.js +0 -0
  1568. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/iterableToArray.js +0 -0
  1569. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/iterableToArrayLimit.js +0 -0
  1570. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/jsx.js +0 -0
  1571. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/maybeArrayLike.js +0 -0
  1572. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/newArrowCheck.js +0 -0
  1573. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/nonIterableRest.js +0 -0
  1574. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/nonIterableSpread.js +0 -0
  1575. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/nullishReceiverError.js +0 -0
  1576. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/objectDestructuringEmpty.js +0 -0
  1577. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/objectSpread2.js +0 -0
  1578. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/objectWithoutProperties.js +0 -0
  1579. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -0
  1580. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/package.json +0 -0
  1581. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/possibleConstructorReturn.js +0 -0
  1582. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/readOnlyError.js +0 -0
  1583. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regenerator.js +0 -0
  1584. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regeneratorAsync.js +0 -0
  1585. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regeneratorAsyncGen.js +0 -0
  1586. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regeneratorAsyncIterator.js +0 -0
  1587. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regeneratorDefine.js +0 -0
  1588. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regeneratorKeys.js +0 -0
  1589. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regeneratorValues.js +0 -0
  1590. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/set.js +0 -0
  1591. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/setFunctionName.js +0 -0
  1592. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/setPrototypeOf.js +0 -0
  1593. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/skipFirstGeneratorNext.js +0 -0
  1594. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/slicedToArray.js +0 -0
  1595. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/superPropBase.js +0 -0
  1596. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/superPropGet.js +0 -0
  1597. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/superPropSet.js +0 -0
  1598. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/taggedTemplateLiteral.js +0 -0
  1599. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/taggedTemplateLiteralLoose.js +0 -0
  1600. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/tdz.js +0 -0
  1601. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/temporalRef.js +0 -0
  1602. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/temporalUndefined.js +0 -0
  1603. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/toArray.js +0 -0
  1604. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/toConsumableArray.js +0 -0
  1605. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/toPrimitive.js +0 -0
  1606. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/toPropertyKey.js +0 -0
  1607. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/toSetter.js +0 -0
  1608. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js +0 -0
  1609. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/typeof.js +0 -0
  1610. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/unsupportedIterableToArray.js +0 -0
  1611. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/usingCtx.js +0 -0
  1612. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/wrapAsyncGenerator.js +0 -0
  1613. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/wrapNativeSuper.js +0 -0
  1614. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/wrapRegExp.js +0 -0
  1615. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/writeOnlyError.js +0 -0
  1616. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/extends.js +0 -0
  1617. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/get.js +0 -0
  1618. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/getPrototypeOf.js +0 -0
  1619. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/identity.js +0 -0
  1620. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/importDeferProxy.js +0 -0
  1621. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/inherits.js +0 -0
  1622. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/inheritsLoose.js +0 -0
  1623. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/initializerDefineProperty.js +0 -0
  1624. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/initializerWarningHelper.js +0 -0
  1625. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/instanceof.js +0 -0
  1626. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/interopRequireDefault.js +0 -0
  1627. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/interopRequireWildcard.js +0 -0
  1628. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/isNativeFunction.js +0 -0
  1629. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/isNativeReflectConstruct.js +0 -0
  1630. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/iterableToArray.js +0 -0
  1631. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/iterableToArrayLimit.js +0 -0
  1632. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/jsx.js +0 -0
  1633. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/maybeArrayLike.js +0 -0
  1634. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/newArrowCheck.js +0 -0
  1635. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/nonIterableRest.js +0 -0
  1636. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/nonIterableSpread.js +0 -0
  1637. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/nullishReceiverError.js +0 -0
  1638. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/objectDestructuringEmpty.js +0 -0
  1639. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/objectSpread2.js +0 -0
  1640. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/objectWithoutProperties.js +0 -0
  1641. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/objectWithoutPropertiesLoose.js +0 -0
  1642. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/possibleConstructorReturn.js +0 -0
  1643. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/readOnlyError.js +0 -0
  1644. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regenerator.js +0 -0
  1645. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regeneratorAsync.js +0 -0
  1646. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regeneratorAsyncGen.js +0 -0
  1647. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regeneratorAsyncIterator.js +0 -0
  1648. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regeneratorDefine.js +0 -0
  1649. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regeneratorKeys.js +0 -0
  1650. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regeneratorValues.js +0 -0
  1651. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/set.js +0 -0
  1652. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/setFunctionName.js +0 -0
  1653. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/setPrototypeOf.js +0 -0
  1654. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/skipFirstGeneratorNext.js +0 -0
  1655. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/slicedToArray.js +0 -0
  1656. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/superPropBase.js +0 -0
  1657. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/superPropGet.js +0 -0
  1658. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/superPropSet.js +0 -0
  1659. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/taggedTemplateLiteral.js +0 -0
  1660. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/taggedTemplateLiteralLoose.js +0 -0
  1661. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/tdz.js +0 -0
  1662. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/temporalRef.js +0 -0
  1663. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/temporalUndefined.js +0 -0
  1664. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/toArray.js +0 -0
  1665. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/toConsumableArray.js +0 -0
  1666. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/toPrimitive.js +0 -0
  1667. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/toPropertyKey.js +0 -0
  1668. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/toSetter.js +0 -0
  1669. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/tsRewriteRelativeImportExtensions.js +0 -0
  1670. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/typeof.js +0 -0
  1671. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/unsupportedIterableToArray.js +0 -0
  1672. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/usingCtx.js +0 -0
  1673. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/wrapAsyncGenerator.js +0 -0
  1674. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/wrapNativeSuper.js +0 -0
  1675. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/wrapRegExp.js +0 -0
  1676. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/writeOnlyError.js +0 -0
  1677. /package/node_modules/{music-metadata/node_modules/@borewit → @borewit}/text-codec/LICENSE.txt +0 -0
  1678. /package/node_modules/{music-metadata/node_modules/@borewit → @borewit}/text-codec/README.md +0 -0
  1679. /package/node_modules/{music-metadata/node_modules/@borewit → @borewit}/text-codec/lib/index.d.ts +0 -0
  1680. /package/node_modules/{music-metadata/node_modules/@borewit → @borewit}/text-codec/lib/index.js +0 -0
  1681. /package/node_modules/{music-metadata/node_modules/@borewit → @borewit}/text-codec/package.json +0 -0
  1682. /package/node_modules/{music-metadata/node_modules/strtok3/lib/types.js → @openclaw/fs-safe/dist/containment.js} +0 -0
  1683. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/LICENSE +0 -0
  1684. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/README.md +0 -0
  1685. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/GzipHandler.d.ts +0 -0
  1686. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/GzipHandler.js +0 -0
  1687. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/ZipHandler.d.ts +0 -0
  1688. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/ZipHandler.js +0 -0
  1689. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/ZipToken.d.ts +0 -0
  1690. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/ZipToken.js +0 -0
  1691. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/index.d.ts +0 -0
  1692. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/index.js +0 -0
  1693. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/package.json +0 -0
  1694. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/token/README.md +0 -0
  1695. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/token/index.d.ts +0 -0
  1696. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/token/package.json +0 -0
  1697. /package/node_modules/{matrix-js-sdk/node_modules/@types → @types}/events/LICENSE +0 -0
  1698. /package/node_modules/{matrix-js-sdk/node_modules/@types → @types}/events/README.md +0 -0
  1699. /package/node_modules/{matrix-js-sdk/node_modules/@types → @types}/events/index.d.ts +0 -0
  1700. /package/node_modules/{matrix-js-sdk/node_modules/@types → @types}/events/package.json +0 -0
  1701. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/LICENSE +0 -0
  1702. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/README.md +0 -0
  1703. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/helpers.d.ts +0 -0
  1704. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/helpers.d.ts.map +0 -0
  1705. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/helpers.js +0 -0
  1706. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/helpers.js.map +0 -0
  1707. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/index.d.ts +0 -0
  1708. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/index.d.ts.map +0 -0
  1709. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/index.js +0 -0
  1710. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/index.js.map +0 -0
  1711. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/package.json +0 -0
  1712. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/.jshint +0 -0
  1713. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/.npmignore +0 -0
  1714. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/.travis.yml +0 -0
  1715. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/LICENSE +0 -0
  1716. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/README.md +0 -0
  1717. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/another-json.js +0 -0
  1718. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/package.json +0 -0
  1719. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/spec/another-json-spec.js +0 -0
  1720. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/LICENSE +0 -0
  1721. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/README.md +0 -0
  1722. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/lib/_colorize.js +0 -0
  1723. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/lib/argparse.d.ts +0 -0
  1724. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/lib/difflib.js +0 -0
  1725. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/lib/sub.js +0 -0
  1726. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/lib/textwrap.js +0 -0
  1727. /package/node_modules/{matrix-js-sdk/node_modules/base-x → base-x}/LICENSE.md +0 -0
  1728. /package/node_modules/{matrix-js-sdk/node_modules/base-x → base-x}/README.md +0 -0
  1729. /package/node_modules/{matrix-js-sdk/node_modules/base-x → base-x}/package.json +0 -0
  1730. /package/node_modules/{matrix-js-sdk/node_modules/base-x → base-x}/src/cjs/index.cjs +0 -0
  1731. /package/node_modules/{matrix-js-sdk/node_modules/base-x → base-x}/src/cjs/index.d.ts +0 -0
  1732. /package/node_modules/{matrix-js-sdk/node_modules/base-x → base-x}/src/esm/index.js +0 -0
  1733. /package/node_modules/{matrix-js-sdk/node_modules/bs58 → bs58}/LICENSE +0 -0
  1734. /package/node_modules/{matrix-js-sdk/node_modules/bs58 → bs58}/README.md +0 -0
  1735. /package/node_modules/{matrix-js-sdk/node_modules/bs58 → bs58}/package.json +0 -0
  1736. /package/node_modules/{matrix-js-sdk/node_modules/bs58 → bs58}/src/cjs/index.cjs +0 -0
  1737. /package/node_modules/{matrix-js-sdk/node_modules/bs58 → bs58}/src/cjs/index.d.ts +0 -0
  1738. /package/node_modules/{matrix-js-sdk/node_modules/bs58 → bs58}/src/esm/index.js +0 -0
  1739. /package/node_modules/{matrix-js-sdk/node_modules/content-type → content-type}/LICENSE +0 -0
  1740. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/LICENSE +0 -0
  1741. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/README.md +0 -0
  1742. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/package.json +0 -0
  1743. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/src/browser.js +0 -0
  1744. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/src/common.js +0 -0
  1745. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/src/index.js +0 -0
  1746. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/src/node.js +0 -0
  1747. /package/node_modules/{markdown-it/node_modules/entities → entities}/LICENSE +0 -0
  1748. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode-codepoint.d.ts +0 -0
  1749. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode-codepoint.d.ts.map +0 -0
  1750. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode-codepoint.js +0 -0
  1751. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode-codepoint.js.map +0 -0
  1752. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode.d.ts +0 -0
  1753. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode.d.ts.map +0 -0
  1754. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode.js +0 -0
  1755. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode.js.map +0 -0
  1756. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/encode.d.ts +0 -0
  1757. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/encode.d.ts.map +0 -0
  1758. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/encode.js +0 -0
  1759. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/encode.js.map +0 -0
  1760. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/escape.d.ts +0 -0
  1761. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/escape.d.ts.map +0 -0
  1762. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/escape.js +0 -0
  1763. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/escape.js.map +0 -0
  1764. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-html.d.ts +0 -0
  1765. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-html.d.ts.map +0 -0
  1766. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-html.js +0 -0
  1767. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-html.js.map +0 -0
  1768. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-xml.d.ts +0 -0
  1769. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-xml.d.ts.map +0 -0
  1770. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-xml.js +0 -0
  1771. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-xml.js.map +0 -0
  1772. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/encode-html.d.ts +0 -0
  1773. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/encode-html.d.ts.map +0 -0
  1774. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/encode-html.js +0 -0
  1775. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/encode-html.js.map +0 -0
  1776. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/index.d.ts +0 -0
  1777. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/index.d.ts.map +0 -0
  1778. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/index.js +0 -0
  1779. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/index.js.map +0 -0
  1780. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/bin-trie-flags.d.ts +0 -0
  1781. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/bin-trie-flags.d.ts.map +0 -0
  1782. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/bin-trie-flags.js +0 -0
  1783. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/bin-trie-flags.js.map +0 -0
  1784. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/decode-shared.d.ts +0 -0
  1785. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/decode-shared.d.ts.map +0 -0
  1786. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/decode-shared.js +0 -0
  1787. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/decode-shared.js.map +0 -0
  1788. /package/node_modules/{markdown-it/node_modules/entities → entities}/package.json +0 -0
  1789. /package/node_modules/{markdown-it/node_modules/entities → entities}/readme.md +0 -0
  1790. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/decode-codepoint.ts +0 -0
  1791. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/decode.ts +0 -0
  1792. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/encode.ts +0 -0
  1793. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/escape.ts +0 -0
  1794. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/generated/decode-data-html.ts +0 -0
  1795. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/generated/decode-data-xml.ts +0 -0
  1796. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/generated/encode-html.ts +0 -0
  1797. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/index.ts +0 -0
  1798. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/internal/bin-trie-flags.ts +0 -0
  1799. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/internal/decode-shared.ts +0 -0
  1800. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/.airtap.yml +0 -0
  1801. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/.github/FUNDING.yml +0 -0
  1802. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/.travis.yml +0 -0
  1803. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/History.md +0 -0
  1804. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/LICENSE +0 -0
  1805. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/Readme.md +0 -0
  1806. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/events.js +0 -0
  1807. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/package.json +0 -0
  1808. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/security.md +0 -0
  1809. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/add-listeners.js +0 -0
  1810. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/check-listener-leaks.js +0 -0
  1811. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/common.js +0 -0
  1812. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/errors.js +0 -0
  1813. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/events-list.js +0 -0
  1814. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/events-once.js +0 -0
  1815. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/index.js +0 -0
  1816. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/legacy-compat.js +0 -0
  1817. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/listener-count.js +0 -0
  1818. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/listeners-side-effects.js +0 -0
  1819. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/listeners.js +0 -0
  1820. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/max-listeners.js +0 -0
  1821. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/method-names.js +0 -0
  1822. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/modify-in-emit.js +0 -0
  1823. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/num-args.js +0 -0
  1824. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/once.js +0 -0
  1825. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/prepend.js +0 -0
  1826. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/remove-all-listeners.js +0 -0
  1827. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/remove-listeners.js +0 -0
  1828. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/set-max-listeners-side-effects.js +0 -0
  1829. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/special-event-names.js +0 -0
  1830. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/subclass.js +0 -0
  1831. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/symbols.js +0 -0
  1832. /package/node_modules/{matrix-js-sdk/node_modules/is-network-error → file-type}/license +0 -0
  1833. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/detectors/asf.js +0 -0
  1834. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/detectors/ebml.js +0 -0
  1835. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/detectors/png.js +0 -0
  1836. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/index.d.ts +0 -0
  1837. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/index.test-d.ts +0 -0
  1838. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/parser.js +0 -0
  1839. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/tokens.js +0 -0
  1840. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/LICENSE +0 -0
  1841. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/README.md +0 -0
  1842. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.d.ts +0 -0
  1843. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.d.ts.map +0 -0
  1844. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.js +0 -0
  1845. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.js.map +0 -0
  1846. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.d.ts +0 -0
  1847. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.d.ts.map +0 -0
  1848. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.js +0 -0
  1849. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.js.map +0 -0
  1850. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/package.json +0 -0
  1851. /package/node_modules/{music-metadata/node_modules/ieee754 → ieee754}/LICENSE +0 -0
  1852. /package/node_modules/{music-metadata/node_modules/ieee754 → ieee754}/README.md +0 -0
  1853. /package/node_modules/{music-metadata/node_modules/ieee754 → ieee754}/index.d.ts +0 -0
  1854. /package/node_modules/{music-metadata/node_modules/ieee754 → ieee754}/index.js +0 -0
  1855. /package/node_modules/{music-metadata/node_modules/ieee754 → ieee754}/package.json +0 -0
  1856. /package/node_modules/{matrix-js-sdk/node_modules/is-network-error → is-network-error}/index.d.ts +0 -0
  1857. /package/node_modules/{matrix-js-sdk/node_modules/is-network-error → is-network-error}/index.js +0 -0
  1858. /package/node_modules/{matrix-js-sdk/node_modules/p-retry → is-network-error}/license +0 -0
  1859. /package/node_modules/{matrix-js-sdk/node_modules/is-network-error → is-network-error}/package.json +0 -0
  1860. /package/node_modules/{matrix-js-sdk/node_modules/is-network-error → is-network-error}/readme.md +0 -0
  1861. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/LICENSE +0 -0
  1862. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/README.md +0 -0
  1863. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/build/index.cjs.js +0 -0
  1864. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/build/index.cjs.js.map +0 -0
  1865. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/build/index.d.ts +0 -0
  1866. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/build/index.mjs +0 -0
  1867. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/build/index.mjs.map +0 -0
  1868. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/package.json +0 -0
  1869. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/.editorconfig +0 -0
  1870. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/CONTRIBUTING.md +0 -0
  1871. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/Gruntfile.js +0 -0
  1872. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/LICENSE-MIT +0 -0
  1873. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/README.md +0 -0
  1874. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/_config.yml +0 -0
  1875. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/bower.json +0 -0
  1876. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/demo/index.html +0 -0
  1877. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/demo/script.js +0 -0
  1878. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/demo/styles.css +0 -0
  1879. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/dist/loglevel.js +0 -0
  1880. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/dist/loglevel.min.js +0 -0
  1881. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/index.d.ts +0 -0
  1882. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/lib/loglevel.js +0 -0
  1883. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/package.json +0 -0
  1884. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/LICENSE +0 -0
  1885. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/README.md +0 -0
  1886. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/ExtensibleEvents.d.ts +0 -0
  1887. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/ExtensibleEvents.js +0 -0
  1888. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/IPartialEvent.d.ts +0 -0
  1889. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/IPartialEvent.js +0 -0
  1890. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/InvalidEventError.d.ts +0 -0
  1891. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/InvalidEventError.js +0 -0
  1892. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/NamespacedMap.d.ts +0 -0
  1893. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/NamespacedMap.js +0 -0
  1894. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/NamespacedValue.d.ts +0 -0
  1895. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/NamespacedValue.js +0 -0
  1896. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/EmoteEvent.d.ts +0 -0
  1897. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/EmoteEvent.js +0 -0
  1898. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/ExtensibleEvent.d.ts +0 -0
  1899. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/ExtensibleEvent.js +0 -0
  1900. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/MessageEvent.d.ts +0 -0
  1901. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/MessageEvent.js +0 -0
  1902. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/NoticeEvent.d.ts +0 -0
  1903. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/NoticeEvent.js +0 -0
  1904. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/PollEndEvent.d.ts +0 -0
  1905. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/PollEndEvent.js +0 -0
  1906. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/PollResponseEvent.d.ts +0 -0
  1907. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/PollResponseEvent.js +0 -0
  1908. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/PollStartEvent.d.ts +0 -0
  1909. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/PollStartEvent.js +0 -0
  1910. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/message_types.d.ts +0 -0
  1911. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/message_types.js +0 -0
  1912. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/poll_types.d.ts +0 -0
  1913. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/poll_types.js +0 -0
  1914. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/relationship_types.d.ts +0 -0
  1915. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/relationship_types.js +0 -0
  1916. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/index.d.ts +0 -0
  1917. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/index.js +0 -0
  1918. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/interpreters/legacy/MRoomMessage.d.ts +0 -0
  1919. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/interpreters/legacy/MRoomMessage.js +0 -0
  1920. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/interpreters/modern/MMessage.d.ts +0 -0
  1921. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/interpreters/modern/MMessage.js +0 -0
  1922. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/interpreters/modern/MPoll.d.ts +0 -0
  1923. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/interpreters/modern/MPoll.js +0 -0
  1924. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/types.d.ts +0 -0
  1925. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/types.js +0 -0
  1926. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/utility/MessageMatchers.d.ts +0 -0
  1927. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/utility/MessageMatchers.js +0 -0
  1928. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/utility/events.d.ts +0 -0
  1929. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/utility/events.js +0 -0
  1930. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/package.json +0 -0
  1931. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/LICENSE +0 -0
  1932. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/README.md +0 -0
  1933. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/dist/api.js +0 -0
  1934. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/dist/api.min.js +0 -0
  1935. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/ClientWidgetApi.d.ts +0 -0
  1936. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/ClientWidgetApi.js +0 -0
  1937. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/ClientWidgetApi.js.map +0 -0
  1938. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/Symbols.d.ts +0 -0
  1939. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/Symbols.js +0 -0
  1940. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/Symbols.js.map +0 -0
  1941. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/WidgetApi.d.ts +0 -0
  1942. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/WidgetApi.js +0 -0
  1943. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/WidgetApi.js.map +0 -0
  1944. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/driver/WidgetDriver.d.ts +0 -0
  1945. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/driver/WidgetDriver.js +0 -0
  1946. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/driver/WidgetDriver.js.map +0 -0
  1947. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/index.d.ts +0 -0
  1948. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/index.js +0 -0
  1949. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/index.js.map +0 -0
  1950. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ApiVersion.d.ts +0 -0
  1951. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ApiVersion.js +0 -0
  1952. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ApiVersion.js.map +0 -0
  1953. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/Capabilities.d.ts +0 -0
  1954. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/Capabilities.js +0 -0
  1955. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/Capabilities.js.map +0 -0
  1956. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/CapabilitiesAction.d.ts +0 -0
  1957. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/CapabilitiesAction.js +0 -0
  1958. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/CapabilitiesAction.js.map +0 -0
  1959. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ContentLoadedAction.d.ts +0 -0
  1960. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ContentLoadedAction.js +0 -0
  1961. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ContentLoadedAction.js.map +0 -0
  1962. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/DownloadFileAction.d.ts +0 -0
  1963. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/DownloadFileAction.js +0 -0
  1964. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/DownloadFileAction.js.map +0 -0
  1965. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/GetMediaConfigAction.d.ts +0 -0
  1966. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/GetMediaConfigAction.js +0 -0
  1967. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/GetMediaConfigAction.js.map +0 -0
  1968. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/GetOpenIDAction.d.ts +0 -0
  1969. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/GetOpenIDAction.js +0 -0
  1970. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/GetOpenIDAction.js.map +0 -0
  1971. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ICustomWidgetData.d.ts +0 -0
  1972. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ICustomWidgetData.js +0 -0
  1973. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ICustomWidgetData.js.map +0 -0
  1974. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IJitsiWidgetData.d.ts +0 -0
  1975. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IJitsiWidgetData.js +0 -0
  1976. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IJitsiWidgetData.js.map +0 -0
  1977. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IRoomAccountData.d.ts +0 -0
  1978. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IRoomAccountData.js +0 -0
  1979. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IRoomAccountData.js.map +0 -0
  1980. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IRoomEvent.d.ts +0 -0
  1981. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IRoomEvent.js +0 -0
  1982. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IRoomEvent.js.map +0 -0
  1983. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IStickerpickerWidgetData.d.ts +0 -0
  1984. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IStickerpickerWidgetData.js +0 -0
  1985. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IStickerpickerWidgetData.js.map +0 -0
  1986. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IToDeviceMessage.d.ts +0 -0
  1987. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IToDeviceMessage.js +0 -0
  1988. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IToDeviceMessage.js.map +0 -0
  1989. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidget.d.ts +0 -0
  1990. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidget.js +0 -0
  1991. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidget.js.map +0 -0
  1992. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiErrorResponse.d.ts +0 -0
  1993. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiErrorResponse.js +0 -0
  1994. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiErrorResponse.js.map +0 -0
  1995. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiRequest.d.ts +0 -0
  1996. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiRequest.js +0 -0
  1997. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiRequest.js.map +0 -0
  1998. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiResponse.d.ts +0 -0
  1999. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiResponse.js +0 -0
  2000. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiResponse.js.map +0 -0
  2001. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/LanguageChangeAction.d.ts +0 -0
  2002. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/LanguageChangeAction.js +0 -0
  2003. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/LanguageChangeAction.js.map +0 -0
  2004. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ModalButtonKind.d.ts +0 -0
  2005. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ModalButtonKind.js +0 -0
  2006. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ModalButtonKind.js.map +0 -0
  2007. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ModalWidgetActions.d.ts +0 -0
  2008. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ModalWidgetActions.js +0 -0
  2009. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ModalWidgetActions.js.map +0 -0
  2010. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/NavigateAction.d.ts +0 -0
  2011. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/NavigateAction.js +0 -0
  2012. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/NavigateAction.js.map +0 -0
  2013. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/OpenIDCredentialsAction.d.ts +0 -0
  2014. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/OpenIDCredentialsAction.js +0 -0
  2015. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/OpenIDCredentialsAction.js.map +0 -0
  2016. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadEventAction.d.ts +0 -0
  2017. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadEventAction.js +0 -0
  2018. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadEventAction.js.map +0 -0
  2019. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadRelationsAction.d.ts +0 -0
  2020. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadRelationsAction.js +0 -0
  2021. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadRelationsAction.js.map +0 -0
  2022. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadRoomAccountDataAction.d.ts +0 -0
  2023. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadRoomAccountDataAction.js +0 -0
  2024. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadRoomAccountDataAction.js.map +0 -0
  2025. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/RtcLivekitActions.d.ts +0 -0
  2026. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/RtcLivekitActions.js +0 -0
  2027. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/RtcLivekitActions.js.map +0 -0
  2028. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/RtcTransportsAction.d.ts +0 -0
  2029. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/RtcTransportsAction.js +0 -0
  2030. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/RtcTransportsAction.js.map +0 -0
  2031. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ScreenshotAction.d.ts +0 -0
  2032. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ScreenshotAction.js +0 -0
  2033. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ScreenshotAction.js.map +0 -0
  2034. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SendEventAction.d.ts +0 -0
  2035. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SendEventAction.js +0 -0
  2036. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SendEventAction.js.map +0 -0
  2037. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SendToDeviceAction.d.ts +0 -0
  2038. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SendToDeviceAction.js +0 -0
  2039. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SendToDeviceAction.js.map +0 -0
  2040. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SetModalButtonEnabledAction.d.ts +0 -0
  2041. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SetModalButtonEnabledAction.js +0 -0
  2042. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SetModalButtonEnabledAction.js.map +0 -0
  2043. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/StickerAction.d.ts +0 -0
  2044. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/StickerAction.js +0 -0
  2045. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/StickerAction.js.map +0 -0
  2046. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/StickyAction.d.ts +0 -0
  2047. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/StickyAction.js +0 -0
  2048. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/StickyAction.js.map +0 -0
  2049. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SupportedVersionsAction.d.ts +0 -0
  2050. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SupportedVersionsAction.js +0 -0
  2051. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SupportedVersionsAction.js.map +0 -0
  2052. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ThemeChangeAction.d.ts +0 -0
  2053. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ThemeChangeAction.js +0 -0
  2054. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ThemeChangeAction.js.map +0 -0
  2055. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/TurnServerActions.d.ts +0 -0
  2056. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/TurnServerActions.js +0 -0
  2057. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/TurnServerActions.js.map +0 -0
  2058. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UpdateDelayedEventAction.d.ts +0 -0
  2059. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UpdateDelayedEventAction.js +0 -0
  2060. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UpdateDelayedEventAction.js.map +0 -0
  2061. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UpdateStateAction.d.ts +0 -0
  2062. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UpdateStateAction.js +0 -0
  2063. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UpdateStateAction.js.map +0 -0
  2064. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UploadFileAction.d.ts +0 -0
  2065. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UploadFileAction.js +0 -0
  2066. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UploadFileAction.js.map +0 -0
  2067. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UserDirectorySearchAction.d.ts +0 -0
  2068. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UserDirectorySearchAction.js +0 -0
  2069. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UserDirectorySearchAction.js.map +0 -0
  2070. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/VisibilityAction.d.ts +0 -0
  2071. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/VisibilityAction.js +0 -0
  2072. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/VisibilityAction.js.map +0 -0
  2073. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetApiAction.d.ts +0 -0
  2074. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetApiAction.js +0 -0
  2075. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetApiAction.js.map +0 -0
  2076. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetApiDirection.d.ts +0 -0
  2077. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetApiDirection.js +0 -0
  2078. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetApiDirection.js.map +0 -0
  2079. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetConfigAction.d.ts +0 -0
  2080. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetConfigAction.js +0 -0
  2081. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetConfigAction.js.map +0 -0
  2082. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetKind.d.ts +0 -0
  2083. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetKind.js +0 -0
  2084. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetKind.js.map +0 -0
  2085. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetType.d.ts +0 -0
  2086. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetType.js +0 -0
  2087. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetType.js.map +0 -0
  2088. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/Widget.d.ts +0 -0
  2089. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/Widget.js +0 -0
  2090. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/Widget.js.map +0 -0
  2091. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/WidgetEventCapability.d.ts +0 -0
  2092. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/WidgetEventCapability.js +0 -0
  2093. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/WidgetEventCapability.js.map +0 -0
  2094. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/WidgetParser.d.ts +0 -0
  2095. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/WidgetParser.js +0 -0
  2096. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/WidgetParser.js.map +0 -0
  2097. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/validation/url.d.ts +0 -0
  2098. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/validation/url.js +0 -0
  2099. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/validation/url.js.map +0 -0
  2100. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/validation/utils.d.ts +0 -0
  2101. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/validation/utils.js +0 -0
  2102. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/validation/utils.js.map +0 -0
  2103. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/templating/url-template.d.ts +0 -0
  2104. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/templating/url-template.js +0 -0
  2105. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/templating/url-template.js.map +0 -0
  2106. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/transport/ITransport.d.ts +0 -0
  2107. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/transport/ITransport.js +0 -0
  2108. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/transport/ITransport.js.map +0 -0
  2109. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/transport/PostmessageTransport.d.ts +0 -0
  2110. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/transport/PostmessageTransport.js +0 -0
  2111. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/transport/PostmessageTransport.js.map +0 -0
  2112. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/util/SimpleObservable.d.ts +0 -0
  2113. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/util/SimpleObservable.js +0 -0
  2114. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/util/SimpleObservable.js.map +0 -0
  2115. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/package.json +0 -0
  2116. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/ClientWidgetApi.ts +0 -0
  2117. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/Symbols.ts +0 -0
  2118. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/WidgetApi.ts +0 -0
  2119. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/driver/WidgetDriver.ts +0 -0
  2120. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/index.ts +0 -0
  2121. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ApiVersion.ts +0 -0
  2122. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/Capabilities.ts +0 -0
  2123. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/CapabilitiesAction.ts +0 -0
  2124. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ContentLoadedAction.ts +0 -0
  2125. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/DownloadFileAction.ts +0 -0
  2126. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/GetMediaConfigAction.ts +0 -0
  2127. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/GetOpenIDAction.ts +0 -0
  2128. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ICustomWidgetData.ts +0 -0
  2129. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IJitsiWidgetData.ts +0 -0
  2130. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IRoomAccountData.ts +0 -0
  2131. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IRoomEvent.ts +0 -0
  2132. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IStickerpickerWidgetData.ts +0 -0
  2133. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IToDeviceMessage.ts +0 -0
  2134. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IWidget.ts +0 -0
  2135. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IWidgetApiErrorResponse.ts +0 -0
  2136. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IWidgetApiRequest.ts +0 -0
  2137. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IWidgetApiResponse.ts +0 -0
  2138. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/LanguageChangeAction.ts +0 -0
  2139. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ModalButtonKind.ts +0 -0
  2140. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ModalWidgetActions.ts +0 -0
  2141. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/NavigateAction.ts +0 -0
  2142. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/OpenIDCredentialsAction.ts +0 -0
  2143. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ReadEventAction.ts +0 -0
  2144. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ReadRelationsAction.ts +0 -0
  2145. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ReadRoomAccountDataAction.ts +0 -0
  2146. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/RtcLivekitActions.ts +0 -0
  2147. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/RtcTransportsAction.ts +0 -0
  2148. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ScreenshotAction.ts +0 -0
  2149. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/SendEventAction.ts +0 -0
  2150. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/SendToDeviceAction.ts +0 -0
  2151. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/SetModalButtonEnabledAction.ts +0 -0
  2152. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/StickerAction.ts +0 -0
  2153. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/StickyAction.ts +0 -0
  2154. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/SupportedVersionsAction.ts +0 -0
  2155. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ThemeChangeAction.ts +0 -0
  2156. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/TurnServerActions.ts +0 -0
  2157. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/UpdateDelayedEventAction.ts +0 -0
  2158. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/UpdateStateAction.ts +0 -0
  2159. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/UploadFileAction.ts +0 -0
  2160. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/UserDirectorySearchAction.ts +0 -0
  2161. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/VisibilityAction.ts +0 -0
  2162. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/WidgetApiAction.ts +0 -0
  2163. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/WidgetApiDirection.ts +0 -0
  2164. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/WidgetConfigAction.ts +0 -0
  2165. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/WidgetKind.ts +0 -0
  2166. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/WidgetType.ts +0 -0
  2167. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/models/Widget.ts +0 -0
  2168. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/models/WidgetEventCapability.ts +0 -0
  2169. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/models/WidgetParser.ts +0 -0
  2170. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/models/validation/url.ts +0 -0
  2171. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/models/validation/utils.ts +0 -0
  2172. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/templating/url-template.ts +0 -0
  2173. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/transport/ITransport.ts +0 -0
  2174. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/transport/PostmessageTransport.ts +0 -0
  2175. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/util/SimpleObservable.ts +0 -0
  2176. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/LICENSE +0 -0
  2177. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/README.md +0 -0
  2178. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/build/index.cjs.js +0 -0
  2179. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/index.mjs +0 -0
  2180. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/lib/decode.mjs +0 -0
  2181. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/lib/encode.mjs +0 -0
  2182. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/lib/format.mjs +0 -0
  2183. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/lib/index.d.ts +0 -0
  2184. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/lib/parse.mjs +0 -0
  2185. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/package.json +0 -0
  2186. /package/node_modules/{music-metadata/node_modules/media-typer → media-typer}/LICENSE +0 -0
  2187. /package/node_modules/{music-metadata/node_modules/media-typer → media-typer}/README.md +0 -0
  2188. /package/node_modules/{music-metadata/node_modules/media-typer → media-typer}/dist/index.d.ts +0 -0
  2189. /package/node_modules/{music-metadata/node_modules/media-typer → media-typer}/dist/index.js +0 -0
  2190. /package/node_modules/{music-metadata/node_modules/media-typer → media-typer}/dist/index.js.map +0 -0
  2191. /package/node_modules/{music-metadata/node_modules/media-typer → media-typer}/package.json +0 -0
  2192. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/ms → ms}/index.js +0 -0
  2193. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/ms → ms}/license.md +0 -0
  2194. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/ms → ms}/package.json +0 -0
  2195. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/ms → ms}/readme.md +0 -0
  2196. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/LICENSE +0 -0
  2197. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/README.md +0 -0
  2198. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/bin/helpers.js +0 -0
  2199. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/bin/ndh +0 -0
  2200. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/dist/index.js +0 -0
  2201. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/package.json +0 -0
  2202. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/types/index.d.ts +0 -0
  2203. /package/node_modules/{matrix-js-sdk/node_modules/p-retry → p-retry}/index.d.ts +0 -0
  2204. /package/node_modules/{matrix-js-sdk/node_modules/p-retry → p-retry}/index.js +0 -0
  2205. /package/node_modules/{music-metadata/node_modules/file-type → p-retry}/license +0 -0
  2206. /package/node_modules/{matrix-js-sdk/node_modules/p-retry → p-retry}/package.json +0 -0
  2207. /package/node_modules/{matrix-js-sdk/node_modules/p-retry → p-retry}/readme.md +0 -0
  2208. /package/node_modules/{markdown-it/node_modules/punycode.js → punycode.js}/LICENSE-MIT.txt +0 -0
  2209. /package/node_modules/{markdown-it/node_modules/punycode.js → punycode.js}/README.md +0 -0
  2210. /package/node_modules/{markdown-it/node_modules/punycode.js → punycode.js}/package.json +0 -0
  2211. /package/node_modules/{markdown-it/node_modules/punycode.js → punycode.js}/punycode.es6.js +0 -0
  2212. /package/node_modules/{markdown-it/node_modules/punycode.js → punycode.js}/punycode.js +0 -0
  2213. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/.eslintrc.js +0 -0
  2214. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/.github/FUNDING.yml +0 -0
  2215. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/.github/codecov.yml +0 -0
  2216. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/.github/dependabot.yml +0 -0
  2217. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/.github/workflows/ci.yml +0 -0
  2218. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/CHANGELOG.md +0 -0
  2219. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/LICENSE +0 -0
  2220. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/README.md +0 -0
  2221. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/checker.js +0 -0
  2222. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/lib/grammar.js +0 -0
  2223. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/lib/index.js +0 -0
  2224. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/lib/parser.js +0 -0
  2225. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/lib/writer.js +0 -0
  2226. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/package.json +0 -0
  2227. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/LICENSE.txt +0 -0
  2228. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/README.md +0 -0
  2229. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/AbstractTokenizer.d.ts +0 -0
  2230. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/AbstractTokenizer.js +0 -0
  2231. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/BlobTokenizer.d.ts +0 -0
  2232. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/BlobTokenizer.js +0 -0
  2233. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/BufferTokenizer.d.ts +0 -0
  2234. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/BufferTokenizer.js +0 -0
  2235. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/FileTokenizer.d.ts +0 -0
  2236. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/FileTokenizer.js +0 -0
  2237. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/ReadStreamTokenizer.d.ts +0 -0
  2238. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/ReadStreamTokenizer.js +0 -0
  2239. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/core.d.ts +0 -0
  2240. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/core.js +0 -0
  2241. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/index.d.ts +0 -0
  2242. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/index.js +0 -0
  2243. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/AbstractStreamReader.d.ts +0 -0
  2244. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/AbstractStreamReader.js +0 -0
  2245. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/Deferred.d.ts +0 -0
  2246. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/Deferred.js +0 -0
  2247. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/Errors.d.ts +0 -0
  2248. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/Errors.js +0 -0
  2249. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/StreamReader.d.ts +0 -0
  2250. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/StreamReader.js +0 -0
  2251. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamByobReader.d.ts +0 -0
  2252. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamByobReader.js +0 -0
  2253. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamDefaultReader.d.ts +0 -0
  2254. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamDefaultReader.js +0 -0
  2255. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamReader.d.ts +0 -0
  2256. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamReader.js +0 -0
  2257. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamReaderFactory.d.ts +0 -0
  2258. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamReaderFactory.js +0 -0
  2259. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/index.d.ts +0 -0
  2260. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/index.js +0 -0
  2261. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/types.d.ts +0 -0
  2262. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/package.json +0 -0
  2263. /package/node_modules/{music-metadata/node_modules/token-types → token-types}/LICENSE.txt +0 -0
  2264. /package/node_modules/{music-metadata/node_modules/token-types → token-types}/README.md +0 -0
  2265. /package/node_modules/{music-metadata/node_modules/token-types → token-types}/lib/index.d.ts +0 -0
  2266. /package/node_modules/{music-metadata/node_modules/token-types → token-types}/lib/index.js +0 -0
  2267. /package/node_modules/{music-metadata/node_modules/token-types → token-types}/package.json +0 -0
  2268. /package/node_modules/typebox/build/guard/{string.d.mts → unicode/unicode_segment.d.mts} +0 -0
  2269. /package/node_modules/{markdown-it/node_modules/uc.micro → uc.micro}/LICENSE.txt +0 -0
  2270. /package/node_modules/{markdown-it/node_modules/uc.micro → uc.micro}/README.md +0 -0
  2271. /package/node_modules/{markdown-it/node_modules/uc.micro → uc.micro}/build/index.cjs.js +0 -0
  2272. /package/node_modules/{markdown-it/node_modules/uc.micro → uc.micro}/build/index.d.ts +0 -0
  2273. /package/node_modules/{markdown-it/node_modules/uc.micro → uc.micro}/build/index.mjs +0 -0
  2274. /package/node_modules/{markdown-it/node_modules/uc.micro → uc.micro}/package.json +0 -0
  2275. /package/node_modules/{music-metadata/node_modules/uint8array-extras → uint8array-extras}/index.d.ts +0 -0
  2276. /package/node_modules/{music-metadata/node_modules/uint8array-extras → uint8array-extras}/index.js +0 -0
  2277. /package/node_modules/{music-metadata/node_modules/uint8array-extras → uint8array-extras}/license +0 -0
  2278. /package/node_modules/{music-metadata/node_modules/uint8array-extras → uint8array-extras}/package.json +0 -0
  2279. /package/node_modules/{music-metadata/node_modules/uint8array-extras → uint8array-extras}/readme.md +0 -0
  2280. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/CHANGELOG.md +0 -0
  2281. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/LICENSE +0 -0
  2282. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/README.md +0 -0
  2283. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/data.json +0 -0
  2284. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/index.d.ts +0 -0
  2285. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/index.js +0 -0
  2286. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/package.json +0 -0
  2287. /package/node_modules/{music-metadata/node_modules/win-guid → win-guid}/LICENSE.txt +0 -0
  2288. /package/node_modules/{music-metadata/node_modules/win-guid → win-guid}/README.md +0 -0
  2289. /package/node_modules/{music-metadata/node_modules/win-guid → win-guid}/lib/guid.d.ts +0 -0
  2290. /package/node_modules/{music-metadata/node_modules/win-guid → win-guid}/lib/guid.js +0 -0
  2291. /package/node_modules/{music-metadata/node_modules/win-guid → win-guid}/package.json +0 -0
@@ -1,4650 +0,0 @@
1
- import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
2
- import { a as resolveMatrixAccountConfig, i as resolveMatrixAccountAllowlistConfig } from "./account-config-CRsKoMqJ.mjs";
3
- import { n as resolveConfiguredMatrixBotUserIds } from "./accounts-BF5hyc-1.mjs";
4
- import { _ as toLocationContext, a as resolveMatrixRoomConfig, c as canonicalizeAllowlistWithResolvedIds, d as formatLocationText, f as getAgentScopedMediaLocalRoots, g as summarizeMapping, h as patchAllowlistUsersInConfigEntries, i as resolveMatrixThreadRouting, l as createReplyPrefixOptions, m as logTypingFailure, n as resolveMatrixStoredSessionMeta, o as addAllowlistUserEntriesFromConfigEntry, p as logInboundDrop, r as resolveMatrixInboundRoute, s as buildAllowlistResolutionSummary, u as createTypingCallbacks } from "./channel-q6TBKEiG.mjs";
5
- import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./channel.setup-DZQ5rf9k.mjs";
6
- import { n as isMatrixRoomId, t as isMatrixQualifiedUserId } from "./target-ids-Nwx7cMVE.mjs";
7
- import { a as MATRIX_REACTION_EVENT_TYPE } from "./send-currentness-BrGXL7b8.mjs";
8
- import { c as isStrictDirectMembership, f as resolveMatrixReplyToEventId, h as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY, i as promoteMatrixDirectRoomCandidate, p as resolveMatrixThreadRootId, s as hasDirectMatrixMemberFlag, u as readJoinedMatrixMembers } from "./direct-management-B2Bno2xL.mjs";
9
- import { S as parsePollStartContent, _ as formatPollAsText, b as isPollStartType, c as formatMatrixMediaTooLargeText, d as isLikelyBareFilename, l as formatMatrixMediaUnavailableText, p as resolveMatrixReplacementContent, r as sendMessageMatrix, u as formatMatrixMessageText, y as isPollEventType } from "./send-h0gZ_-qk.mjs";
10
- import { t as createMatrixThreadBindingManager } from "./thread-bindings-Hy96ujd3.mjs";
11
- import { l as fetchMatrixPollSnapshot, r as readMatrixMessages } from "./messages-SW0NPYnR.mjs";
12
- import { c as createMatrixMonitorTaskRunner, d as resolveMatrixAuthContext, l as backfillMatrixAuthDeviceIdAfterStartup, o as isMatrixStartupAbortError, r as acquireSharedMatrixClient, s as throwIfMatrixStartupAborted, u as resolveMatrixAuth } from "./client-DsJUnWlV.mjs";
13
- import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-BJjo-iw5.mjs";
14
- import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-DRWtSUe-.mjs";
15
- import { t as resolveMatrixTargets } from "./resolve-targets-drjgAdIe.mjs";
16
- import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-DYEbeYj-.mjs";
17
- import { createMatrixInboundEventDeduper } from "./inbound-dedupe-BSlv35xl.mjs";
18
- import { a as isMatrixAccessTokenInvalidatedError, d as isMatrixDisconnectedSyncState, f as isMatrixReadySyncState, p as isMatrixTerminalSyncState } from "./client-support-Bn9Bk0-H.mjs";
19
- import { i as setBoundedMap, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-DHd1j3qM.mjs";
20
- import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
21
- import { createChannelProgressDraftCompositor, createPreviewMessageReceipt, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, resolveChannelStreamingBlockEnabled, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
22
- import { normalizeLowercaseStringOrEmpty, normalizeNullableString, normalizeOptionalString, normalizeStringifiedEntries, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
23
- import { stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
24
- import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
25
- import { extractErrorCode, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
26
- import { isFutureDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
27
- import { resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
28
- import { createAcceptedChannelDeliveryResult, createChannelInboundEnvelopeBuilder, createChannelPartialDeliveryError, hasFinalInboundReplyDispatch, isChannelPartialDeliveryError, resolveInboundMentionDecision, resolveInboundReplyDispatchCounts, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
29
- import { getSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
30
- import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
31
- import { escapeRegExp, sliceUtf16Safe, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
32
- import { buildTtsSupplementMediaPayload, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
33
- import { format } from "node:util";
34
- import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
35
- import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
36
- import { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
37
- import { resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAgeMsForChannel } from "openclaw/plugin-sdk/thread-bindings-runtime";
38
- import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
39
- import { reportChannelRoomJoin } from "openclaw/plugin-sdk/channel-join-intro-runtime";
40
- import { createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
41
- import { resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
42
- import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
43
- import { evaluateSupplementalContextVisibility, resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
44
- import { resolveAckReaction } from "openclaw/plugin-sdk/channel-feedback";
45
- import { createChannelPreflightAudio, formatAudioTranscriptForAgent } from "openclaw/plugin-sdk/media-understanding-runtime";
46
- import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
47
- import { buildInboundHistoryFromEntries } from "openclaw/plugin-sdk/reply-history";
48
- import { decodeHtmlEntities } from "openclaw/plugin-sdk/html-entity-runtime";
49
- import { channelBlockedPatch, channelReadyPatch, channelStoppedPatch, createTransportActivityStatusPatch } from "openclaw/plugin-sdk/gateway-runtime";
50
- //#region extensions/matrix/src/matrix/monitor/auto-join.ts
51
- function registerMatrixAutoJoin(params) {
52
- const { client, accountConfig, runtime } = params;
53
- const core = getMatrixRuntime();
54
- const logVerbose = (message) => {
55
- if (!core.logging.shouldLogVerbose()) return;
56
- runtime.log?.(message);
57
- };
58
- const autoJoin = accountConfig.autoJoin ?? "off";
59
- const rawAllowlist = normalizeStringifiedEntries(accountConfig.autoJoinAllowlist ?? []);
60
- const autoJoinAllowlist = new Set(rawAllowlist);
61
- const allowedRoomIds = new Set(rawAllowlist.filter((entry) => entry.startsWith("!")));
62
- const allowedAliases = rawAllowlist.filter((entry) => entry.startsWith("#"));
63
- const resolvedAliasRoomIds = /* @__PURE__ */ new Map();
64
- if (autoJoin === "off") return () => {};
65
- if (autoJoin === "always") logVerbose("matrix: auto-join enabled for all invites");
66
- else logVerbose("matrix: auto-join enabled for allowlist invites");
67
- const resolveAllowedAliasRoomId = async (alias) => {
68
- if (resolvedAliasRoomIds.has(alias)) return resolvedAliasRoomIds.get(alias) ?? null;
69
- const resolved = await params.client.resolveRoom(alias);
70
- if (resolved) resolvedAliasRoomIds.set(alias, resolved);
71
- return resolved;
72
- };
73
- const resolveAllowedAliasRoomIds = async () => {
74
- return (await Promise.all(allowedAliases.map(async (alias) => {
75
- try {
76
- return await resolveAllowedAliasRoomId(alias);
77
- } catch (err) {
78
- runtime.error?.(`matrix: failed resolving allowlisted alias ${alias}: ${String(err)}`);
79
- return null;
80
- }
81
- }))).filter((roomId) => Boolean(roomId));
82
- };
83
- const onInvite = (roomId, _inviteEvent) => {
84
- params.runDetachedTask(`auto-join invite handler room=${roomId}`, async () => {
85
- if (autoJoin === "allowlist") {
86
- const allowedAliasRoomIds = await resolveAllowedAliasRoomIds();
87
- if (!(autoJoinAllowlist.has("*") || allowedRoomIds.has(roomId) || allowedAliasRoomIds.some((resolvedRoomId) => resolvedRoomId === roomId))) {
88
- logVerbose(`matrix: invite ignored (not in allowlist) room=${roomId}`);
89
- return;
90
- }
91
- }
92
- try {
93
- await client.joinRoom(roomId);
94
- logVerbose(`matrix: joined room ${roomId}`);
95
- } catch (err) {
96
- runtime.error?.(`matrix: failed to join room ${roomId}: ${String(err)}`);
97
- }
98
- });
99
- };
100
- client.on("room.invite", onInvite);
101
- return () => {
102
- client.off("room.invite", onInvite);
103
- };
104
- }
105
- //#endregion
106
- //#region extensions/matrix/src/matrix/monitor/config.ts
107
- function normalizeMatrixUserLookupEntry(raw) {
108
- return raw.replace(/^matrix:/i, "").replace(/^user:/i, "").trim();
109
- }
110
- function normalizeMatrixRoomLookupEntry(raw) {
111
- return raw.replace(/^matrix:/i, "").replace(/^(room|channel):/i, "").trim();
112
- }
113
- function filterResolvedMatrixAllowlistEntries(entries) {
114
- return entries.filter((entry) => {
115
- const trimmed = entry.trim();
116
- if (!trimmed) return false;
117
- if (trimmed === "*") return true;
118
- return isMatrixQualifiedUserId(normalizeMatrixUserLookupEntry(trimmed));
119
- });
120
- }
121
- function filterFailClosedMatrixAllowlistEntries(entries) {
122
- return entries.filter((entry) => entry.trim().length > 0);
123
- }
124
- function listResolvedMatrixAllowlistEntries(params) {
125
- const resolvedEntries = [];
126
- const seen = /* @__PURE__ */ new Set();
127
- for (const entry of params.entries) {
128
- const input = String(entry).trim();
129
- if (!input || seen.has(input)) continue;
130
- seen.add(input);
131
- const resolved = params.resolvedMap.get(input);
132
- if (!resolved?.resolved || !resolved.id) continue;
133
- const id = normalizeMatrixUserId(resolved.id);
134
- if (isMatrixQualifiedUserId(id)) resolvedEntries.push({
135
- input,
136
- id
137
- });
138
- }
139
- return resolvedEntries;
140
- }
141
- function normalizeConfiguredMatrixAllowlistEntries(entries) {
142
- const normalized = [];
143
- for (const entry of entries ?? []) {
144
- const trimmed = String(entry).trim();
145
- if (trimmed) normalized.push(trimmed);
146
- }
147
- return normalized;
148
- }
149
- function isMatrixDangerousNameMatchingEnabled(params) {
150
- return isDangerousNameMatchingEnabled(resolveMatrixAccountConfig({
151
- cfg: params.cfg,
152
- accountId: params.accountId
153
- }));
154
- }
155
- function addUniqueMatrixAllowlistEntry(params) {
156
- const trimmed = params.entry.trim();
157
- if (!trimmed) return;
158
- const key = normalizeMatrixUserId(trimmed);
159
- if (params.seen.has(key)) return;
160
- params.seen.add(key);
161
- params.entries.push(trimmed);
162
- }
163
- function resolveStableMatrixMonitorUserEntries(entries) {
164
- const directMatches = [];
165
- for (const entry of entries) {
166
- const input = String(entry).trim();
167
- if (!input) continue;
168
- const query = normalizeMatrixUserLookupEntry(input);
169
- if (!query || query === "*") continue;
170
- directMatches.push(isMatrixQualifiedUserId(query) ? {
171
- input,
172
- resolved: true,
173
- id: normalizeMatrixUserId(query)
174
- } : {
175
- input,
176
- resolved: false
177
- });
178
- }
179
- return buildAllowlistResolutionSummary(directMatches);
180
- }
181
- function logStableMatrixAllowlistUnresolved(params) {
182
- if (params.unresolved.length === 0) return;
183
- summarizeMapping(params.label, [], params.unresolved, params.runtime);
184
- params.runtime.log?.(`${params.label} entries must be full Matrix IDs (example: @user:server). Unresolved entries will not match any sender. To match Matrix display names, set channels.matrix.dangerouslyAllowNameMatching=true.`);
185
- }
186
- function resolveStableMatrixMonitorUserAllowlist(params) {
187
- const allowList = params.allowList;
188
- const resolution = resolveStableMatrixMonitorUserEntries(allowList);
189
- const canonicalized = canonicalizeAllowlistWithResolvedIds({
190
- existing: allowList,
191
- resolvedMap: resolution.resolvedMap,
192
- entryKey: normalizeMatrixUserId
193
- });
194
- logStableMatrixAllowlistUnresolved({
195
- label: params.label,
196
- unresolved: resolution.unresolved,
197
- runtime: params.runtime
198
- });
199
- return {
200
- entries: params.failClosedOnUnresolved ? filterFailClosedMatrixAllowlistEntries(canonicalized) : filterResolvedMatrixAllowlistEntries(canonicalized),
201
- resolvedEntries: listResolvedMatrixAllowlistEntries({
202
- entries: allowList,
203
- resolvedMap: resolution.resolvedMap
204
- })
205
- };
206
- }
207
- async function resolveMatrixMonitorUserEntries(params) {
208
- const directMatches = [];
209
- const pending = [];
210
- for (const entry of params.entries) {
211
- const input = String(entry).trim();
212
- if (!input) continue;
213
- const query = normalizeMatrixUserLookupEntry(input);
214
- if (!query || query === "*") continue;
215
- if (isMatrixQualifiedUserId(query)) {
216
- directMatches.push({
217
- input,
218
- resolved: true,
219
- id: normalizeMatrixUserId(query)
220
- });
221
- continue;
222
- }
223
- pending.push({
224
- input,
225
- query
226
- });
227
- }
228
- (pending.length === 0 ? [] : await params.resolveTargets({
229
- cfg: params.cfg,
230
- accountId: params.accountId,
231
- inputs: pending.map((entry) => entry.query),
232
- kind: "user",
233
- runtime: params.runtime
234
- })).forEach((entry, index) => {
235
- const source = pending[index];
236
- if (!source) return;
237
- directMatches.push({
238
- input: source.input,
239
- resolved: entry.resolved,
240
- id: entry.id ? normalizeMatrixUserId(entry.id) : void 0
241
- });
242
- });
243
- return buildAllowlistResolutionSummary(directMatches);
244
- }
245
- async function resolveMatrixMonitorUserAllowlist(params) {
246
- const allowList = (params.list ?? []).map(String);
247
- if (allowList.length === 0) return {
248
- entries: allowList,
249
- resolvedEntries: []
250
- };
251
- if (!isMatrixDangerousNameMatchingEnabled({
252
- cfg: params.cfg,
253
- accountId: params.accountId
254
- })) return resolveStableMatrixMonitorUserAllowlist({
255
- allowList,
256
- failClosedOnUnresolved: params.failClosedOnUnresolved,
257
- label: params.label,
258
- runtime: params.runtime
259
- });
260
- const resolution = await resolveMatrixMonitorUserEntries({
261
- cfg: params.cfg,
262
- accountId: params.accountId,
263
- entries: allowList,
264
- runtime: params.runtime,
265
- resolveTargets: params.resolveTargets
266
- });
267
- const canonicalized = canonicalizeAllowlistWithResolvedIds({
268
- existing: allowList,
269
- resolvedMap: resolution.resolvedMap,
270
- entryKey: normalizeMatrixUserId
271
- });
272
- summarizeMapping(params.label, resolution.mapping, resolution.unresolved, params.runtime);
273
- if (resolution.unresolved.length > 0) params.runtime.log?.(`${params.label} entries must be full Matrix IDs (example: @user:server). Unresolved entries will not match any sender.`);
274
- return {
275
- entries: params.failClosedOnUnresolved ? filterFailClosedMatrixAllowlistEntries(canonicalized) : filterResolvedMatrixAllowlistEntries(canonicalized),
276
- resolvedEntries: listResolvedMatrixAllowlistEntries({
277
- entries: allowList,
278
- resolvedMap: resolution.resolvedMap
279
- })
280
- };
281
- }
282
- async function resolveMatrixMonitorLiveUserAllowlist(params) {
283
- const liveEntries = normalizeConfiguredMatrixAllowlistEntries(params.entries);
284
- if (liveEntries.length === 0) return [];
285
- const allowNameMatching = isMatrixDangerousNameMatchingEnabled({
286
- cfg: params.cfg,
287
- accountId: params.accountId
288
- });
289
- const effective = [];
290
- const seen = /* @__PURE__ */ new Set();
291
- const startupByInput = new Map((params.startupResolvedEntries ?? []).map((entry) => [entry.input, entry.id]));
292
- const pending = [];
293
- for (const entry of liveEntries) {
294
- const query = normalizeMatrixUserLookupEntry(entry);
295
- if (entry === "*") {
296
- addUniqueMatrixAllowlistEntry({
297
- entries: effective,
298
- seen,
299
- entry
300
- });
301
- continue;
302
- }
303
- if (isMatrixQualifiedUserId(query)) {
304
- addUniqueMatrixAllowlistEntry({
305
- entries: effective,
306
- seen,
307
- entry: normalizeMatrixUserId(query)
308
- });
309
- continue;
310
- }
311
- const startupId = startupByInput.get(entry);
312
- if (allowNameMatching && startupId) {
313
- addUniqueMatrixAllowlistEntry({
314
- entries: effective,
315
- seen,
316
- entry: startupId
317
- });
318
- continue;
319
- }
320
- if (allowNameMatching) {
321
- pending.push(entry);
322
- continue;
323
- }
324
- if (params.failClosedOnUnresolved) addUniqueMatrixAllowlistEntry({
325
- entries: effective,
326
- seen,
327
- entry
328
- });
329
- }
330
- if (pending.length === 0) return effective;
331
- const resolution = await resolveMatrixMonitorUserEntries({
332
- cfg: params.cfg,
333
- accountId: params.accountId,
334
- entries: pending,
335
- runtime: params.runtime,
336
- resolveTargets: params.resolveTargets ?? resolveMatrixTargets
337
- });
338
- const canonicalized = canonicalizeAllowlistWithResolvedIds({
339
- existing: pending,
340
- resolvedMap: resolution.resolvedMap,
341
- entryKey: normalizeMatrixUserId
342
- });
343
- const resolvedEntries = params.failClosedOnUnresolved ? filterFailClosedMatrixAllowlistEntries(canonicalized) : filterResolvedMatrixAllowlistEntries(canonicalized);
344
- for (const entry of resolvedEntries) addUniqueMatrixAllowlistEntry({
345
- entries: effective,
346
- seen,
347
- entry
348
- });
349
- return effective;
350
- }
351
- async function resolveMatrixMonitorRoomsConfig(params) {
352
- const roomsConfig = params.roomsConfig;
353
- if (!roomsConfig || Object.keys(roomsConfig).length === 0) return roomsConfig;
354
- const mapping = [];
355
- const unresolved = [];
356
- const nextRooms = {};
357
- const allowNameMatching = isMatrixDangerousNameMatchingEnabled({
358
- cfg: params.cfg,
359
- accountId: params.accountId
360
- });
361
- if (roomsConfig["*"]) nextRooms["*"] = roomsConfig["*"];
362
- const pending = [];
363
- for (const [entry, roomConfig] of Object.entries(roomsConfig)) {
364
- if (entry === "*") continue;
365
- const input = entry.trim();
366
- if (!input) continue;
367
- const cleaned = normalizeMatrixRoomLookupEntry(input);
368
- if (!cleaned) {
369
- unresolved.push(entry);
370
- continue;
371
- }
372
- if (isMatrixRoomId(cleaned)) {
373
- if (!nextRooms[cleaned]) nextRooms[cleaned] = roomConfig;
374
- if (cleaned !== input) mapping.push(`${input}→${cleaned}`);
375
- continue;
376
- }
377
- if (!cleaned.startsWith("#") && !allowNameMatching) {
378
- unresolved.push(input);
379
- continue;
380
- }
381
- pending.push({
382
- input,
383
- query: cleaned,
384
- config: roomConfig
385
- });
386
- }
387
- if (pending.length > 0) (await params.resolveTargets({
388
- cfg: params.cfg,
389
- accountId: params.accountId,
390
- inputs: pending.map((entry) => entry.query),
391
- kind: "group",
392
- runtime: params.runtime
393
- })).forEach((entry, index) => {
394
- const source = pending[index];
395
- if (!source) return;
396
- if (entry.resolved && entry.id) {
397
- const roomKey = normalizeMatrixRoomLookupEntry(entry.id);
398
- if (!nextRooms[roomKey]) nextRooms[roomKey] = source.config;
399
- mapping.push(`${source.input}→${roomKey}`);
400
- } else unresolved.push(source.input);
401
- });
402
- summarizeMapping("matrix rooms", mapping, unresolved, params.runtime);
403
- if (unresolved.length > 0) params.runtime.log?.("matrix rooms must be room IDs or aliases (example: !room:server, the suffixless !room form on room version 12+, or #alias:server). Unresolved entries are ignored.");
404
- const roomUsers = /* @__PURE__ */ new Set();
405
- for (const roomConfig of Object.values(nextRooms)) addAllowlistUserEntriesFromConfigEntry(roomUsers, roomConfig);
406
- if (roomUsers.size === 0) return nextRooms;
407
- if (!allowNameMatching) {
408
- const resolution = resolveStableMatrixMonitorUserEntries(Array.from(roomUsers));
409
- logStableMatrixAllowlistUnresolved({
410
- label: "matrix room users",
411
- unresolved: resolution.unresolved,
412
- runtime: params.runtime
413
- });
414
- return patchAllowlistUsersInConfigEntries({
415
- entries: nextRooms,
416
- resolvedMap: resolution.resolvedMap,
417
- strategy: "canonicalize",
418
- entryKey: normalizeMatrixUserId
419
- });
420
- }
421
- const resolution = await resolveMatrixMonitorUserEntries({
422
- cfg: params.cfg,
423
- accountId: params.accountId,
424
- entries: Array.from(roomUsers),
425
- runtime: params.runtime,
426
- resolveTargets: params.resolveTargets
427
- });
428
- summarizeMapping("matrix room users", resolution.mapping, resolution.unresolved, params.runtime);
429
- if (resolution.unresolved.length > 0) params.runtime.log?.("matrix room users entries must be full Matrix IDs (example: @user:server). Unresolved entries will not match any sender.");
430
- return patchAllowlistUsersInConfigEntries({
431
- entries: nextRooms,
432
- resolvedMap: resolution.resolvedMap,
433
- strategy: "canonicalize",
434
- entryKey: normalizeMatrixUserId
435
- });
436
- }
437
- async function resolveMatrixMonitorConfig(params) {
438
- const resolveTargets = params.resolveTargets ?? resolveMatrixTargets;
439
- const [allowFrom, groupAllowFrom, roomsConfig] = await Promise.all([
440
- resolveMatrixMonitorUserAllowlist({
441
- cfg: params.cfg,
442
- accountId: params.accountId,
443
- label: "matrix dm allowlist",
444
- list: params.allowFrom,
445
- runtime: params.runtime,
446
- resolveTargets
447
- }),
448
- resolveMatrixMonitorUserAllowlist({
449
- cfg: params.cfg,
450
- accountId: params.accountId,
451
- label: "matrix group allowlist",
452
- list: params.groupAllowFrom,
453
- failClosedOnUnresolved: true,
454
- runtime: params.runtime,
455
- resolveTargets
456
- }),
457
- resolveMatrixMonitorRoomsConfig({
458
- cfg: params.cfg,
459
- accountId: params.accountId,
460
- roomsConfig: params.roomsConfig,
461
- runtime: params.runtime,
462
- resolveTargets
463
- })
464
- ]);
465
- return {
466
- allowFrom: allowFrom.entries,
467
- allowFromResolvedEntries: allowFrom.resolvedEntries,
468
- groupAllowFrom: groupAllowFrom.entries,
469
- groupAllowFromResolvedEntries: groupAllowFrom.resolvedEntries,
470
- roomsConfig
471
- };
472
- }
473
- //#endregion
474
- //#region extensions/matrix/src/matrix/monitor/direct.ts
475
- const DM_CACHE_TTL_MS = 3e4;
476
- const RECENT_INVITE_TTL_MS = 3e4;
477
- const MAX_DM_ROOMS = 1024;
478
- const MAX_DM_MEMBER_FLAGS = 2048;
479
- function createDirectRoomTracker(client, opts = {}) {
480
- const log = opts.log ?? (() => {});
481
- let lastDmUpdateMs = 0;
482
- let hasSeededDmCache = false;
483
- let cachedSelfUserId = null;
484
- const joinedMembersCache = /* @__PURE__ */ new Map();
485
- const directMemberFlagCache = /* @__PURE__ */ new Map();
486
- const recentInviteCandidates = /* @__PURE__ */ new Map();
487
- const locallyPromotedDirectRooms = /* @__PURE__ */ new Map();
488
- const ensureSelfUserId = async () => {
489
- if (cachedSelfUserId) return cachedSelfUserId;
490
- try {
491
- cachedSelfUserId = await client.getUserId();
492
- } catch {
493
- cachedSelfUserId = null;
494
- }
495
- return cachedSelfUserId;
496
- };
497
- const refreshDmCache = async () => {
498
- const now = Date.now();
499
- if (now - lastDmUpdateMs < DM_CACHE_TTL_MS) return;
500
- lastDmUpdateMs = now;
501
- hasSeededDmCache = await client.dms.update() || hasSeededDmCache;
502
- };
503
- const resolveJoinedMembers = async (roomId) => {
504
- const cached = joinedMembersCache.get(roomId);
505
- const now = Date.now();
506
- if (cached && now - cached.ts < DM_CACHE_TTL_MS) return cached.members;
507
- try {
508
- const normalized = await readJoinedMatrixMembers(client, roomId);
509
- if (!normalized) throw new Error("membership unavailable");
510
- setBoundedMap(joinedMembersCache, roomId, {
511
- members: normalized,
512
- ts: now
513
- }, MAX_DM_ROOMS);
514
- return normalized;
515
- } catch (err) {
516
- log(`matrix: dm member lookup failed room=${roomId} (${String(err)})`);
517
- return null;
518
- }
519
- };
520
- const resolveDirectMemberFlag = async (roomId, userId) => {
521
- const normalizedUserId = userId?.trim();
522
- if (!normalizedUserId) return null;
523
- const cacheKey = `${roomId}\n${normalizedUserId}`;
524
- const cached = directMemberFlagCache.get(cacheKey);
525
- const now = Date.now();
526
- if (cached && now - cached.ts < DM_CACHE_TTL_MS) return cached.isDirect;
527
- const isDirect = await hasDirectMatrixMemberFlag(client, roomId, normalizedUserId);
528
- setBoundedMap(directMemberFlagCache, cacheKey, {
529
- isDirect,
530
- ts: now
531
- }, MAX_DM_MEMBER_FLAGS);
532
- return isDirect;
533
- };
534
- const hasRecentInviteCandidate = (roomId, remoteUserId) => {
535
- const normalizedRemoteUserId = remoteUserId?.trim();
536
- if (!normalizedRemoteUserId) return false;
537
- const cached = recentInviteCandidates.get(roomId);
538
- if (!cached) return false;
539
- if (Date.now() - cached.ts >= RECENT_INVITE_TTL_MS) {
540
- recentInviteCandidates.delete(roomId);
541
- return false;
542
- }
543
- return cached.remoteUserId === normalizedRemoteUserId;
544
- };
545
- const canPromoteRecentInvite = async (roomId) => {
546
- try {
547
- return await opts.canPromoteRecentInvite?.(roomId) ?? true;
548
- } catch (err) {
549
- log(`matrix: recent invite promotion veto failed room=${roomId} (${String(err)})`);
550
- return false;
551
- }
552
- };
553
- const canPromoteUnmappedStrictRoom = async (roomId) => {
554
- try {
555
- return await opts.canPromoteUnmappedStrictRoom?.(roomId) ?? false;
556
- } catch (err) {
557
- log(`matrix: unmapped strict room promotion veto failed room=${roomId} (${String(err)})`);
558
- return false;
559
- }
560
- };
561
- const shouldKeepLocallyPromotedDirectRoom = async (roomId) => {
562
- try {
563
- return await opts.shouldKeepLocallyPromotedDirectRoom?.(roomId);
564
- } catch (err) {
565
- log(`matrix: local promotion keep-check failed room=${roomId} (${String(err)})`);
566
- return;
567
- }
568
- };
569
- const isExplicitlyConfiguredRoom = async (roomId) => {
570
- try {
571
- return await opts.isExplicitlyConfiguredRoom?.(roomId) ?? false;
572
- } catch (err) {
573
- log(`matrix: configured room check failed room=${roomId} (${String(err)})`);
574
- return true;
575
- }
576
- };
577
- const hasLocallyPromotedDirectRoom = (roomId, remoteUserId) => {
578
- const normalizedRemoteUserId = remoteUserId?.trim();
579
- if (!normalizedRemoteUserId) return false;
580
- return locallyPromotedDirectRooms.get(roomId)?.remoteUserId === normalizedRemoteUserId;
581
- };
582
- const rememberLocallyPromotedDirectRoom = (roomId, remoteUserId) => {
583
- const normalizedRemoteUserId = remoteUserId.trim();
584
- if (!normalizedRemoteUserId) return;
585
- setBoundedMap(locallyPromotedDirectRooms, roomId, { remoteUserId: normalizedRemoteUserId }, MAX_DM_ROOMS);
586
- };
587
- return {
588
- invalidateRoom: (roomId) => {
589
- joinedMembersCache.delete(roomId);
590
- for (const key of directMemberFlagCache.keys()) if (key.startsWith(`${roomId}\n`)) directMemberFlagCache.delete(key);
591
- lastDmUpdateMs = 0;
592
- log(`matrix: invalidated dm cache room=${roomId}`);
593
- },
594
- rememberInvite: (roomId, remoteUserId) => {
595
- const normalizedRemoteUserId = remoteUserId.trim();
596
- if (!normalizedRemoteUserId) return;
597
- setBoundedMap(recentInviteCandidates, roomId, {
598
- remoteUserId: normalizedRemoteUserId,
599
- ts: Date.now()
600
- }, MAX_DM_ROOMS);
601
- log(`matrix: remembered invite candidate room=${roomId} sender=${normalizedRemoteUserId}`);
602
- },
603
- isDirectMessage: async (params) => {
604
- const { roomId, senderId } = params;
605
- if (await isExplicitlyConfiguredRoom(roomId)) {
606
- log(`matrix: dm rejected via explicit room config room=${roomId}`);
607
- return false;
608
- }
609
- const selfUserId = params.selfUserId ?? await ensureSelfUserId();
610
- const joinedMembers = params.joinedMembers ?? await resolveJoinedMembers(roomId);
611
- const strictDirectMembership = isStrictDirectMembership({
612
- selfUserId,
613
- remoteUserId: senderId,
614
- joinedMembers
615
- });
616
- try {
617
- await refreshDmCache();
618
- } catch (err) {
619
- log(`matrix: dm cache refresh failed (${String(err)})`);
620
- }
621
- if (client.dms.isDm(roomId)) {
622
- if (strictDirectMembership) {
623
- log(`matrix: dm detected via m.direct room=${roomId}`);
624
- return true;
625
- }
626
- log(`matrix: ignoring stale m.direct classification room=${roomId}`);
627
- }
628
- if (strictDirectMembership) {
629
- const directViaSelf = await resolveDirectMemberFlag(roomId, selfUserId);
630
- if (directViaSelf === true) {
631
- log(`matrix: dm detected via member state room=${roomId}`);
632
- return true;
633
- }
634
- if (directViaSelf === false) {
635
- log(`matrix: dm rejected via member state room=${roomId}`);
636
- return false;
637
- }
638
- if (!hasSeededDmCache) {
639
- log(`matrix: dm detected via exact 2-member fallback before dm cache seed room=${roomId}`);
640
- return true;
641
- }
642
- if (hasLocallyPromotedDirectRoom(roomId, senderId)) {
643
- if (await shouldKeepLocallyPromotedDirectRoom(roomId) !== false) {
644
- log(`matrix: dm detected via local promotion room=${roomId}`);
645
- return true;
646
- }
647
- locallyPromotedDirectRooms.delete(roomId);
648
- log(`matrix: local promotion cleared room=${roomId}`);
649
- }
650
- if (hasRecentInviteCandidate(roomId, senderId) && await canPromoteRecentInvite(roomId)) {
651
- const promotion = await promoteMatrixDirectRoomCandidate({
652
- client,
653
- remoteUserId: senderId ?? "",
654
- roomId,
655
- selfUserId
656
- });
657
- if (promotion.classifyAsDirect) {
658
- rememberLocallyPromotedDirectRoom(roomId, senderId ?? "");
659
- log(`matrix: dm detected via recent invite room=${roomId} reason=${promotion.reason} repaired=${String(promotion.repaired)}`);
660
- return true;
661
- }
662
- }
663
- if (await canPromoteUnmappedStrictRoom(roomId)) {
664
- const promotion = await promoteMatrixDirectRoomCandidate({
665
- client,
666
- remoteUserId: senderId ?? "",
667
- roomId,
668
- selfUserId
669
- });
670
- if (promotion.classifyAsDirect) {
671
- rememberLocallyPromotedDirectRoom(roomId, senderId ?? "");
672
- log(`matrix: dm detected via per-room strict fallback room=${roomId} reason=${promotion.reason} repaired=${String(promotion.repaired)}`);
673
- return true;
674
- }
675
- }
676
- }
677
- log(`matrix: dm check room=${roomId} result=group members=${joinedMembers?.length ?? "unknown"}`);
678
- return false;
679
- }
680
- };
681
- }
682
- //#endregion
683
- //#region extensions/matrix/src/matrix/monitor/types.ts
684
- const EventType = {
685
- RoomMessage: "m.room.message",
686
- RoomMessageEncrypted: "m.room.encrypted",
687
- RoomMember: "m.room.member",
688
- Location: "m.location",
689
- Reaction: MATRIX_REACTION_EVENT_TYPE
690
- };
691
- const RelationType = {
692
- Replace: "m.replace",
693
- Thread: "m.thread"
694
- };
695
- //#endregion
696
- //#region extensions/matrix/src/matrix/monitor/access-state.ts
697
- function normalizeMatrixEntry(raw) {
698
- return normalizeMatrixAllowList([raw ?? ""])[0] ?? null;
699
- }
700
- const matrixIngressIdentity = defineStableChannelIngressIdentity({
701
- key: "sender-id",
702
- normalize: normalizeMatrixEntry,
703
- matchEntry({ subject, entry }) {
704
- const senderId = subject.identifiers[0]?.value;
705
- return entry.value === "*" || resolveMatrixAllowListMatch({
706
- allowList: [entry.value],
707
- userId: senderId ?? ""
708
- }).allowed;
709
- }
710
- });
711
- function resolveMatrixGroupIngress(params) {
712
- if (params.groupPolicy === "disabled") return {
713
- groupPolicy: "disabled",
714
- groupAllowFrom: []
715
- };
716
- if (params.effectiveRoomUsers.length > 0) return {
717
- groupPolicy: "allowlist",
718
- groupAllowFrom: params.effectiveRoomUsers
719
- };
720
- if (params.groupPolicy === "allowlist" && params.effectiveGroupAllowFrom.length > 0) return {
721
- groupPolicy: "allowlist",
722
- groupAllowFrom: params.effectiveGroupAllowFrom
723
- };
724
- return {
725
- groupPolicy: "open",
726
- groupAllowFrom: []
727
- };
728
- }
729
- async function resolveMatrixMonitorAccessState(params) {
730
- const dmPolicy = params.dmPolicy ?? "pairing";
731
- const groupPolicy = params.groupPolicy ?? "open";
732
- const effectiveGroupAllowFrom = normalizeMatrixAllowList(params.groupAllowFrom);
733
- const effectiveRoomUsers = normalizeMatrixAllowList(params.roomUsers);
734
- const groupIngress = resolveMatrixGroupIngress({
735
- groupPolicy,
736
- effectiveGroupAllowFrom,
737
- effectiveRoomUsers
738
- });
739
- const accountId = params.accountId ?? "default";
740
- const eventKind = params.eventKind ?? "message";
741
- const ingress = createChannelIngressResolver({
742
- channelId: "matrix",
743
- accountId,
744
- identity: matrixIngressIdentity,
745
- readStoreAllowFrom: async () => params.storeAllowFrom
746
- });
747
- const resolveMessageIngress = async (contextBinding, conversation) => await ingress.message({
748
- subject: { stableId: params.senderId },
749
- conversation: conversation ?? {
750
- kind: params.isRoom ? "channel" : "direct",
751
- id: params.conversationId ?? (params.isRoom ? "matrix-room" : "matrix-dm")
752
- },
753
- ...contextBinding ? { contextBinding } : {},
754
- event: {
755
- kind: eventKind,
756
- authMode: "inbound",
757
- mayPair: params.isRoom ? false : eventKind === "message"
758
- },
759
- dmPolicy,
760
- groupPolicy: params.isRoom ? groupIngress.groupPolicy : "disabled",
761
- policy: { groupAllowFromFallbackToAllowFrom: false },
762
- allowFrom: params.allowFrom,
763
- ...params.isRoom ? { groupAllowFrom: groupIngress.groupAllowFrom } : {}
764
- });
765
- return {
766
- effectiveGroupAllowFrom,
767
- effectiveRoomUsers,
768
- messageIngress: await resolveMessageIngress(),
769
- accountId,
770
- senderId: params.senderId,
771
- isRoom: params.isRoom,
772
- resolveMessageIngress
773
- };
774
- }
775
- async function resolveMatrixMonitorCommandAccess(state, params) {
776
- const commandAllowFrom = state.isRoom ? [] : state.messageIngress.senderAccess.effectiveAllowFrom;
777
- const commandGroupAllowFrom = state.effectiveRoomUsers.length > 0 ? state.effectiveRoomUsers : state.effectiveGroupAllowFrom;
778
- return (await createChannelIngressResolver({
779
- channelId: "matrix",
780
- accountId: state.accountId,
781
- identity: matrixIngressIdentity
782
- }).command({
783
- subject: { stableId: state.senderId },
784
- conversation: {
785
- kind: state.isRoom ? "group" : "direct",
786
- id: state.isRoom ? "matrix-room" : "matrix-dm"
787
- },
788
- dmPolicy: "allowlist",
789
- groupPolicy: "allowlist",
790
- policy: { groupAllowFromFallbackToAllowFrom: false },
791
- allowFrom: commandAllowFrom,
792
- groupAllowFrom: commandGroupAllowFrom,
793
- command: {
794
- useAccessGroups: params.useAccessGroups,
795
- allowTextCommands: params.allowTextCommands,
796
- hasControlCommand: params.hasControlCommand,
797
- groupOwnerAllowFrom: "none",
798
- commandGroupAllowFromFallbackToAllowFrom: false
799
- }
800
- })).commandAccess;
801
- }
802
- //#endregion
803
- //#region extensions/matrix/src/matrix/monitor/verification-utils.ts
804
- const VERIFICATION_EVENT_PREFIX = "m.key.verification.";
805
- const VERIFICATION_REQUEST_MSGTYPE = "m.key.verification.request";
806
- const VERIFICATION_NOTICE_PREFIXES = [
807
- "Matrix verification request received from ",
808
- "Matrix verification is ready with ",
809
- "Matrix verification started with ",
810
- "Matrix verification completed with ",
811
- "Matrix verification cancelled by ",
812
- "Matrix verification SAS with "
813
- ];
814
- function trimMaybeString(input) {
815
- return normalizeOptionalString(input) ?? "";
816
- }
817
- function isMatrixVerificationEventType(type) {
818
- return trimMaybeString(type).startsWith(VERIFICATION_EVENT_PREFIX);
819
- }
820
- function isMatrixVerificationRequestMsgType(msgtype) {
821
- return trimMaybeString(msgtype) === VERIFICATION_REQUEST_MSGTYPE;
822
- }
823
- function isMatrixVerificationNoticeBody(body) {
824
- const text = trimMaybeString(body);
825
- return VERIFICATION_NOTICE_PREFIXES.some((prefix) => text.startsWith(prefix));
826
- }
827
- function isMatrixVerificationRoomMessage(content) {
828
- return isMatrixVerificationRequestMsgType(content.msgtype) || trimMaybeString(content.msgtype) === "m.notice" && isMatrixVerificationNoticeBody(content.body);
829
- }
830
- const matrixVerificationConstants = {
831
- eventPrefix: VERIFICATION_EVENT_PREFIX,
832
- requestMsgtype: VERIFICATION_REQUEST_MSGTYPE
833
- };
834
- //#endregion
835
- //#region extensions/matrix/src/matrix/monitor/verification-events.ts
836
- const MAX_TRACKED_VERIFICATION_EVENTS = 1024;
837
- const SAS_NOTICE_RETRY_DELAY_MS = 750;
838
- const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
839
- const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./direct-management-B2Bno2xL.mjs").then((n) => n.t), import("./direct-management-B2Bno2xL.mjs").then((n) => n.o)]).then(([directManagementModule, directRoomModule]) => ({
840
- inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
841
- isStrictDirectRoom: directRoomModule.isStrictDirectRoom
842
- })));
843
- function readVerificationSignal(event) {
844
- const type = normalizeNullableString(event?.type) ?? "";
845
- const content = event?.content ?? {};
846
- const msgtype = normalizeNullableString(content.msgtype) ?? "";
847
- const relatedEventId = normalizeNullableString(content["m.relates_to"]?.event_id);
848
- const transactionId = normalizeNullableString(content.transaction_id);
849
- if (type === EventType.RoomMessage && isMatrixVerificationRequestMsgType(msgtype)) return {
850
- stage: "request",
851
- flowId: normalizeNullableString(event.event_id) ?? transactionId ?? relatedEventId
852
- };
853
- if (!isMatrixVerificationEventType(type)) return null;
854
- const flowId = transactionId ?? relatedEventId ?? normalizeNullableString(event.event_id);
855
- if (type === `${matrixVerificationConstants.eventPrefix}request`) return {
856
- stage: "request",
857
- flowId
858
- };
859
- if (type === `${matrixVerificationConstants.eventPrefix}ready`) return {
860
- stage: "ready",
861
- flowId
862
- };
863
- if (type === "m.key.verification.start") return {
864
- stage: "start",
865
- flowId
866
- };
867
- if (type === "m.key.verification.cancel") return {
868
- stage: "cancel",
869
- flowId
870
- };
871
- if (type === "m.key.verification.done") return {
872
- stage: "done",
873
- flowId
874
- };
875
- return {
876
- stage: "other",
877
- flowId
878
- };
879
- }
880
- function formatVerificationStageNotice(params) {
881
- const { stage, senderId, event } = params;
882
- const content = event.content;
883
- switch (stage) {
884
- case "request": return `Matrix verification request received from ${senderId}. Open "Verify by emoji" in your Matrix client to continue.`;
885
- case "ready": return `Matrix verification is ready with ${senderId}. Choose "Verify by emoji" to reveal the emoji sequence.`;
886
- case "start": return `Matrix verification started with ${senderId}.`;
887
- case "done": return `Matrix verification completed with ${senderId}.`;
888
- case "cancel": {
889
- const code = normalizeNullableString(content.code);
890
- const reason = normalizeNullableString(content.reason);
891
- if (code && reason) return `Matrix verification cancelled by ${senderId} (${code}: ${reason}).`;
892
- if (reason) return `Matrix verification cancelled by ${senderId} (${reason}).`;
893
- return `Matrix verification cancelled by ${senderId}.`;
894
- }
895
- default: return null;
896
- }
897
- }
898
- function formatVerificationSasNotice(summary) {
899
- const sas = summary.sas;
900
- if (!sas) return null;
901
- const emojiLine = Array.isArray(sas.emoji) && sas.emoji.length > 0 ? `SAS emoji: ${sas.emoji.map(([emoji, name]) => `${normalizeNullableString(emoji) ?? "?"} ${normalizeNullableString(name) ?? "?"}`).join(" | ")}` : null;
902
- const decimalLine = Array.isArray(sas.decimal) && sas.decimal.length === 3 ? `SAS decimal: ${sas.decimal.join(" ")}` : null;
903
- if (!emojiLine && !decimalLine) return null;
904
- const lines = [`Matrix verification SAS with ${summary.otherUserId}:`];
905
- if (emojiLine) lines.push(emojiLine);
906
- if (decimalLine) lines.push(decimalLine);
907
- lines.push("If both sides match, choose 'They match' in your Matrix app.");
908
- return lines.join("\n");
909
- }
910
- function resolveVerificationFlowCandidates(params) {
911
- const { event, flowId } = params;
912
- const content = event.content;
913
- const candidates = /* @__PURE__ */ new Set();
914
- const add = (value) => {
915
- const normalized = normalizeNullableString(value);
916
- if (normalized) candidates.add(normalized);
917
- };
918
- add(flowId);
919
- add(event.event_id);
920
- add(content.transaction_id);
921
- add(content["m.relates_to"]?.event_id);
922
- return Array.from(candidates);
923
- }
924
- function resolveSummaryRecency(summary) {
925
- const ts = Date.parse(summary.updatedAt ?? "");
926
- return Number.isFinite(ts) ? ts : 0;
927
- }
928
- function isActiveVerificationSummary(summary) {
929
- if (summary.completed === true) return false;
930
- if (summary.phaseName === "cancelled" || summary.phaseName === "done") return false;
931
- if (typeof summary.phase === "number" && summary.phase >= 4) return false;
932
- return true;
933
- }
934
- async function resolveVerificationSummaryForSignal(client, params) {
935
- if (!client.crypto) return null;
936
- await client.crypto.ensureVerificationDmTracked({
937
- roomId: params.roomId,
938
- userId: params.senderId
939
- }).catch(() => null);
940
- const list = await client.crypto.listVerifications();
941
- if (list.length === 0) return null;
942
- const candidates = resolveVerificationFlowCandidates({
943
- event: params.event,
944
- flowId: params.flowId
945
- });
946
- const byTransactionId = list.find((entry) => candidates.some((candidate) => entry.transactionId === candidate));
947
- if (byTransactionId) return byTransactionId;
948
- const { inspectMatrixDirectRooms, isStrictDirectRoom } = await loadMatrixDirectRoomDeps();
949
- const inspection = await inspectMatrixDirectRooms({
950
- client,
951
- remoteUserId: params.senderId
952
- }).catch(() => null);
953
- const activeRoomId = normalizeNullableString(inspection?.activeRoomId);
954
- if (activeRoomId) {
955
- if (activeRoomId !== params.roomId) return null;
956
- } else if (!await isStrictDirectRoom({
957
- client,
958
- roomId: params.roomId,
959
- remoteUserId: params.senderId
960
- })) return null;
961
- const activeByUser = list.filter((entry) => entry.otherUserId === params.senderId && isActiveVerificationSummary(entry)).toSorted((a, b) => resolveSummaryRecency(b) - resolveSummaryRecency(a));
962
- const activeInRoom = activeByUser.filter((entry) => {
963
- return normalizeNullableString(entry.roomId) === params.roomId;
964
- });
965
- if (activeInRoom.length > 0) return activeInRoom[0] ?? null;
966
- return activeByUser[0] ?? null;
967
- }
968
- async function resolveVerificationSasNoticeForSignal(client, params) {
969
- const summary = await resolveVerificationSummaryForSignal(client, params);
970
- const immediateNotice = summary && isActiveVerificationSummary(summary) ? formatVerificationSasNotice(summary) : null;
971
- if (immediateNotice || params.stage !== "ready" && params.stage !== "start") return {
972
- summary,
973
- sasNotice: immediateNotice
974
- };
975
- await new Promise((resolve) => {
976
- setTimeout(resolve, params.sasNoticeRetryDelayMs ?? SAS_NOTICE_RETRY_DELAY_MS);
977
- });
978
- const retriedSummary = await resolveVerificationSummaryForSignal(client, params);
979
- return {
980
- summary: retriedSummary,
981
- sasNotice: retriedSummary && isActiveVerificationSummary(retriedSummary) ? formatVerificationSasNotice(retriedSummary) : null
982
- };
983
- }
984
- function trackBounded(set, value) {
985
- if (!value || set.has(value)) return false;
986
- set.add(value);
987
- if (set.size > MAX_TRACKED_VERIFICATION_EVENTS) {
988
- const oldest = set.values().next().value;
989
- if (typeof oldest === "string") set.delete(oldest);
990
- }
991
- return true;
992
- }
993
- async function sendVerificationNotice(params) {
994
- const roomId = normalizeNullableString(params.roomId);
995
- if (!roomId) return;
996
- try {
997
- await params.client.sendMessage(roomId, {
998
- msgtype: "m.notice",
999
- body: params.body
1000
- });
1001
- } catch (err) {
1002
- params.logVerboseMessage(`matrix: failed sending verification notice room=${roomId}: ${String(err)}`);
1003
- }
1004
- }
1005
- async function isVerificationNoticeAuthorized(params) {
1006
- if (!params.dmEnabled || params.dmPolicy === "disabled") {
1007
- params.logVerboseMessage(`matrix: blocked verification sender ${params.senderId} (dmPolicy=${params.dmPolicy}, dmEnabled=${String(params.dmEnabled)})`);
1008
- return false;
1009
- }
1010
- const storeAllowFrom = params.dmPolicy !== "allowlist" && params.dmPolicy !== "open" ? await params.readStoreAllowFrom() : [];
1011
- if ((await resolveMatrixMonitorAccessState({
1012
- allowFrom: params.allowFrom,
1013
- storeAllowFrom,
1014
- dmPolicy: params.dmPolicy,
1015
- groupPolicy: "open",
1016
- groupAllowFrom: [],
1017
- roomUsers: [],
1018
- senderId: params.senderId,
1019
- isRoom: false
1020
- })).messageIngress.senderAccess.decision === "allow") return true;
1021
- params.logVerboseMessage(`matrix: blocked verification sender ${params.senderId} (dmPolicy=${params.dmPolicy})`);
1022
- return false;
1023
- }
1024
- function createMatrixVerificationEventRouter(params) {
1025
- const routerStartedAtMs = Date.now();
1026
- const routedVerificationEvents = /* @__PURE__ */ new Set();
1027
- const routedVerificationSasFingerprints = /* @__PURE__ */ new Set();
1028
- const routedVerificationStageNotices = /* @__PURE__ */ new Set();
1029
- const verificationFlowRooms = /* @__PURE__ */ new Map();
1030
- const verificationUserRooms = /* @__PURE__ */ new Map();
1031
- async function resolveActiveDirectRoomId(remoteUserId) {
1032
- const { inspectMatrixDirectRooms } = await loadMatrixDirectRoomDeps();
1033
- const inspection = await inspectMatrixDirectRooms({
1034
- client: params.client,
1035
- remoteUserId
1036
- }).catch(() => null);
1037
- return normalizeNullableString(inspection?.activeRoomId);
1038
- }
1039
- function shouldEmitVerificationEventNotice(event) {
1040
- const eventTs = typeof event.origin_server_ts === "number" && Number.isFinite(event.origin_server_ts) ? event.origin_server_ts : null;
1041
- if (eventTs === null) return true;
1042
- return eventTs >= routerStartedAtMs - VERIFICATION_EVENT_STARTUP_GRACE_MS;
1043
- }
1044
- function rememberVerificationRoom(roomId, event, flowId) {
1045
- for (const candidate of resolveVerificationFlowCandidates({
1046
- event,
1047
- flowId
1048
- })) {
1049
- verificationFlowRooms.set(candidate, roomId);
1050
- if (verificationFlowRooms.size > MAX_TRACKED_VERIFICATION_EVENTS) {
1051
- const oldest = verificationFlowRooms.keys().next().value;
1052
- if (typeof oldest === "string") verificationFlowRooms.delete(oldest);
1053
- }
1054
- }
1055
- }
1056
- function rememberVerificationUserRoom(remoteUserId, roomId) {
1057
- const normalizedUserId = normalizeNullableString(remoteUserId);
1058
- const normalizedRoomId = normalizeNullableString(roomId);
1059
- if (!normalizedUserId || !normalizedRoomId) return;
1060
- verificationUserRooms.delete(normalizedUserId);
1061
- verificationUserRooms.set(normalizedUserId, normalizedRoomId);
1062
- if (verificationUserRooms.size > MAX_TRACKED_VERIFICATION_EVENTS) {
1063
- const oldest = verificationUserRooms.keys().next().value;
1064
- if (typeof oldest === "string") verificationUserRooms.delete(oldest);
1065
- }
1066
- }
1067
- async function resolveSummaryRoomId(summary) {
1068
- const mappedRoomId = normalizeNullableString(summary.roomId) ?? normalizeNullableString(summary.transactionId ? verificationFlowRooms.get(summary.transactionId) : null) ?? normalizeNullableString(verificationFlowRooms.get(summary.id));
1069
- if (mappedRoomId) return mappedRoomId;
1070
- const remoteUserId = normalizeNullableString(summary.otherUserId);
1071
- if (!remoteUserId) return null;
1072
- const recentRoomId = normalizeNullableString(verificationUserRooms.get(remoteUserId));
1073
- const activeRoomId = await resolveActiveDirectRoomId(remoteUserId);
1074
- if (recentRoomId && activeRoomId && recentRoomId === activeRoomId) return recentRoomId;
1075
- if (activeRoomId) return activeRoomId;
1076
- if (recentRoomId && await (await loadMatrixDirectRoomDeps()).isStrictDirectRoom({
1077
- client: params.client,
1078
- roomId: recentRoomId,
1079
- remoteUserId
1080
- })) return recentRoomId;
1081
- return null;
1082
- }
1083
- async function routeVerificationSummary(summary) {
1084
- const roomId = await resolveSummaryRoomId(summary);
1085
- if (!roomId || !isActiveVerificationSummary(summary)) return;
1086
- if (!await (await loadMatrixDirectRoomDeps()).isStrictDirectRoom({
1087
- client: params.client,
1088
- roomId,
1089
- remoteUserId: summary.otherUserId
1090
- })) {
1091
- params.logVerboseMessage(`matrix: ignoring verification summary outside strict DM room=${roomId} sender=${summary.otherUserId}`);
1092
- return;
1093
- }
1094
- if (!await isVerificationNoticeAuthorized({
1095
- senderId: summary.otherUserId,
1096
- allowFrom: params.allowFrom,
1097
- dmEnabled: params.dmEnabled,
1098
- dmPolicy: params.dmPolicy,
1099
- readStoreAllowFrom: params.readStoreAllowFrom,
1100
- logVerboseMessage: params.logVerboseMessage
1101
- })) return;
1102
- const sasNotice = formatVerificationSasNotice(summary);
1103
- if (!sasNotice) return;
1104
- const sasFingerprint = `${summary.id}:${JSON.stringify(summary.sas)}`;
1105
- if (!trackBounded(routedVerificationSasFingerprints, sasFingerprint)) return;
1106
- await sendVerificationNotice({
1107
- client: params.client,
1108
- roomId,
1109
- body: sasNotice,
1110
- logVerboseMessage: params.logVerboseMessage
1111
- });
1112
- }
1113
- function routeVerificationEvent(roomId, event) {
1114
- const senderId = normalizeNullableString(event?.sender);
1115
- if (!senderId) return false;
1116
- const signal = readVerificationSignal(event);
1117
- if (!signal) return false;
1118
- rememberVerificationRoom(roomId, event, signal.flowId);
1119
- const routeTask = async () => {
1120
- if (!shouldEmitVerificationEventNotice(event)) {
1121
- params.logVerboseMessage(`matrix: ignoring historical verification event room=${roomId} id=${event.event_id ?? "unknown"} type=${event.type ?? "unknown"}`);
1122
- return;
1123
- }
1124
- const flowId = signal.flowId;
1125
- const sourceFingerprint = normalizeNullableString(event?.event_id) ?? `${senderId}:${event.type}:${flowId ?? "none"}`;
1126
- if (!await (await loadMatrixDirectRoomDeps()).isStrictDirectRoom({
1127
- client: params.client,
1128
- roomId,
1129
- remoteUserId: senderId
1130
- })) {
1131
- params.logVerboseMessage(`matrix: ignoring verification event outside strict DM room=${roomId} sender=${senderId}`);
1132
- return;
1133
- }
1134
- if (!await isVerificationNoticeAuthorized({
1135
- senderId,
1136
- allowFrom: params.allowFrom,
1137
- dmEnabled: params.dmEnabled,
1138
- dmPolicy: params.dmPolicy,
1139
- readStoreAllowFrom: params.readStoreAllowFrom,
1140
- logVerboseMessage: params.logVerboseMessage
1141
- })) return;
1142
- rememberVerificationUserRoom(senderId, roomId);
1143
- if (!trackBounded(routedVerificationEvents, sourceFingerprint)) return;
1144
- const stageNotice = formatVerificationStageNotice({
1145
- stage: signal.stage,
1146
- senderId,
1147
- event
1148
- });
1149
- const { summary, sasNotice } = await resolveVerificationSasNoticeForSignal(params.client, {
1150
- roomId,
1151
- event,
1152
- senderId,
1153
- flowId,
1154
- stage: signal.stage,
1155
- sasNoticeRetryDelayMs: params.sasNoticeRetryDelayMs
1156
- }).catch(() => ({
1157
- summary: null,
1158
- sasNotice: null
1159
- }));
1160
- const notices = [];
1161
- if (stageNotice) {
1162
- const stageKey = `${roomId}:${senderId}:${flowId ?? sourceFingerprint}:${signal.stage}`;
1163
- if (trackBounded(routedVerificationStageNotices, stageKey)) notices.push(stageNotice);
1164
- }
1165
- if (summary && sasNotice) {
1166
- const sasFingerprint = `${summary.id}:${JSON.stringify(summary.sas)}`;
1167
- if (trackBounded(routedVerificationSasFingerprints, sasFingerprint)) notices.push(sasNotice);
1168
- }
1169
- if (notices.length === 0) return;
1170
- for (const body of notices) await sendVerificationNotice({
1171
- client: params.client,
1172
- roomId,
1173
- body,
1174
- logVerboseMessage: params.logVerboseMessage
1175
- });
1176
- };
1177
- if (params.runDetachedTask) params.runDetachedTask(`verification event handler room=${roomId} id=${event.event_id ?? "unknown"}`, routeTask);
1178
- else routeTask().catch((err) => {
1179
- params.logVerboseMessage(`matrix: failed routing verification event: ${String(err)}`);
1180
- });
1181
- return true;
1182
- }
1183
- return {
1184
- routeVerificationEvent,
1185
- routeVerificationSummary
1186
- };
1187
- }
1188
- //#endregion
1189
- //#region extensions/matrix/src/matrix/monitor/events.ts
1190
- const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_WINDOW_MS = 12e4;
1191
- const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_THRESHOLD = 3;
1192
- const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_SAMPLE_LIMIT = 3;
1193
- function formatMatrixPostHealthySyncDecryptionHint(accountId) {
1194
- return `matrix: repeated fresh encrypted messages are still failing to decrypt after Matrix resumed healthy sync. This device may still be missing new room keys. Check 'openclaw matrix verify status --verbose --account ${accountId}' and 'openclaw matrix devices list --account ${accountId}'.`;
1195
- }
1196
- function isFreshPostHealthySyncDecryptFailure(params) {
1197
- const { event, healthySyncSinceMs, graceMs = 0, nowMs } = params;
1198
- if (typeof healthySyncSinceMs !== "number" || !Number.isFinite(healthySyncSinceMs)) return false;
1199
- const eventTs = event.origin_server_ts;
1200
- if (!Number.isFinite(eventTs) || eventTs <= 0) return false;
1201
- if (eventTs < healthySyncSinceMs + graceMs) return false;
1202
- if (eventTs > nowMs + 6e4) return false;
1203
- return true;
1204
- }
1205
- function createMatrixPostHealthySyncDecryptFailureTracker(params) {
1206
- let observations = [];
1207
- let warningEmitted = false;
1208
- let trackedHealthySyncSinceMs;
1209
- const resetObservations = () => {
1210
- observations = [];
1211
- warningEmitted = false;
1212
- };
1213
- const pruneObservations = (nowMs) => {
1214
- observations = observations.filter((entry) => nowMs - entry.eventTs <= MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_WINDOW_MS);
1215
- if (observations.length === 0) warningEmitted = false;
1216
- };
1217
- return { recordFailure(roomId, event, error) {
1218
- const nowMs = Date.now();
1219
- const healthySyncSinceMs = params.getHealthySyncSinceMs?.();
1220
- if (healthySyncSinceMs !== trackedHealthySyncSinceMs) {
1221
- trackedHealthySyncSinceMs = healthySyncSinceMs;
1222
- resetObservations();
1223
- }
1224
- if (!isFreshPostHealthySyncDecryptFailure({
1225
- event,
1226
- healthySyncSinceMs,
1227
- graceMs: params.startupGraceMs,
1228
- nowMs
1229
- })) return {
1230
- freshAfterHealthySync: false,
1231
- failureCount: 0
1232
- };
1233
- pruneObservations(nowMs);
1234
- const key = `${roomId}|${event.event_id}`;
1235
- if (!observations.some((entry) => entry.key === key)) observations.push({
1236
- key,
1237
- roomId,
1238
- eventId: event.event_id,
1239
- sender: typeof event.sender === "string" ? event.sender : null,
1240
- eventTs: event.origin_server_ts,
1241
- error: error.message
1242
- });
1243
- const failureCount = observations.length;
1244
- if (warningEmitted || failureCount < MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_THRESHOLD) return {
1245
- freshAfterHealthySync: true,
1246
- failureCount
1247
- };
1248
- warningEmitted = true;
1249
- const rooms = uniqueStrings(observations.map((entry) => entry.roomId)).slice(0, MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_SAMPLE_LIMIT);
1250
- const senders = uniqueStrings(observations.map((entry) => entry.sender).filter((sender) => Boolean(sender))).slice(0, MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_SAMPLE_LIMIT);
1251
- const eventIds = observations.slice(-3).map((entry) => entry.eventId);
1252
- const latestError = observations.at(-1)?.error ?? error.message;
1253
- return {
1254
- freshAfterHealthySync: true,
1255
- failureCount,
1256
- warning: {
1257
- rooms,
1258
- roomCount: new Set(observations.map((entry) => entry.roomId)).size,
1259
- senders,
1260
- senderCount: new Set(observations.map((entry) => entry.sender).filter(Boolean)).size,
1261
- eventIds,
1262
- latestError,
1263
- windowMs: MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_WINDOW_MS
1264
- }
1265
- };
1266
- } };
1267
- }
1268
- function formatMatrixSelfDecryptionHint(accountId) {
1269
- return `matrix: failed to decrypt a message from this same Matrix user. This usually means another Matrix device did not share the room key, or another OpenClaw runtime is using the same account. Check 'openclaw matrix verify status --verbose --account ${accountId}' and 'openclaw matrix devices list --account ${accountId}'.`;
1270
- }
1271
- async function resolveMatrixSelfUserId(client, logVerboseMessage) {
1272
- if (typeof client.getUserId !== "function") return null;
1273
- try {
1274
- return await client.getUserId() ?? null;
1275
- } catch (err) {
1276
- logVerboseMessage(`matrix: failed resolving self user id for decrypt warning: ${String(err)}`);
1277
- return null;
1278
- }
1279
- }
1280
- function registerMatrixMonitorEvents(params) {
1281
- const { cfg, client, auth, allowFrom, dmEnabled, dmPolicy, readStoreAllowFrom, directTracker, invalidateMemberDisplayName, logVerboseMessage, warnedEncryptedRooms, warnedCryptoMissingRooms, logger, startupGraceMs, getHealthySyncSinceMs, formatNativeDependencyHint, onRoomMessage, runDetachedTask, sasNoticeRetryDelayMs } = params;
1282
- const postHealthySyncDecryptFailureTracker = createMatrixPostHealthySyncDecryptFailureTracker({
1283
- getHealthySyncSinceMs,
1284
- startupGraceMs
1285
- });
1286
- const { routeVerificationEvent, routeVerificationSummary } = createMatrixVerificationEventRouter({
1287
- client,
1288
- allowFrom,
1289
- dmEnabled,
1290
- dmPolicy,
1291
- readStoreAllowFrom,
1292
- logVerboseMessage,
1293
- runDetachedTask,
1294
- sasNoticeRetryDelayMs
1295
- });
1296
- const runMonitorTask = (label, task) => {
1297
- if (runDetachedTask) return runDetachedTask(label, task);
1298
- return Promise.resolve().then(task).catch((error) => {
1299
- logVerboseMessage(`matrix: ${label} failed (${String(error)})`);
1300
- });
1301
- };
1302
- const onRoomMessageEvent = (roomId, event) => {
1303
- if (routeVerificationEvent(roomId, event)) return;
1304
- runMonitorTask(`room message handler room=${roomId} id=${event.event_id ?? "unknown"}`, async () => {
1305
- await onRoomMessage(roomId, event);
1306
- });
1307
- };
1308
- const onEncryptedEvent = (roomId, event) => {
1309
- const eventId = event?.event_id ?? "unknown";
1310
- const eventType = event?.type ?? "unknown";
1311
- logVerboseMessage(`matrix: encrypted event room=${roomId} type=${eventType} id=${eventId}`);
1312
- };
1313
- const onDecryptedEvent = (roomId, event) => {
1314
- const eventId = event?.event_id ?? "unknown";
1315
- const eventType = event?.type ?? "unknown";
1316
- logVerboseMessage(`matrix: decrypted event room=${roomId} type=${eventType} id=${eventId}`);
1317
- if (routeVerificationEvent(roomId, event)) return;
1318
- if (eventType !== EventType.RoomMessage) return;
1319
- runMonitorTask(`decrypted room message handler room=${roomId} id=${event.event_id ?? "unknown"}`, async () => {
1320
- await onRoomMessage(roomId, event);
1321
- });
1322
- };
1323
- const onFailedDecryption = (roomId, event, error) => {
1324
- runMonitorTask(`failed decryption handler room=${roomId} id=${event.event_id ?? "unknown"}`, async () => {
1325
- const failureState = postHealthySyncDecryptFailureTracker.recordFailure(roomId, event, error);
1326
- const selfUserId = await resolveMatrixSelfUserId(client, logVerboseMessage);
1327
- const sender = typeof event.sender === "string" ? event.sender : null;
1328
- const senderMatchesOwnUser = Boolean(selfUserId && sender && selfUserId === sender);
1329
- logger.warn(failureState.freshAfterHealthySync ? "Failed to decrypt fresh post-healthy-sync message" : "Failed to decrypt message", {
1330
- roomId,
1331
- eventId: event.event_id,
1332
- sender,
1333
- senderMatchesOwnUser,
1334
- error: error.message,
1335
- freshAfterHealthySync: failureState.freshAfterHealthySync,
1336
- ...failureState.freshAfterHealthySync ? { postHealthySyncFailureCount: failureState.failureCount } : {}
1337
- });
1338
- if (failureState.warning) logger.warn(formatMatrixPostHealthySyncDecryptionHint(auth.accountId), {
1339
- roomId,
1340
- eventId: event.event_id,
1341
- failureCount: failureState.failureCount,
1342
- roomCount: failureState.warning.roomCount,
1343
- rooms: failureState.warning.rooms,
1344
- senderCount: failureState.warning.senderCount,
1345
- senders: failureState.warning.senders,
1346
- sampleEventIds: failureState.warning.eventIds,
1347
- latestError: failureState.warning.latestError,
1348
- windowMs: failureState.warning.windowMs
1349
- });
1350
- if (senderMatchesOwnUser) logger.warn(formatMatrixSelfDecryptionHint(auth.accountId), {
1351
- roomId,
1352
- eventId: event.event_id,
1353
- sender
1354
- });
1355
- logVerboseMessage(`matrix: failed decrypt room=${roomId} id=${event.event_id ?? "unknown"} freshAfterHealthySync=${String(failureState.freshAfterHealthySync)} error=${error.message}`);
1356
- });
1357
- };
1358
- const onVerificationSummary = (summary) => {
1359
- runMonitorTask("verification summary handler", async () => {
1360
- await routeVerificationSummary(summary);
1361
- });
1362
- };
1363
- const onInvite = (roomId, event) => {
1364
- directTracker?.invalidateRoom(roomId);
1365
- const eventId = event?.event_id ?? "unknown";
1366
- const sender = event?.sender ?? "unknown";
1367
- const invitee = normalizeOptionalString(event?.state_key) ?? "";
1368
- const senderIsInvitee = Boolean(invitee) && (normalizeOptionalString(event?.sender) ?? "") === invitee;
1369
- const isDirect = (event?.content)?.is_direct === true;
1370
- const rememberedSender = normalizeOptionalString(event?.sender);
1371
- if (rememberedSender && !senderIsInvitee) directTracker?.rememberInvite?.(roomId, rememberedSender);
1372
- logVerboseMessage(`matrix: invite room=${roomId} sender=${sender} direct=${String(isDirect)} id=${eventId}`);
1373
- };
1374
- const onJoin = (roomId, event) => {
1375
- directTracker?.invalidateRoom(roomId);
1376
- const eventId = event?.event_id ?? "unknown";
1377
- logVerboseMessage(`matrix: join room=${roomId} id=${eventId}`);
1378
- if (event.membershipProvenance !== "transition" || event.state_key !== auth.userId) return;
1379
- runMonitorTask(`join introduction room=${roomId}`, async () => {
1380
- const members = await readJoinedMatrixMembers(client, roomId);
1381
- const remoteUserId = members?.find((member) => member !== auth.userId);
1382
- if (!members?.includes(auth.userId) || !remoteUserId || await directTracker.isDirectMessage({
1383
- roomId,
1384
- senderId: remoteUserId,
1385
- selfUserId: auth.userId,
1386
- joinedMembers: members
1387
- })) return;
1388
- const roomInfo = await params.getRoomInfo(roomId, { includeAliases: params.needsRoomAliasesForConfig });
1389
- const roomConfig = resolveMatrixRoomConfig({
1390
- rooms: params.roomsConfig,
1391
- roomId,
1392
- aliases: [roomInfo.canonicalAlias ?? "", ...roomInfo.altAliases].filter(Boolean)
1393
- });
1394
- const roomAllowed = (!params.needsRoomAliasesForConfig || roomInfo.aliasesResolved) && params.groupPolicy !== "disabled" && (roomConfig.config ? roomConfig.allowed : params.groupPolicy === "open");
1395
- const options = {
1396
- cfg,
1397
- accountId: auth.accountId,
1398
- client
1399
- };
1400
- await reportChannelRoomJoin({
1401
- cfg,
1402
- channel: "matrix",
1403
- accountId: auth.accountId,
1404
- conversationId: roomId,
1405
- deliverTo: `room:${roomId}`,
1406
- route: resolveMatrixInboundRoute({
1407
- cfg,
1408
- accountId: auth.accountId,
1409
- roomId,
1410
- senderId: auth.userId,
1411
- isDirectMessage: false,
1412
- resolveAgentRoute
1413
- }).route,
1414
- roomAllowed,
1415
- resolveRoomContext: async ({ messageLimit }) => {
1416
- const info = await getMatrixRoomInfo(roomId, options);
1417
- const context = {
1418
- title: info.name ?? void 0,
1419
- purpose: info.topic ?? void 0
1420
- };
1421
- try {
1422
- const { messages } = await readMatrixMessages(roomId, {
1423
- ...options,
1424
- limit: messageLimit
1425
- });
1426
- return {
1427
- ...context,
1428
- recentMessages: messages.toReversed().flatMap(({ sender, body }) => body?.trim() ? [{
1429
- sender,
1430
- text: body
1431
- }] : [])
1432
- };
1433
- } catch {
1434
- return context;
1435
- }
1436
- }
1437
- });
1438
- });
1439
- };
1440
- const onRoomEvent = (roomId, event) => {
1441
- const eventType = event?.type ?? "unknown";
1442
- if (eventType === EventType.RoomMessageEncrypted) {
1443
- logVerboseMessage(`matrix: encrypted raw event room=${roomId} id=${event?.event_id ?? "unknown"}`);
1444
- if (auth.encryption !== true && !warnedEncryptedRooms.has(roomId)) {
1445
- warnedEncryptedRooms.add(roomId);
1446
- const warning = formatMatrixEncryptedEventDisabledWarning(cfg, auth.accountId);
1447
- logger.warn(warning, { roomId });
1448
- }
1449
- if (auth.encryption === true && !client.crypto && !warnedCryptoMissingRooms.has(roomId)) {
1450
- warnedCryptoMissingRooms.add(roomId);
1451
- const warning = `matrix: encryption enabled but crypto is unavailable; ${formatNativeDependencyHint({
1452
- packageName: "@matrix-org/matrix-sdk-crypto-nodejs",
1453
- manager: "pnpm",
1454
- downloadCommand: "node node_modules/@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js"
1455
- })}`;
1456
- logger.warn(warning, { roomId });
1457
- }
1458
- return;
1459
- }
1460
- if (eventType === EventType.RoomMember) {
1461
- directTracker?.invalidateRoom(roomId);
1462
- const membership = (event?.content)?.membership;
1463
- const stateKey = event.state_key ?? "";
1464
- if (stateKey) invalidateMemberDisplayName?.(roomId, stateKey);
1465
- logVerboseMessage(`matrix: member event room=${roomId} stateKey=${stateKey} membership=${membership ?? "unknown"}`);
1466
- }
1467
- if (eventType === EventType.Reaction) {
1468
- runMonitorTask(`reaction handler room=${roomId} id=${event.event_id ?? "unknown"}`, async () => {
1469
- await onRoomMessage(roomId, event);
1470
- });
1471
- return;
1472
- }
1473
- routeVerificationEvent(roomId, event);
1474
- };
1475
- client.on("room.message", onRoomMessageEvent);
1476
- client.on("room.encrypted_event", onEncryptedEvent);
1477
- client.on("room.decrypted_event", onDecryptedEvent);
1478
- client.on("room.failed_decryption", onFailedDecryption);
1479
- client.on("verification.summary", onVerificationSummary);
1480
- client.on("room.invite", onInvite);
1481
- client.on("room.join", onJoin);
1482
- client.on("room.event", onRoomEvent);
1483
- return () => {
1484
- client.off("room.message", onRoomMessageEvent);
1485
- client.off("room.encrypted_event", onEncryptedEvent);
1486
- client.off("room.decrypted_event", onDecryptedEvent);
1487
- client.off("room.failed_decryption", onFailedDecryption);
1488
- client.off("verification.summary", onVerificationSummary);
1489
- client.off("room.invite", onInvite);
1490
- client.off("room.join", onJoin);
1491
- client.off("room.event", onRoomEvent);
1492
- };
1493
- }
1494
- //#endregion
1495
- //#region extensions/matrix/src/matrix/monitor/ack-config.ts
1496
- function resolveMatrixAckReactionConfig(params) {
1497
- const matrixConfig = params.cfg.channels?.matrix;
1498
- const accountConfig = resolveMatrixAccountConfig({
1499
- cfg: params.cfg,
1500
- accountId: params.accountId
1501
- });
1502
- return {
1503
- ackReaction: resolveAckReaction(params.cfg, params.agentId, {
1504
- channel: "matrix",
1505
- accountId: params.accountId ?? void 0
1506
- }).trim(),
1507
- ackReactionScope: accountConfig.ackReactionScope ?? matrixConfig?.ackReactionScope ?? params.cfg.messages?.ackReactionScope ?? "group-mentions"
1508
- };
1509
- }
1510
- //#endregion
1511
- //#region extensions/matrix/src/matrix/monitor/preflight-audio.ts
1512
- function isMatrixAudioContent(params) {
1513
- if (params.msgtype === "m.audio") return true;
1514
- if (params.msgtype === "m.file" && typeof params.mimetype === "string") return params.mimetype.toLowerCase().startsWith("audio/");
1515
- return false;
1516
- }
1517
- const matrixPreflightAudio = createChannelPreflightAudio({
1518
- channel: "matrix",
1519
- isAudio: isMatrixAudioContent
1520
- });
1521
- async function resolveMatrixPreflightAudioTranscript(params) {
1522
- return await matrixPreflightAudio.resolve({
1523
- request: {
1524
- ctx: {
1525
- media: [{
1526
- path: params.mediaPath,
1527
- contentType: params.mediaContentType
1528
- }],
1529
- Provider: "matrix",
1530
- Surface: "matrix",
1531
- OriginatingChannel: "matrix",
1532
- OriginatingTo: params.originatingTo,
1533
- AccountId: params.accountId,
1534
- MessageThreadId: params.messageThreadId,
1535
- ChatType: params.chatType,
1536
- SessionKey: params.sessionKey
1537
- },
1538
- cfg: params.cfg
1539
- },
1540
- abortSignal: params.abortSignal
1541
- });
1542
- }
1543
- async function sendMatrixPreflightAudioTranscriptEcho(params) {
1544
- await matrixPreflightAudio.send(params);
1545
- }
1546
- //#endregion
1547
- //#region extensions/matrix/src/matrix/monitor/handler-helpers.ts
1548
- const MATRIX_TOOL_PROGRESS_MAX_CHARS = 300;
1549
- const MAX_TRACKED_SHARED_DM_CONTEXT_NOTICES = 512;
1550
- function resolveMatrixMentionPrecheckText(params) {
1551
- if (params.locationText?.trim()) return params.locationText.trim();
1552
- if (typeof params.content.body === "string" && params.content.body.trim()) return params.content.body.trim();
1553
- if (isPollStartType(params.eventType)) {
1554
- const parsed = parsePollStartContent(params.content);
1555
- if (parsed) return formatPollAsText(parsed);
1556
- }
1557
- return "";
1558
- }
1559
- function hasBundledMatrixReplacementRelation(event) {
1560
- const relations = event.unsigned?.["m.relations"];
1561
- if (!relations || typeof relations !== "object") return false;
1562
- return relations[RelationType.Replace] !== void 0;
1563
- }
1564
- function resolveMatrixInboundBodyText(params) {
1565
- if (params.mediaPlaceholder) return params.rawBody || params.mediaPlaceholder;
1566
- if (!params.mediaDownloadFailed || !params.hadMediaUrl) return params.rawBody;
1567
- if (params.mediaSizeLimitExceeded) return formatMatrixMediaTooLargeText({
1568
- body: params.rawBody,
1569
- filename: params.filename,
1570
- msgtype: params.msgtype
1571
- });
1572
- return formatMatrixMediaUnavailableText({
1573
- body: params.rawBody,
1574
- filename: params.filename,
1575
- msgtype: params.msgtype
1576
- });
1577
- }
1578
- function markTrackedRoomIfFirst(set, roomId) {
1579
- if (set.has(roomId)) return false;
1580
- set.add(roomId);
1581
- if (set.size > MAX_TRACKED_SHARED_DM_CONTEXT_NOTICES) {
1582
- const oldest = set.keys().next().value;
1583
- if (typeof oldest === "string") set.delete(oldest);
1584
- }
1585
- return true;
1586
- }
1587
- function resolveMatrixSharedDmContextNotice(params) {
1588
- if ((params.dmSessionScope ?? "per-user") === "per-room") return null;
1589
- if (params.sentRooms.has(params.roomId)) return null;
1590
- try {
1591
- const currentSession = resolveMatrixStoredSessionMeta(getSessionEntry({
1592
- storePath: params.storePath,
1593
- sessionKey: params.sessionKey
1594
- }));
1595
- if (!currentSession) return null;
1596
- if (currentSession.channel && currentSession.channel !== "matrix") return null;
1597
- if (currentSession.accountId && currentSession.accountId !== params.accountId) return null;
1598
- if (!currentSession.directUserId) return null;
1599
- if (!currentSession.roomId || currentSession.roomId === params.roomId) return null;
1600
- return ["This Matrix DM is sharing a session with another Matrix DM room.", "Set channels.matrix.dm.sessionScope to per-room to isolate each Matrix DM room."].join(" ");
1601
- } catch (err) {
1602
- params.logVerboseMessage(`matrix: failed checking shared DM session notice room=${params.roomId} (${String(err)})`);
1603
- return null;
1604
- }
1605
- }
1606
- function resolveMatrixPendingHistoryText(params) {
1607
- if (!params.mediaUrl) return params.mentionPrecheckText;
1608
- const body = typeof params.content.body === "string" ? params.content.body : void 0;
1609
- const filename = typeof params.content.filename === "string" ? params.content.filename : void 0;
1610
- const msgtype = typeof params.content.msgtype === "string" ? params.content.msgtype : void 0;
1611
- return formatMatrixMessageText({
1612
- body,
1613
- filename,
1614
- msgtype
1615
- }) ?? params.mentionPrecheckText;
1616
- }
1617
- function resolveMatrixInboundMediaContent(content) {
1618
- const file = content.file && typeof content.file === "object" ? content.file : void 0;
1619
- const info = content.info && typeof content.info === "object" ? content.info : void 0;
1620
- const body = normalizeOptionalString(content.body);
1621
- return {
1622
- url: normalizeOptionalString(content.url) ?? normalizeOptionalString(file?.url),
1623
- file,
1624
- body: body ?? "",
1625
- contentType: info?.mimetype,
1626
- sizeBytes: typeof info?.size === "number" ? info.size : void 0,
1627
- originalFilename: normalizeOptionalString(content.filename) ?? body
1628
- };
1629
- }
1630
- function isMatrixAudioMediaEnabled(cfg) {
1631
- return cfg.tools?.media?.audio?.enabled !== false;
1632
- }
1633
- function shouldDeferMatrixAudioPreflightForRoomIngress(params) {
1634
- if (!isMatrixAudioMediaEnabled(params.cfg)) return false;
1635
- const mediaContent = resolveMatrixInboundMediaContent(params.content);
1636
- return mediaContent.url?.startsWith("mxc://") === true && isMatrixAudioContent({
1637
- msgtype: typeof params.content.msgtype === "string" ? params.content.msgtype : void 0,
1638
- mimetype: mediaContent.contentType
1639
- });
1640
- }
1641
- function resolveMatrixAllowBotsMode(value) {
1642
- if (value === true) return "all";
1643
- if (value === "mentions") return "mentions";
1644
- return "off";
1645
- }
1646
- function formatMatrixToolProgressMarkdownCode(text) {
1647
- return `\`${(text.length <= MATRIX_TOOL_PROGRESS_MAX_CHARS ? text : `${truncateUtf16Safe(text, 299).trimEnd()}...`).replaceAll("`", "'")}\``;
1648
- }
1649
- //#endregion
1650
- //#region extensions/matrix/src/matrix/monitor/handler-runtime.ts
1651
- async function redactMatrixDraftEvent(client, roomId, draftEventId) {
1652
- return await client.redactEvent(roomId, draftEventId).then(() => true, () => false);
1653
- }
1654
- function buildMatrixFinalizedPreviewContent() {
1655
- return { [MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY]: true };
1656
- }
1657
- const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-h0gZ_-qk.mjs").then((n) => n.s));
1658
- const loadAcpBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/acp-binding-runtime"));
1659
- const loadSessionBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/session-binding-runtime"));
1660
- const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-CdAk_rh_.mjs"));
1661
- const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-DIFZDNrb.mjs"));
1662
- async function matrixTextWouldActivateMentions(client, text) {
1663
- const { resolveMatrixMentionsForBody } = await loadMatrixSendModule();
1664
- const mentions = await resolveMatrixMentionsForBody({
1665
- client,
1666
- body: text
1667
- });
1668
- return mentions.room === true || (mentions.user_ids?.length ?? 0) > 0;
1669
- }
1670
- //#endregion
1671
- //#region extensions/matrix/src/matrix/monitor/context-summary.ts
1672
- const MAX_CONTEXT_BODY_LENGTH = 500;
1673
- function truncateMatrixContextBody(value) {
1674
- if (value.length <= MAX_CONTEXT_BODY_LENGTH) return value;
1675
- return `${sliceUtf16Safe(value, 0, 497)}...`;
1676
- }
1677
- function summarizeMatrixMessageContextEvent(event) {
1678
- if (isPollStartType(event.type)) {
1679
- const pollSummary = parsePollStartContent(event.content);
1680
- if (pollSummary) return formatPollAsText(pollSummary);
1681
- }
1682
- const content = resolveMatrixReplacementContent(event) ?? event.content;
1683
- return formatMatrixMessageText({
1684
- body: readStringValue(content.body),
1685
- filename: readStringValue(content.filename),
1686
- msgtype: normalizeOptionalString(content.msgtype)
1687
- });
1688
- }
1689
- //#endregion
1690
- //#region extensions/matrix/src/matrix/monitor/reply-context.ts
1691
- const MAX_CACHED_REPLY_CONTEXTS = 256;
1692
- function summarizeMatrixReplyEvent(event) {
1693
- const body = summarizeMatrixMessageContextEvent(event);
1694
- return body ? truncateMatrixContextBody(body) : void 0;
1695
- }
1696
- /**
1697
- * Creates a cached resolver that fetches the body and sender of a replied-to
1698
- * Matrix event. This allows the agent to see the content of the message being
1699
- * replied to, not just its event ID.
1700
- */
1701
- function createMatrixReplyContextResolver(params) {
1702
- const cache = /* @__PURE__ */ new Map();
1703
- const remember = (key, value) => {
1704
- setBoundedMap(cache, key, value, MAX_CACHED_REPLY_CONTEXTS);
1705
- return value;
1706
- };
1707
- return async (input) => {
1708
- const cacheKey = `${input.roomId}:${input.eventId}`;
1709
- const cached = cache.get(cacheKey);
1710
- if (cached) {
1711
- cache.delete(cacheKey);
1712
- cache.set(cacheKey, cached);
1713
- return cached;
1714
- }
1715
- const event = await params.client.getEvent(input.roomId, input.eventId).catch((err) => {
1716
- params.logVerboseMessage(`matrix: failed resolving reply context room=${input.roomId} id=${input.eventId}: ${String(err)}`);
1717
- return null;
1718
- });
1719
- if (!event) return {};
1720
- const rawEvent = event;
1721
- if (rawEvent.unsigned?.redacted_because) return remember(cacheKey, {});
1722
- const replyToBody = summarizeMatrixReplyEvent(rawEvent);
1723
- if (!replyToBody) return remember(cacheKey, {});
1724
- const senderId = normalizeOptionalString(rawEvent.sender);
1725
- const senderName = senderId && await params.getMemberDisplayName(input.roomId, senderId).catch(() => void 0);
1726
- return remember(cacheKey, {
1727
- replyToBody,
1728
- replyToSender: senderName ?? senderId,
1729
- replyToSenderId: senderId
1730
- });
1731
- };
1732
- }
1733
- //#endregion
1734
- //#region extensions/matrix/src/matrix/monitor/thread-context.ts
1735
- const MAX_TRACKED_THREAD_STARTERS = 256;
1736
- function summarizeMatrixThreadStarterEvent(event) {
1737
- const body = summarizeMatrixMessageContextEvent(event);
1738
- if (body) return truncateMatrixContextBody(body);
1739
- const content = event.content;
1740
- const msgtype = normalizeOptionalString(content.msgtype);
1741
- if (msgtype) return `Matrix ${msgtype} message`;
1742
- const eventType = normalizeOptionalString(event.type);
1743
- return eventType ? `Matrix ${eventType} event` : void 0;
1744
- }
1745
- function formatMatrixThreadStarterBody(params) {
1746
- const senderLabel = params.senderName ?? params.senderId ?? "unknown sender";
1747
- const lines = [`Matrix thread root ${params.threadRootId} from ${senderLabel}:`];
1748
- if (params.summary) lines.push(params.summary);
1749
- return lines.join("\n");
1750
- }
1751
- function createMatrixThreadContextResolver(params) {
1752
- const cache = /* @__PURE__ */ new Map();
1753
- const remember = (key, value) => {
1754
- setBoundedMap(cache, key, value, MAX_TRACKED_THREAD_STARTERS);
1755
- return value;
1756
- };
1757
- return async (input) => {
1758
- const cacheKey = `${input.roomId}:${input.threadRootId}`;
1759
- const cached = cache.get(cacheKey);
1760
- if (cached) return cached;
1761
- const rootEvent = await params.client.getEvent(input.roomId, input.threadRootId).catch((err) => {
1762
- params.logVerboseMessage(`matrix: failed resolving thread root room=${input.roomId} id=${input.threadRootId}: ${String(err)}`);
1763
- return null;
1764
- });
1765
- if (!rootEvent) return { threadStarterBody: `Matrix thread root ${input.threadRootId}` };
1766
- const rawEvent = rootEvent;
1767
- const senderId = normalizeOptionalString(rawEvent.sender);
1768
- const senderName = senderId && await params.getMemberDisplayName(input.roomId, senderId).catch(() => void 0);
1769
- const senderLabel = senderName ?? senderId;
1770
- const summary = summarizeMatrixThreadStarterEvent(rawEvent);
1771
- return remember(cacheKey, {
1772
- threadStarterBody: formatMatrixThreadStarterBody({
1773
- threadRootId: input.threadRootId,
1774
- senderId,
1775
- senderName,
1776
- summary
1777
- }),
1778
- senderId,
1779
- senderLabel,
1780
- summary
1781
- });
1782
- };
1783
- }
1784
- //#endregion
1785
- //#region extensions/matrix/src/matrix/monitor/handler-context.ts
1786
- async function resolveMatrixInboundContext(config) {
1787
- const { handler, ingress, roomId, event, eventTs, resolveThreadContext, resolveReplyContext, senderId, sharedDmContextNoticeRooms } = config;
1788
- const { client, core, accountId, runtime, logVerboseMessage, groupPolicy, getRoomInfo, historyLimit, dmSessionScope, resolveStorePath: resolveStorePathImpl, createChannelInboundEnvelopeBuilder: createChannelInboundEnvelopeBuilderImpl, finalizeInboundContext } = handler;
1789
- const { cfg, resolveMessageIngress, route: _route, isDirectMessage, isRoom, effectiveRoomUsers, effectiveGroupAllowFrom, threadRootId, thread, senderName, bodyText, commandBodyText, roomConfig, messageId, inboundHistory, wasMentioned, effectiveWasMentioned, shouldBypassMention, canDetectMention, shouldRequireMention, commandAuthorized, locationPayload, media, preflightAudioTranscript, hasExplicitSessionBinding } = ingress;
1790
- const contextVisibilityMode = resolveChannelContextVisibilityMode({
1791
- cfg,
1792
- channel: "matrix",
1793
- accountId
1794
- });
1795
- const replyToEventId = resolveMatrixReplyToEventId(event.content);
1796
- const threadTarget = thread.threadId;
1797
- const isRoomContextSenderAllowed = (contextSenderId) => {
1798
- if (!isRoom || !contextSenderId) return true;
1799
- if (effectiveRoomUsers.length > 0) return resolveMatrixAllowListMatch({
1800
- allowList: effectiveRoomUsers,
1801
- userId: contextSenderId
1802
- }).allowed;
1803
- if (groupPolicy === "allowlist" && effectiveGroupAllowFrom.length > 0) return resolveMatrixAllowListMatch({
1804
- allowList: effectiveGroupAllowFrom,
1805
- userId: contextSenderId
1806
- }).allowed;
1807
- return true;
1808
- };
1809
- const shouldIncludeRoomContextSender = (kind, contextSenderId) => evaluateSupplementalContextVisibility({
1810
- mode: contextVisibilityMode,
1811
- kind,
1812
- senderAllowed: isRoomContextSenderAllowed(contextSenderId)
1813
- }).include;
1814
- let threadContext = threadRootId ? await resolveThreadContext({
1815
- roomId,
1816
- threadRootId
1817
- }) : void 0;
1818
- if (threadContext?.senderId && !shouldIncludeRoomContextSender("thread", threadContext.senderId)) {
1819
- logVerboseMessage(`matrix: drop thread root context (mode=${contextVisibilityMode})`);
1820
- threadContext = void 0;
1821
- }
1822
- let replyContext;
1823
- if (replyToEventId && replyToEventId === threadRootId && threadContext?.summary) replyContext = {
1824
- replyToBody: threadContext.summary,
1825
- replyToSender: threadContext.senderLabel,
1826
- replyToSenderId: threadContext.senderId
1827
- };
1828
- else replyContext = replyToEventId ? await resolveReplyContext({
1829
- roomId,
1830
- eventId: replyToEventId
1831
- }) : void 0;
1832
- const replySenderAllowed = !replyContext?.replyToSenderId || isRoomContextSenderAllowed(replyContext.replyToSenderId);
1833
- const roomName = (isRoom ? await getRoomInfo(roomId) : void 0)?.name;
1834
- const envelopeFrom = isDirectMessage ? senderName : roomName ?? roomId;
1835
- const textWithId = `${bodyText}\n[matrix event id: ${messageId} room: ${roomId}]`;
1836
- const storePath = resolveStorePathImpl(cfg.session?.store, { agentId: _route.agentId });
1837
- const buildEnvelope = createChannelInboundEnvelopeBuilderImpl({
1838
- cfg,
1839
- route: _route
1840
- });
1841
- const sharedDmNoticeSessionKey = threadTarget ? _route.mainSessionKey || _route.sessionKey : _route.sessionKey;
1842
- const sharedDmContextNotice = isDirectMessage ? hasExplicitSessionBinding ? null : resolveMatrixSharedDmContextNotice({
1843
- storePath,
1844
- sessionKey: sharedDmNoticeSessionKey,
1845
- roomId,
1846
- accountId: _route.accountId,
1847
- dmSessionScope,
1848
- sentRooms: sharedDmContextNoticeRooms,
1849
- logVerboseMessage
1850
- }) : null;
1851
- const body = buildEnvelope({
1852
- channel: "Matrix",
1853
- from: envelopeFrom,
1854
- timestamp: eventTs ?? void 0,
1855
- body: textWithId
1856
- });
1857
- const groupSystemPrompt = normalizeOptionalString(roomConfig?.systemPrompt);
1858
- const quoteHidden = Boolean(replyContext && !evaluateSupplementalContextVisibility({
1859
- mode: contextVisibilityMode,
1860
- kind: "quote",
1861
- senderAllowed: replySenderAllowed
1862
- }).include);
1863
- const channelIngress = await resolveMessageIngress({
1864
- agentId: _route.agentId,
1865
- sessionKey: _route.sessionKey,
1866
- messageId,
1867
- inboundEventKind: "user_request"
1868
- }, {
1869
- kind: isDirectMessage ? "direct" : "channel",
1870
- id: roomId,
1871
- threadId: threadTarget
1872
- });
1873
- const ctxPayload = core.channel.inbound.buildContext({
1874
- channelIngress,
1875
- channel: "matrix",
1876
- contextVisibility: contextVisibilityMode,
1877
- finalize: finalizeInboundContext,
1878
- supplemental: {
1879
- quote: replyContext ? {
1880
- id: threadTarget ? void 0 : replyToEventId ?? void 0,
1881
- body: replyContext.replyToBody,
1882
- sender: replyContext.replyToSender,
1883
- senderAllowed: replySenderAllowed
1884
- } : void 0,
1885
- thread: {
1886
- starterBody: threadContext?.threadStarterBody,
1887
- senderAllowed: threadContext ? true : void 0
1888
- },
1889
- groupSystemPrompt: isRoom ? groupSystemPrompt : void 0
1890
- },
1891
- media: await toInboundMediaFactsWithMetadata(media ? [{
1892
- path: media.path,
1893
- url: media.path,
1894
- contentType: media.contentType,
1895
- transcribed: preflightAudioTranscript !== void 0
1896
- }] : void 0),
1897
- messageId,
1898
- timestamp: eventTs ?? void 0,
1899
- from: isDirectMessage ? `matrix:${senderId}` : `matrix:channel:${roomId}`,
1900
- sender: {
1901
- id: senderId,
1902
- name: senderName,
1903
- username: senderId.split(":")[0]?.replace(/^@/, "")
1904
- },
1905
- conversation: {
1906
- kind: isDirectMessage ? "direct" : "channel",
1907
- id: roomId,
1908
- label: envelopeFrom,
1909
- nativeChannelId: roomId,
1910
- threadId: threadTarget
1911
- },
1912
- route: {
1913
- agentId: _route.agentId,
1914
- dmScope: _route.dmScope,
1915
- accountId: _route.accountId,
1916
- routeSessionKey: _route.sessionKey,
1917
- parentSessionKey: threadTarget && _route.matchedBy !== "binding.channel" ? _route.mainSessionKey : void 0
1918
- },
1919
- reply: {
1920
- to: `room:${roomId}`,
1921
- replyToId: threadTarget ? void 0 : replyToEventId ?? void 0,
1922
- messageThreadId: threadTarget,
1923
- nativeChannelId: roomId
1924
- },
1925
- message: {
1926
- body,
1927
- rawBody: bodyText,
1928
- commandBody: commandBodyText,
1929
- bodyForAgent: bodyText,
1930
- inboundHistory: inboundHistory && inboundHistory.length > 0 ? inboundHistory : void 0
1931
- },
1932
- sessionTranscript: { historyLimit: isRoom ? historyLimit : 0 },
1933
- access: {
1934
- ...isRoom ? { mentions: {
1935
- canDetectMention: true,
1936
- wasMentioned,
1937
- requireMention: shouldRequireMention
1938
- } } : {},
1939
- commands: { authorized: commandAuthorized }
1940
- },
1941
- extra: {
1942
- GroupSubject: isRoom ? roomName ?? roomId : void 0,
1943
- GroupId: isRoom ? roomId : void 0,
1944
- ...locationPayload?.context,
1945
- CommandSource: "text",
1946
- NativeDirectUserId: isDirectMessage ? senderId : void 0
1947
- }
1948
- });
1949
- if (quoteHidden) logVerboseMessage(`matrix: drop reply context (mode=${contextVisibilityMode})`);
1950
- logVerboseMessage(`matrix inbound: room=${roomId} from=${senderId} preview="${truncateUtf16Safe(bodyText, 200).replace(/\n/g, "\\n")}"`);
1951
- const replyTarget = ctxPayload.To;
1952
- if (!replyTarget) {
1953
- runtime.error?.("matrix: missing reply target");
1954
- return null;
1955
- }
1956
- const { ackReaction, ackReactionScope: ackScope } = resolveMatrixAckReactionConfig({
1957
- cfg,
1958
- agentId: _route.agentId,
1959
- accountId
1960
- });
1961
- const shouldAckReaction = () => Boolean(ackReaction && core.channel.reactions.shouldAckReaction({
1962
- scope: ackScope,
1963
- isDirect: isDirectMessage,
1964
- isGroup: isRoom,
1965
- isMentionableGroup: isRoom,
1966
- canDetectMention,
1967
- effectiveWasMentioned,
1968
- shouldBypassMention
1969
- }));
1970
- if (shouldAckReaction() && messageId) loadMatrixSendModule().then(({ reactMatrixMessage }) => reactMatrixMessage(roomId, messageId, ackReaction, client)).catch((err) => {
1971
- logVerboseMessage(`matrix react failed for room ${roomId}: ${String(err)}`);
1972
- });
1973
- if (messageId) loadMatrixSendModule().then(({ sendReadReceiptMatrix }) => sendReadReceiptMatrix(roomId, messageId, client)).catch((err) => {
1974
- logVerboseMessage(`matrix: read receipt failed room=${roomId} id=${messageId}: ${String(err)}`);
1975
- });
1976
- return {
1977
- replyToEventId,
1978
- threadTarget,
1979
- storePath,
1980
- ctxPayload,
1981
- replyTarget,
1982
- sharedDmContextNotice
1983
- };
1984
- }
1985
- //#endregion
1986
- //#region extensions/matrix/src/matrix/monitor/handler-draft-controller.ts
1987
- async function createMatrixDraftController(params) {
1988
- const { streaming, previewToolProgressEnabled, replyToMode, messageId, threadTarget, accountConfig, cfg, accountId, roomId, client, logVerboseMessage } = params;
1989
- let draftDisposition = "active";
1990
- const draftStreamingEnabled = streaming !== "off";
1991
- const quietDraftStreaming = streaming === "quiet" || streaming === "progress";
1992
- const progressDraftStreaming = streaming === "progress";
1993
- const draftReplyToId = replyToMode !== "off" && !threadTarget ? messageId : void 0;
1994
- const draftStream = draftStreamingEnabled ? await loadMatrixDraftStream().then(({ createMatrixDraftStream }) => createMatrixDraftStream({
1995
- roomId,
1996
- client,
1997
- cfg,
1998
- mode: quietDraftStreaming ? "quiet" : "partial",
1999
- threadId: threadTarget,
2000
- replyToId: draftReplyToId,
2001
- preserveReplyId: replyToMode === "all",
2002
- accountId,
2003
- log: logVerboseMessage
2004
- })) : void 0;
2005
- const shouldSuppressDefaultToolProgressMessages = Boolean(draftStream) && (Boolean(draftStream) && previewToolProgressEnabled || params.streaming === "progress");
2006
- let currentDraftMessageGeneration = 0;
2007
- let currentDraftBlockOffset = 0;
2008
- let latestDraftFullText = "";
2009
- const pendingDraftBoundaries = [];
2010
- const latestQueuedDraftBoundaryOffsets = /* @__PURE__ */ new Map();
2011
- let currentDraftReplyToId = draftReplyToId;
2012
- const progressConfigEntry = accountConfig ?? cfg.channels?.matrix;
2013
- const progressSeed = `${accountId}:${roomId}`;
2014
- const progressDraft = createChannelProgressDraftCompositor({
2015
- entry: progressConfigEntry,
2016
- mode: streaming === "quiet" ? "partial" : streaming,
2017
- active: Boolean(draftStream),
2018
- seed: progressSeed,
2019
- formatLine: formatMatrixToolProgressMarkdownCode,
2020
- update: async (text, options) => {
2021
- const previewText = text.replace(/^• /gmu, "- ");
2022
- if (!draftStream) return false;
2023
- draftStream.update(previewText);
2024
- if (options?.flush) await draftStream.flush();
2025
- return Boolean(draftStream.eventId());
2026
- },
2027
- deleteCurrent: () => draftStream?.deleteCurrentMessage()
2028
- });
2029
- const buildPreviewToolProgressReplyOptions = () => {
2030
- if (!shouldSuppressDefaultToolProgressMessages) return {};
2031
- return {
2032
- suppressDefaultToolProgressMessages: true,
2033
- onToolStart: async (payload) => {
2034
- return await progressDraft.pushToolEvent(payload);
2035
- },
2036
- onItemEvent: async (payload) => {
2037
- return await progressDraft.pushItemEvent(payload);
2038
- },
2039
- onPlanUpdate: async (payload) => {
2040
- if (payload.phase !== "update") return false;
2041
- return await progressDraft.pushPlanProgress(payload.steps, {
2042
- explanation: payload.explanation,
2043
- explanationFormat: payload.explanationFormat
2044
- });
2045
- },
2046
- onApprovalEvent: async (payload) => {
2047
- return await progressDraft.pushApprovalEvent(payload);
2048
- },
2049
- onCommandOutput: async (payload) => {
2050
- return await progressDraft.pushCommandOutputEvent(payload);
2051
- },
2052
- onPatchSummary: async (payload) => {
2053
- return await progressDraft.pushPatchEvent(payload);
2054
- }
2055
- };
2056
- };
2057
- const getDisplayableDraftText = () => {
2058
- const nextDraftBoundaryOffset = pendingDraftBoundaries.find((boundary) => boundary.messageGeneration === currentDraftMessageGeneration)?.endOffset;
2059
- if (nextDraftBoundaryOffset === void 0) return latestDraftFullText.slice(currentDraftBlockOffset);
2060
- return latestDraftFullText.slice(currentDraftBlockOffset, nextDraftBoundaryOffset);
2061
- };
2062
- const updateDraftFromLatestFullText = () => {
2063
- const blockText = getDisplayableDraftText();
2064
- if (blockText) draftStream?.update(blockText);
2065
- };
2066
- const queueDraftBlockBoundary = (payload, context) => {
2067
- const payloadTextLength = payload.text?.length ?? 0;
2068
- const messageGeneration = context?.assistantMessageIndex ?? currentDraftMessageGeneration;
2069
- const nextDraftBoundaryOffset = (latestQueuedDraftBoundaryOffsets.get(messageGeneration) ?? 0) + payloadTextLength;
2070
- latestQueuedDraftBoundaryOffsets.set(messageGeneration, nextDraftBoundaryOffset);
2071
- pendingDraftBoundaries.push({
2072
- messageGeneration,
2073
- endOffset: nextDraftBoundaryOffset
2074
- });
2075
- };
2076
- const advanceDraftBlockBoundary = (options) => {
2077
- const completedBoundary = pendingDraftBoundaries.shift();
2078
- if (completedBoundary) {
2079
- if (!pendingDraftBoundaries.some((entry) => entry.messageGeneration === completedBoundary.messageGeneration)) latestQueuedDraftBoundaryOffsets.delete(completedBoundary.messageGeneration);
2080
- if (completedBoundary.messageGeneration === currentDraftMessageGeneration) currentDraftBlockOffset = completedBoundary.endOffset;
2081
- return;
2082
- }
2083
- if (options?.fallbackToLatestEnd) currentDraftBlockOffset = latestDraftFullText.length;
2084
- };
2085
- const resetDraftBlockOffsets = () => {
2086
- currentDraftMessageGeneration += 1;
2087
- currentDraftBlockOffset = 0;
2088
- latestDraftFullText = "";
2089
- };
2090
- const resetDraftDeliveryState = async () => {
2091
- await draftStream?.discardPending();
2092
- draftStream?.reset();
2093
- draftDisposition = "active";
2094
- currentDraftMessageGeneration = 0;
2095
- currentDraftBlockOffset = 0;
2096
- latestDraftFullText = "";
2097
- pendingDraftBoundaries.length = 0;
2098
- latestQueuedDraftBoundaryOffsets.clear();
2099
- currentDraftReplyToId = draftReplyToId;
2100
- progressDraft.beginNewTurn({ force: true });
2101
- };
2102
- return {
2103
- draftStream,
2104
- cancelProgressDraft: () => progressDraft.cancel(),
2105
- buildPreviewToolProgressReplyOptions,
2106
- queueDraftBlockBoundary,
2107
- advanceDraftBlockBoundary,
2108
- resetDraftBlockOffsets,
2109
- beginAssistantMessage: () => progressDraft.beginAssistantMessage(),
2110
- resetDraftDeliveryState,
2111
- updateDraftFromLatestFullText,
2112
- draftDisposition: () => draftDisposition,
2113
- beginDraftGeneration: () => {
2114
- draftDisposition = "active";
2115
- progressDraft.resetActivity();
2116
- },
2117
- markDraftConsumed: () => {
2118
- draftDisposition = "consumed";
2119
- },
2120
- markDraftRetained: () => {
2121
- draftDisposition = "retained";
2122
- },
2123
- currentReplyToId: () => currentDraftReplyToId,
2124
- setCurrentReplyToId: (replyToId) => {
2125
- currentDraftReplyToId = replyToId;
2126
- },
2127
- resetReplyToIdForNextBlock: () => {
2128
- currentDraftReplyToId = replyToMode === "all" ? draftReplyToId : void 0;
2129
- },
2130
- onPartialReply: (text) => {
2131
- if (progressDraftStreaming) return false;
2132
- latestDraftFullText = text;
2133
- if (text.trim()) progressDraft.resetActivity({ suppressed: true });
2134
- updateDraftFromLatestFullText();
2135
- return false;
2136
- }
2137
- };
2138
- }
2139
- //#endregion
2140
- //#region extensions/matrix/src/matrix/monitor/room-history.ts
2141
- /** Maximum entries retained per room (hard cap to bound memory). */
2142
- const DEFAULT_MAX_QUEUE_SIZE = 200;
2143
- /** Maximum number of rooms to retain queues for (FIFO eviction beyond this). */
2144
- const DEFAULT_MAX_ROOM_QUEUES = 1e3;
2145
- /** Maximum number of (agentId, roomId) watermark entries to retain. */
2146
- const MAX_WATERMARK_ENTRIES = 5e3;
2147
- /** Maximum prepared trigger snapshots retained per room for retry reuse. */
2148
- const MAX_PREPARED_TRIGGER_ENTRIES = 500;
2149
- /** Maximum thread queues retained per room (FIFO eviction beyond this). */
2150
- const MAX_THREAD_QUEUES_PER_ROOM = 200;
2151
- function createRoomHistoryTracker(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE, maxRoomQueues = DEFAULT_MAX_ROOM_QUEUES, maxWatermarkEntries = MAX_WATERMARK_ENTRIES, maxPreparedTriggerEntries = MAX_PREPARED_TRIGGER_ENTRIES) {
2152
- const roomQueues = /* @__PURE__ */ new Map();
2153
- /** Maps `{agentId, roomId, scope}` → absolute consumed-up-to index */
2154
- const agentWatermarks = /* @__PURE__ */ new Map();
2155
- let nextQueueGeneration = 1;
2156
- function clearRoomWatermarks(roomId) {
2157
- for (const key of agentWatermarks.keys()) if (JSON.parse(key)?.roomId === roomId) agentWatermarks.delete(key);
2158
- }
2159
- function clearThreadWatermarks(roomId, threadRootId) {
2160
- for (const key of agentWatermarks.keys()) {
2161
- const parsed = JSON.parse(key);
2162
- if (parsed?.roomId === roomId && parsed.scope === threadRootId) agentWatermarks.delete(key);
2163
- }
2164
- }
2165
- function createHistoryQueue() {
2166
- return {
2167
- entries: [],
2168
- baseIndex: 0,
2169
- generation: nextQueueGeneration++,
2170
- preparedTriggers: /* @__PURE__ */ new Map()
2171
- };
2172
- }
2173
- function getOrCreateQueue(roomId) {
2174
- let queue = roomQueues.get(roomId);
2175
- if (!queue) {
2176
- queue = {
2177
- ...createHistoryQueue(),
2178
- threadQueues: /* @__PURE__ */ new Map()
2179
- };
2180
- roomQueues.set(roomId, queue);
2181
- if (roomQueues.size > maxRoomQueues) {
2182
- const oldest = roomQueues.keys().next().value;
2183
- if (oldest !== void 0) {
2184
- roomQueues.delete(oldest);
2185
- clearRoomWatermarks(oldest);
2186
- }
2187
- }
2188
- }
2189
- return queue;
2190
- }
2191
- function getOrCreateThreadQueue(roomId, roomQueue, threadRootId) {
2192
- let queue = roomQueue.threadQueues.get(threadRootId);
2193
- if (!queue) {
2194
- queue = createHistoryQueue();
2195
- roomQueue.threadQueues.set(threadRootId, queue);
2196
- if (roomQueue.threadQueues.size > MAX_THREAD_QUEUES_PER_ROOM) {
2197
- const oldest = roomQueue.threadQueues.keys().next().value;
2198
- if (oldest !== void 0) {
2199
- roomQueue.threadQueues.delete(oldest);
2200
- clearThreadWatermarks(roomId, oldest);
2201
- }
2202
- }
2203
- }
2204
- return queue;
2205
- }
2206
- function getScopedQueue(roomId, threadRootId) {
2207
- const roomQueue = getOrCreateQueue(roomId);
2208
- return threadRootId ? getOrCreateThreadQueue(roomId, roomQueue, threadRootId) : roomQueue;
2209
- }
2210
- function findScopedQueue(roomId, threadRootId) {
2211
- const roomQueue = roomQueues.get(roomId);
2212
- if (!roomQueue) return;
2213
- return threadRootId ? roomQueue.threadQueues.get(threadRootId) : roomQueue;
2214
- }
2215
- function appendToQueue(queue, entry) {
2216
- queue.entries.push(entry);
2217
- if (queue.entries.length > maxQueueSize) {
2218
- const overflow = queue.entries.length - maxQueueSize;
2219
- queue.entries.splice(0, overflow);
2220
- queue.baseIndex += overflow;
2221
- }
2222
- return {
2223
- snapshotIdx: queue.baseIndex + queue.entries.length,
2224
- queueGeneration: queue.generation
2225
- };
2226
- }
2227
- function wmKey(agentId, roomId, threadRootId) {
2228
- return JSON.stringify({
2229
- agentId,
2230
- roomId,
2231
- scope: threadRootId ?? "main"
2232
- });
2233
- }
2234
- function preparedTriggerKey(agentId, messageId) {
2235
- if (!messageId?.trim()) return null;
2236
- return `${agentId}:${messageId.trim()}`;
2237
- }
2238
- function rememberWatermark(key, snapshotIdx) {
2239
- const nextSnapshotIdx = Math.max(agentWatermarks.get(key) ?? 0, snapshotIdx);
2240
- if (agentWatermarks.has(key)) agentWatermarks.delete(key);
2241
- agentWatermarks.set(key, nextSnapshotIdx);
2242
- if (agentWatermarks.size > maxWatermarkEntries) {
2243
- const oldest = agentWatermarks.keys().next().value;
2244
- if (oldest !== void 0) agentWatermarks.delete(oldest);
2245
- }
2246
- }
2247
- function markConsumedAfterReservedGap(queue, key, firstReservedRel, snapshotIdx) {
2248
- const endRel = Math.min(snapshotIdx - queue.baseIndex, queue.entries.length);
2249
- for (let rel = firstReservedRel + 1; rel < endRel; rel += 1) {
2250
- const entry = queue.entries[rel];
2251
- if (!entry || entry.reserved || entry.discarded) continue;
2252
- entry.consumedBy ??= /* @__PURE__ */ new Set();
2253
- entry.consumedBy.add(key);
2254
- }
2255
- }
2256
- function rememberPreparedTrigger(queue, retryKey, prepared) {
2257
- if (queue.preparedTriggers.has(retryKey)) queue.preparedTriggers.delete(retryKey);
2258
- queue.preparedTriggers.set(retryKey, prepared);
2259
- if (queue.preparedTriggers.size > maxPreparedTriggerEntries) {
2260
- const oldest = queue.preparedTriggers.keys().next().value;
2261
- if (oldest !== void 0) queue.preparedTriggers.delete(oldest);
2262
- }
2263
- return prepared;
2264
- }
2265
- function computePendingHistory(queue, agentId, roomId, limit, endAbsExclusive = queue.baseIndex + queue.entries.length, startAbsOverride, threadRootId) {
2266
- if (limit <= 0 || queue.entries.length === 0) return [];
2267
- const wm = startAbsOverride ?? agentWatermarks.get(wmKey(agentId, roomId, threadRootId)) ?? 0;
2268
- const startRel = Math.max(wm, queue.baseIndex) - queue.baseIndex;
2269
- const endRel = Math.max(startRel, Math.min(endAbsExclusive - queue.baseIndex, queue.entries.length));
2270
- const available = queue.entries.slice(startRel, endRel).filter((entry) => !entry.discarded && !entry.reserved && !entry.consumedBy?.has(wmKey(agentId, roomId, threadRootId)));
2271
- return available.length > limit ? available.slice(-limit) : available;
2272
- }
2273
- function prepareTriggerInternal(agentId, roomId, limit, entry, threadRootId) {
2274
- const queue = getScopedQueue(roomId, threadRootId);
2275
- const retryKey = preparedTriggerKey(agentId, entry.messageId);
2276
- if (retryKey) {
2277
- const prepared = queue.preparedTriggers.get(retryKey);
2278
- if (prepared) return rememberPreparedTrigger(queue, retryKey, prepared);
2279
- }
2280
- const prepared = {
2281
- history: computePendingHistory(queue, agentId, roomId, limit, void 0, void 0, threadRootId),
2282
- ...appendToQueue(queue, entry)
2283
- };
2284
- if (retryKey) return rememberPreparedTrigger(queue, retryKey, prepared);
2285
- return prepared;
2286
- }
2287
- return {
2288
- recordPending(roomId, entry, threadRootId) {
2289
- appendToQueue(getScopedQueue(roomId, threadRootId), entry);
2290
- },
2291
- reservePending(agentId, roomId, entry, threadRootId) {
2292
- const snapshot = appendToQueue(getScopedQueue(roomId, threadRootId), {
2293
- ...entry,
2294
- reserved: true
2295
- });
2296
- return {
2297
- ...snapshot,
2298
- slotIdx: snapshot.snapshotIdx - 1,
2299
- watermarkIdx: agentWatermarks.get(wmKey(agentId, roomId, threadRootId)) ?? 0
2300
- };
2301
- },
2302
- finalizePending(roomId, slot, entry, threadRootId) {
2303
- const queue = findScopedQueue(roomId, threadRootId);
2304
- if (!queue || queue.generation !== slot.queueGeneration) return;
2305
- const rel = slot.slotIdx - queue.baseIndex;
2306
- if (rel < 0 || rel >= queue.entries.length) return;
2307
- queue.entries[rel] = entry;
2308
- },
2309
- discardPending(roomId, slot, threadRootId) {
2310
- const queue = findScopedQueue(roomId, threadRootId);
2311
- if (!queue || queue.generation !== slot.queueGeneration) return;
2312
- const rel = slot.slotIdx - queue.baseIndex;
2313
- if (rel < 0 || rel >= queue.entries.length) return;
2314
- queue.entries[rel] = {
2315
- sender: "",
2316
- body: "",
2317
- messageId: void 0,
2318
- discarded: true
2319
- };
2320
- },
2321
- prepareTrigger(agentId, roomId, limit, entry, threadRootId) {
2322
- return prepareTriggerInternal(agentId, roomId, limit, entry, threadRootId);
2323
- },
2324
- prepareReservedTrigger(agentId, roomId, limit, slot, entry, threadRootId) {
2325
- const queue = findScopedQueue(roomId, threadRootId);
2326
- if (!queue || queue.generation !== slot.queueGeneration) return prepareTriggerInternal(agentId, roomId, limit, entry, threadRootId);
2327
- const rel = slot.slotIdx - queue.baseIndex;
2328
- if (rel < 0 || rel >= queue.entries.length) return prepareTriggerInternal(agentId, roomId, limit, entry, threadRootId);
2329
- const retryKey = preparedTriggerKey(agentId, entry.messageId);
2330
- if (retryKey) {
2331
- const prepared = queue.preparedTriggers.get(retryKey);
2332
- if (prepared) {
2333
- queue.entries[rel] = {
2334
- sender: "",
2335
- body: "",
2336
- messageId: void 0,
2337
- discarded: true
2338
- };
2339
- return rememberPreparedTrigger(queue, retryKey, prepared);
2340
- }
2341
- }
2342
- queue.entries[rel] = entry;
2343
- const prepared = {
2344
- history: computePendingHistory(queue, agentId, roomId, limit, slot.slotIdx, slot.watermarkIdx, threadRootId),
2345
- snapshotIdx: slot.slotIdx + 1,
2346
- queueGeneration: queue.generation
2347
- };
2348
- if (retryKey) return rememberPreparedTrigger(queue, retryKey, prepared);
2349
- return prepared;
2350
- },
2351
- consumeHistory(agentId, roomId, snapshot, messageId, threadRootId) {
2352
- const key = wmKey(agentId, roomId, threadRootId);
2353
- const queue = findScopedQueue(roomId, threadRootId);
2354
- if (!queue) {
2355
- agentWatermarks.delete(key);
2356
- return;
2357
- }
2358
- if (queue.generation !== snapshot.queueGeneration) return;
2359
- const firstReservedRel = queue.entries.findIndex((entry, index) => entry.reserved === true && queue.baseIndex + index < snapshot.snapshotIdx);
2360
- if (firstReservedRel >= 0) markConsumedAfterReservedGap(queue, key, firstReservedRel, snapshot.snapshotIdx);
2361
- rememberWatermark(key, firstReservedRel >= 0 ? queue.baseIndex + firstReservedRel : snapshot.snapshotIdx);
2362
- const retryKey = preparedTriggerKey(agentId, messageId);
2363
- if (retryKey) queue.preparedTriggers.delete(retryKey);
2364
- }
2365
- };
2366
- }
2367
- //#endregion
2368
- //#region extensions/matrix/src/matrix/monitor/handler-ingress-access.ts
2369
- async function resolveMatrixIngressAccess(config) {
2370
- const { handler, params: paramsLocal, roomId, event, eventTs, senderId, isReactionEvent, readStoreAllowFrom, shouldSendPairingReply, resolveLiveAccountAllowlists, roomHistoryTracker, commitInboundEventIfClaimed } = config;
2371
- const { core, cfg, accountId, accountConfig, client, logVerboseMessage, groupPolicy, dmEnabled, dmPolicy, dmThreadReplies, threadReplies, roomsConfig, accountAllowBots, configuredBotUserIds, needsRoomAliasesForConfig, getRoomInfo, getMemberDisplayName } = handler;
2372
- const content = paramsLocal.content;
2373
- const isDirectMessage = paramsLocal.isDirectMessage;
2374
- const isRoom = !isDirectMessage;
2375
- const { audioPreflightMode, locationPayload, reservedHistorySlot, selfUserId } = paramsLocal;
2376
- const messageId = event.event_id ?? "";
2377
- const threadRootId = resolveMatrixThreadRootId(content);
2378
- const thread = resolveMatrixThreadRouting({
2379
- isDirectMessage,
2380
- threadReplies,
2381
- dmThreadReplies,
2382
- messageId,
2383
- threadRootId
2384
- });
2385
- const historyThreadId = threadRootId ? thread.threadId : void 0;
2386
- let reservedHistorySlotConsumed = false;
2387
- const discardReservedHistorySlot = () => {
2388
- if (reservedHistorySlot && !reservedHistorySlotConsumed) {
2389
- roomHistoryTracker.discardPending(roomId, reservedHistorySlot, historyThreadId);
2390
- reservedHistorySlotConsumed = true;
2391
- }
2392
- };
2393
- const markReservedHistorySlotConsumed = () => {
2394
- reservedHistorySlotConsumed = true;
2395
- };
2396
- const commitInboundEventIfClaimedAndDiscardReserved = async () => {
2397
- discardReservedHistorySlot();
2398
- await commitInboundEventIfClaimed();
2399
- };
2400
- if (isRoom && groupPolicy === "disabled") {
2401
- await commitInboundEventIfClaimedAndDiscardReserved();
2402
- return;
2403
- }
2404
- const roomInfoForConfig = isRoom && needsRoomAliasesForConfig ? await getRoomInfo(roomId, { includeAliases: true }) : void 0;
2405
- const roomAliasesForConfig = roomInfoForConfig ? [roomInfoForConfig.canonicalAlias ?? "", ...roomInfoForConfig.altAliases].filter(Boolean) : [];
2406
- const roomConfigInfo = isRoom ? resolveMatrixRoomConfig({
2407
- rooms: roomsConfig,
2408
- roomId,
2409
- aliases: roomAliasesForConfig
2410
- }) : void 0;
2411
- const roomConfig = roomConfigInfo?.config;
2412
- const allowBotsMode = resolveMatrixAllowBotsMode(roomConfig?.allowBots ?? accountAllowBots);
2413
- const isConfiguredBotSender = configuredBotUserIds.has(senderId);
2414
- const roomMatchMeta = roomConfigInfo ? `matchKey=${roomConfigInfo.matchKey ?? "none"} matchSource=${roomConfigInfo.matchSource ?? "none"}` : "matchKey=none matchSource=none";
2415
- if (isConfiguredBotSender && allowBotsMode === "off") {
2416
- logVerboseMessage(`matrix: drop configured bot sender=${senderId} (allowBots=false${isDirectMessage ? "" : `, ${roomMatchMeta}`})`);
2417
- await commitInboundEventIfClaimedAndDiscardReserved();
2418
- return;
2419
- }
2420
- const botLoopProtection = isConfiguredBotSender && senderId !== selfUserId ? {
2421
- scopeId: accountId,
2422
- conversationId: roomId,
2423
- senderId,
2424
- receiverId: selfUserId,
2425
- config: mergePairLoopGuardConfig(accountConfig?.botLoopProtection, roomConfig?.botLoopProtection),
2426
- defaultsConfig: cfg.channels?.defaults?.botLoopProtection,
2427
- defaultEnabled: true,
2428
- nowMs: eventTs ?? void 0
2429
- } : void 0;
2430
- if (isRoom && roomConfig && !roomConfigInfo?.allowed) {
2431
- logVerboseMessage(`matrix: room disabled room=${roomId} (${roomMatchMeta})`);
2432
- await commitInboundEventIfClaimedAndDiscardReserved();
2433
- return;
2434
- }
2435
- if (isRoom && groupPolicy === "allowlist") {
2436
- if (!roomConfigInfo?.allowlistConfigured) {
2437
- logVerboseMessage(`matrix: drop room message (no allowlist, ${roomMatchMeta})`);
2438
- await commitInboundEventIfClaimedAndDiscardReserved();
2439
- return;
2440
- }
2441
- if (!roomConfig) {
2442
- logVerboseMessage(`matrix: drop room message (not in allowlist, ${roomMatchMeta})`);
2443
- await commitInboundEventIfClaimedAndDiscardReserved();
2444
- return;
2445
- }
2446
- }
2447
- let senderNamePromise = null;
2448
- const getSenderName = async () => {
2449
- senderNamePromise ??= getMemberDisplayName(roomId, senderId).catch(() => senderId);
2450
- return await senderNamePromise;
2451
- };
2452
- const storeAllowFrom = isDirectMessage && dmPolicy !== "allowlist" && dmPolicy !== "open" ? await readStoreAllowFrom() : [];
2453
- const roomUsers = roomConfig?.users ?? [];
2454
- const { liveCfg, liveDmAllowFrom, liveGroupAllowFrom } = await resolveLiveAccountAllowlists();
2455
- const accessState = await resolveMatrixMonitorAccessState({
2456
- allowFrom: liveDmAllowFrom,
2457
- storeAllowFrom,
2458
- dmPolicy,
2459
- groupPolicy,
2460
- groupAllowFrom: liveGroupAllowFrom,
2461
- roomUsers,
2462
- senderId,
2463
- isRoom,
2464
- conversationId: roomId,
2465
- accountId,
2466
- eventKind: isReactionEvent ? "reaction" : "message"
2467
- });
2468
- const { effectiveGroupAllowFrom, effectiveRoomUsers, messageIngress } = accessState;
2469
- const ingressDecision = messageIngress.ingress;
2470
- if (isDirectMessage) {
2471
- if (!dmEnabled || dmPolicy === "disabled") {
2472
- await commitInboundEventIfClaimedAndDiscardReserved();
2473
- return;
2474
- }
2475
- const senderReason = messageIngress.senderAccess.reasonCode;
2476
- if (ingressDecision.decision !== "allow") {
2477
- if (ingressDecision.admission === "pairing-required") {
2478
- const senderName = await getSenderName();
2479
- const { code, created } = await core.channel.pairing.upsertPairingRequest({
2480
- channel: "matrix",
2481
- id: senderId,
2482
- accountId,
2483
- meta: { name: senderName }
2484
- });
2485
- if (shouldSendPairingReply(senderId, created)) {
2486
- const pairingReply = core.channel.pairing.buildPairingReply({
2487
- channel: "matrix",
2488
- idLine: `Your Matrix user id: ${senderId}`,
2489
- code
2490
- });
2491
- logVerboseMessage(created ? `matrix pairing request sender=${senderId} name=${senderName ?? "unknown"} (reason=${senderReason})` : `matrix pairing reminder sender=${senderId} name=${senderName ?? "unknown"} (reason=${senderReason})`);
2492
- try {
2493
- const { sendMessageMatrix } = await loadMatrixSendModule();
2494
- await sendMessageMatrix(`room:${roomId}`, created ? pairingReply : `${pairingReply}\n\nPairing request is still pending approval. Reusing existing code.`, {
2495
- client,
2496
- cfg,
2497
- accountId
2498
- });
2499
- await commitInboundEventIfClaimed();
2500
- } catch (err) {
2501
- logVerboseMessage(`matrix pairing reply failed for ${senderId}: ${String(err)}`);
2502
- discardReservedHistorySlot();
2503
- return;
2504
- }
2505
- } else {
2506
- logVerboseMessage(`matrix pairing reminder suppressed sender=${senderId} (cooldown)`);
2507
- await commitInboundEventIfClaimedAndDiscardReserved();
2508
- }
2509
- }
2510
- if (isReactionEvent || dmPolicy !== "pairing") {
2511
- logVerboseMessage(`matrix: blocked ${isReactionEvent ? "reaction" : "dm"} sender ${senderId} (dmPolicy=${dmPolicy}, reason=${senderReason})`);
2512
- await commitInboundEventIfClaimedAndDiscardReserved();
2513
- }
2514
- return;
2515
- }
2516
- }
2517
- if (isRoom && ingressDecision.decision !== "allow") {
2518
- logVerboseMessage(`matrix: blocked sender ${senderId} (ingress=${ingressDecision.reasonCode}, ${roomMatchMeta})`);
2519
- await commitInboundEventIfClaimedAndDiscardReserved();
2520
- return;
2521
- }
2522
- if (isRoom) logVerboseMessage(`matrix: allow room ${roomId} (${roomMatchMeta})`);
2523
- if (isReactionEvent) {
2524
- const senderName = await getSenderName();
2525
- const { handleInboundMatrixReaction } = await loadMatrixReactionEvents();
2526
- await handleInboundMatrixReaction({
2527
- client,
2528
- core,
2529
- cfg,
2530
- accountId,
2531
- roomId,
2532
- event,
2533
- senderId,
2534
- senderLabel: senderName,
2535
- selfUserId,
2536
- isDirectMessage,
2537
- logVerboseMessage
2538
- });
2539
- await commitInboundEventIfClaimedAndDiscardReserved();
2540
- return;
2541
- }
2542
- return {
2543
- cfg: liveCfg,
2544
- liveDmAllowFrom,
2545
- content,
2546
- messageId,
2547
- audioPreflightMode,
2548
- isDirectMessage,
2549
- isRoom,
2550
- locationPayload,
2551
- reservedHistorySlot,
2552
- threadRootId,
2553
- thread,
2554
- historyThreadId,
2555
- discardReservedHistorySlot,
2556
- markReservedHistorySlotConsumed,
2557
- commitInboundEventIfClaimedAndDiscardReserved,
2558
- roomConfig,
2559
- allowBotsMode,
2560
- isConfiguredBotSender,
2561
- selfUserId,
2562
- botLoopProtection,
2563
- roomMatchMeta,
2564
- getSenderName,
2565
- accessState,
2566
- effectiveGroupAllowFrom,
2567
- effectiveRoomUsers
2568
- };
2569
- }
2570
- //#endregion
2571
- //#region extensions/matrix/src/matrix/monitor/media.ts
2572
- const MATRIX_MEDIA_DOWNLOAD_IDLE_TIMEOUT_MS = 3e4;
2573
- async function downloadMatrixMedia(params) {
2574
- if (typeof params.sizeBytes === "number" && params.sizeBytes > params.maxBytes) throw new MatrixMediaSizeLimitError();
2575
- const options = {
2576
- maxBytes: params.maxBytes,
2577
- readIdleTimeoutMs: MATRIX_MEDIA_DOWNLOAD_IDLE_TIMEOUT_MS
2578
- };
2579
- let buffer;
2580
- if (params.file) {
2581
- if (!params.client.crypto) throw new Error("Cannot decrypt media: crypto not enabled");
2582
- buffer = await params.client.crypto.decryptMedia(params.file, options);
2583
- if (buffer.byteLength > params.maxBytes) throw new MatrixMediaSizeLimitError();
2584
- } else try {
2585
- buffer = await params.client.downloadContent(params.mxcUrl, options);
2586
- } catch (err) {
2587
- if (isMatrixMediaSizeLimitError(err)) throw err;
2588
- throw new Error(`Matrix media download failed: ${String(err)}`, { cause: err });
2589
- }
2590
- const saved = await getMatrixRuntime().channel.media.saveMediaBuffer(buffer, params.contentType, "inbound", params.maxBytes, params.originalFilename);
2591
- return {
2592
- path: saved.path,
2593
- contentType: saved.contentType,
2594
- placeholder: "[matrix media]"
2595
- };
2596
- }
2597
- //#endregion
2598
- //#region extensions/matrix/src/matrix/monitor/mentions.ts
2599
- const MATRIX_HTML_ENTITY_RE = /&(?:#x?[0-9a-f]+|amp|apos|gt|lt|nbsp|quot);/gi;
2600
- function decodeVisibleHtmlEntities(value) {
2601
- return value.replace(MATRIX_HTML_ENTITY_RE, (entity) => {
2602
- const decoded = decodeHtmlEntities(entity.startsWith("&#") ? entity : entity.toLowerCase());
2603
- return decoded === "\xA0" ? " " : decoded;
2604
- });
2605
- }
2606
- function normalizeVisibleMentionText(value) {
2607
- return normalizeLowercaseStringOrEmpty(decodeVisibleHtmlEntities(value.replace(/<[^>]+>/g, " ").replace(/[\u200b-\u200f\u202a-\u202e\u2060-\u206f]/g, "")).replace(/\s+/g, " "));
2608
- }
2609
- function extractVisibleMentionText(value) {
2610
- return normalizeVisibleMentionText(value ?? "");
2611
- }
2612
- function resolveMatrixUserLocalpart(userId) {
2613
- const trimmed = userId.trim();
2614
- if (!trimmed.startsWith("@")) return null;
2615
- const colonIndex = trimmed.indexOf(":");
2616
- if (colonIndex <= 1) return null;
2617
- return trimmed.slice(1, colonIndex).trim() || null;
2618
- }
2619
- function hasVisibleNativeMatrixUserMention(text, userId) {
2620
- const localpart = resolveMatrixUserLocalpart(userId);
2621
- if (!text || !localpart) return false;
2622
- return new RegExp(String.raw`(?:^|\p{White_Space})(?:${escapeRegExp(userId)}(?=$|\p{White_Space}|:\p{White_Space}|[,!?;](?=$|\p{White_Space}))|${escapeRegExp(`@${localpart}`)}(?=$|\p{White_Space}|:\p{White_Space}))`, "u").test(text);
2623
- }
2624
- function resolveMatrixMentionPrefixCandidates(params) {
2625
- const candidates = [];
2626
- const seen = /* @__PURE__ */ new Set();
2627
- const append = (candidate) => {
2628
- const trimmed = candidate?.trim();
2629
- if (!trimmed) return;
2630
- const normalized = normalizeLowercaseStringOrEmpty(trimmed);
2631
- if (seen.has(normalized)) return;
2632
- seen.add(normalized);
2633
- candidates.push(trimmed);
2634
- };
2635
- append(params.userId);
2636
- const localpart = params.userId ? resolveMatrixUserLocalpart(params.userId) : null;
2637
- append(localpart ? `@${localpart}` : null);
2638
- append(params.displayName);
2639
- append(params.displayName ? `@${params.displayName}` : null);
2640
- append(params.displayName ? `@[${params.displayName}]` : null);
2641
- return candidates;
2642
- }
2643
- function stripMatchedMatrixMentionPrefix(text, pattern) {
2644
- const match = text.match(pattern);
2645
- if (!match) return null;
2646
- return text.slice(match[0].length).trimStart();
2647
- }
2648
- function stripNativeMatrixMentionPrefix(text, candidate) {
2649
- return stripMatchedMatrixMentionPrefix(text, new RegExp(`^\\s*${escapeRegExp(candidate)}(?:\\s*[:,])?(?:\\s+|$)`, "i"));
2650
- }
2651
- function stripRegexMatrixMentionPrefix(text, pattern) {
2652
- const flags = pattern.flags.replace(/[gy]/g, "");
2653
- return stripMatchedMatrixMentionPrefix(text, new RegExp(`^\\s*(?:${pattern.source})(?:\\s*[:,])?(?:\\s+|$)`, flags));
2654
- }
2655
- function stripMatrixMentionPrefix(params) {
2656
- const text = params.text;
2657
- if (!text) return text;
2658
- for (const candidate of resolveMatrixMentionPrefixCandidates(params)) {
2659
- const stripped = stripNativeMatrixMentionPrefix(text, candidate);
2660
- if (stripped !== null) return stripped;
2661
- }
2662
- for (const pattern of params.mentionRegexes ?? []) {
2663
- const stripped = stripRegexMatrixMentionPrefix(text, pattern);
2664
- if (stripped !== null) return stripped;
2665
- }
2666
- return text;
2667
- }
2668
- function isVisibleMentionLabel(params) {
2669
- const cleaned = extractVisibleMentionText(params.text);
2670
- if (!cleaned) return false;
2671
- if (params.mentionRegexes.some((pattern) => pattern.test(cleaned))) return true;
2672
- const localpart = resolveMatrixUserLocalpart(params.userId);
2673
- return [
2674
- extractVisibleMentionText(params.userId),
2675
- localpart ? extractVisibleMentionText(localpart) : null,
2676
- localpart ? extractVisibleMentionText(`@${localpart}`) : null,
2677
- params.displayName ? extractVisibleMentionText(params.displayName) : null,
2678
- params.displayName ? extractVisibleMentionText(`@${params.displayName}`) : null,
2679
- params.displayName ? extractVisibleMentionText(`@[${params.displayName}]`) : null
2680
- ].filter((value) => Boolean(value)).includes(cleaned);
2681
- }
2682
- function hasVisibleRoomMention(value) {
2683
- const cleaned = extractVisibleMentionText(value);
2684
- return /(^|[^a-z0-9_])@room\b/i.test(cleaned);
2685
- }
2686
- /**
2687
- * Check if formatted_body contains a matrix.to link whose visible label still
2688
- * looks like a real mention for the given user. Do not trust href alone, since
2689
- * senders can hide arbitrary matrix.to links behind unrelated link text.
2690
- * Many Matrix clients (including Element) use HTML links in formatted_body instead of
2691
- * or in addition to the m.mentions field.
2692
- */
2693
- function checkFormattedBodyMention(params) {
2694
- if (!params.formattedBody || !params.userId) return false;
2695
- for (const match of params.formattedBody.matchAll(/<a\b[^>]*href=(["'])(https:\/\/matrix\.to\/#[^"']+)\1[^>]*>(.*?)<\/a>/gis)) {
2696
- const href = match[2];
2697
- const visibleLabel = match[3] ?? "";
2698
- if (!href) continue;
2699
- try {
2700
- const parsed = new URL(href);
2701
- if (decodeURIComponent(parsed.hash.replace(/^#\/?/, "").trim()) !== params.userId.trim()) continue;
2702
- if (isVisibleMentionLabel({
2703
- text: visibleLabel,
2704
- userId: params.userId,
2705
- mentionRegexes: params.mentionRegexes,
2706
- displayName: params.displayName
2707
- })) return true;
2708
- } catch {
2709
- continue;
2710
- }
2711
- }
2712
- return false;
2713
- }
2714
- function resolveMentions(params) {
2715
- const mentions = params.content["m.mentions"];
2716
- const mentionedUsers = Array.isArray(mentions?.user_ids) ? new Set(mentions.user_ids) : /* @__PURE__ */ new Set();
2717
- const textMentioned = getMatrixRuntime().channel.mentions.matchesMentionPatterns(params.text ?? "", params.mentionRegexes);
2718
- const visibleRoomMention = hasVisibleRoomMention(params.text) || hasVisibleRoomMention(params.content.formatted_body);
2719
- const mentionedInFormattedBody = params.userId ? checkFormattedBodyMention({
2720
- formattedBody: params.content.formatted_body,
2721
- userId: params.userId,
2722
- displayName: params.displayName,
2723
- mentionRegexes: params.mentionRegexes
2724
- }) : false;
2725
- const metadataBackedUserMention = Boolean(params.userId && mentionedUsers.has(params.userId) && (mentionedInFormattedBody || textMentioned || hasVisibleNativeMatrixUserMention(params.text, params.userId)));
2726
- const metadataBackedRoomMention = Boolean(mentions?.room) && visibleRoomMention;
2727
- const explicitMention = mentionedInFormattedBody || metadataBackedUserMention || metadataBackedRoomMention;
2728
- return {
2729
- wasMentioned: explicitMention || textMentioned || visibleRoomMention,
2730
- hasExplicitMention: explicitMention
2731
- };
2732
- }
2733
- //#endregion
2734
- //#region extensions/matrix/src/matrix/monitor/handler-ingress-content.ts
2735
- async function resolveMatrixIngressContent(config) {
2736
- const { handler, params: paramsLocal, access, roomId, event, eventType, isPollEvent, eventTs, senderId, roomHistoryTracker, commitInboundEventIfClaimed } = config;
2737
- const { client, core, accountId, accountConfig, logger, logVerboseMessage, historyLimit, mediaMaxBytes, dmSessionScope, getMemberDisplayName } = handler;
2738
- const { cfg, liveDmAllowFrom, content: accessContent, messageId, audioPreflightMode, isDirectMessage, isRoom, locationPayload, reservedHistorySlot, threadRootId, thread, historyThreadId, discardReservedHistorySlot, markReservedHistorySlotConsumed, commitInboundEventIfClaimedAndDiscardReserved, roomConfig, allowBotsMode, isConfiguredBotSender, selfUserId, botLoopProtection, roomMatchMeta, getSenderName, accessState, effectiveGroupAllowFrom, effectiveRoomUsers } = access;
2739
- const { messageIngress, resolveMessageIngress } = accessState;
2740
- let content = accessContent;
2741
- let pollSnapshotPromise = null;
2742
- const getPollSnapshot = async () => {
2743
- if (!isPollEvent) return null;
2744
- pollSnapshotPromise ??= fetchMatrixPollSnapshot(client, roomId, event).catch((err) => {
2745
- logVerboseMessage(`matrix: failed resolving poll snapshot room=${roomId} id=${event.event_id ?? "unknown"}: ${String(err)}`);
2746
- return null;
2747
- });
2748
- return await pollSnapshotPromise;
2749
- };
2750
- const mentionPrecheckText = resolveMatrixMentionPrecheckText({
2751
- eventType,
2752
- content,
2753
- locationText: locationPayload?.text
2754
- });
2755
- let mediaContent = resolveMatrixInboundMediaContent(content);
2756
- const mediaUrl = mediaContent.url;
2757
- const pendingHistoryText = resolveMatrixPendingHistoryText({
2758
- mentionPrecheckText,
2759
- content,
2760
- mediaUrl
2761
- });
2762
- const pendingHistoryPollText = !pendingHistoryText && isPollEvent && historyLimit > 0 ? (await getPollSnapshot())?.text : "";
2763
- if (!mentionPrecheckText && !mediaUrl && !isPollEvent) {
2764
- await commitInboundEventIfClaimedAndDiscardReserved();
2765
- return;
2766
- }
2767
- let preflightMedia = null;
2768
- let mediaDownloadFailed = false;
2769
- let mediaSizeLimitExceeded = false;
2770
- let preflightAudioTranscript;
2771
- const downloadMedia = async (mxcUrl) => {
2772
- try {
2773
- return await downloadMatrixMedia({
2774
- client,
2775
- mxcUrl,
2776
- contentType: mediaContent.contentType,
2777
- sizeBytes: mediaContent.sizeBytes,
2778
- maxBytes: mediaMaxBytes,
2779
- file: mediaContent.file,
2780
- originalFilename: mediaContent.originalFilename
2781
- });
2782
- } catch (err) {
2783
- mediaDownloadFailed = true;
2784
- mediaSizeLimitExceeded = isMatrixMediaSizeLimitError(err);
2785
- const errorText = formatErrorMessage(err);
2786
- logVerboseMessage(`matrix: media download failed room=${roomId} id=${event.event_id ?? "unknown"} type=${content.msgtype} error=${errorText}`);
2787
- logger.warn("matrix media download failed", {
2788
- roomId,
2789
- eventId: event.event_id,
2790
- msgtype: content.msgtype,
2791
- encrypted: Boolean(mediaContent.file),
2792
- error: errorText
2793
- });
2794
- return null;
2795
- }
2796
- };
2797
- const { route: _route, configuredBinding: _configuredBinding, runtimeBindingId: _runtimeBindingId } = resolveMatrixInboundRoute({
2798
- cfg,
2799
- accountId,
2800
- roomId,
2801
- senderId,
2802
- isDirectMessage,
2803
- dmSessionScope,
2804
- threadId: thread.threadId,
2805
- resolveAgentRoute: core.channel.routing.resolveAgentRoute
2806
- });
2807
- const hasExplicitSessionBinding = _configuredBinding !== null || _runtimeBindingId !== null;
2808
- const preflightAudioMediaUrl = mediaUrl?.startsWith("mxc://") ? mediaUrl : void 0;
2809
- const shouldRunMatrixAudioPreflight = isMatrixAudioContent({
2810
- msgtype: typeof content.msgtype === "string" ? content.msgtype : void 0,
2811
- mimetype: mediaContent.contentType
2812
- }) && isMatrixAudioMediaEnabled(cfg) && preflightAudioMediaUrl !== void 0;
2813
- if (shouldRunMatrixAudioPreflight && audioPreflightMode === "defer" && isRoom && historyLimit > 0 && !reservedHistorySlot) {
2814
- const reserved = roomHistoryTracker.reservePending(_route.agentId, roomId, {
2815
- sender: senderId,
2816
- body: pendingHistoryText,
2817
- timestamp: eventTs ?? void 0,
2818
- messageId
2819
- }, historyThreadId);
2820
- return { deferredPrefix: {
2821
- ...paramsLocal,
2822
- audioPreflightMode: "run",
2823
- reservedHistorySlot: reserved
2824
- } };
2825
- }
2826
- if (shouldRunMatrixAudioPreflight) {
2827
- preflightMedia = await downloadMedia(preflightAudioMediaUrl);
2828
- if (preflightMedia) preflightAudioTranscript = await resolveMatrixPreflightAudioTranscript({
2829
- mediaPath: preflightMedia.path,
2830
- mediaContentType: preflightMedia.contentType,
2831
- cfg,
2832
- accountId,
2833
- chatType: isDirectMessage ? "direct" : "channel",
2834
- originatingTo: `room:${roomId}`,
2835
- messageThreadId: thread.threadId,
2836
- sessionKey: _route.sessionKey
2837
- });
2838
- }
2839
- const agentMentionRegexes = core.channel.mentions.buildMentionRegexes(cfg, _route.agentId, {
2840
- provider: "matrix",
2841
- conversationId: roomId,
2842
- providerPolicy: accountConfig?.mentionPatterns
2843
- });
2844
- const selfDisplayName = content.formatted_body ? await getMemberDisplayName(roomId, selfUserId).catch(() => void 0) : void 0;
2845
- const mentionPrecheckTextWithTranscript = preflightAudioTranscript ? [mentionPrecheckText, preflightAudioTranscript].filter(Boolean).join("\n").trim() : mentionPrecheckText;
2846
- const { wasMentioned, hasExplicitMention } = resolveMentions({
2847
- content,
2848
- userId: selfUserId,
2849
- displayName: selfDisplayName,
2850
- text: mentionPrecheckTextWithTranscript,
2851
- mentionRegexes: agentMentionRegexes
2852
- });
2853
- if (isConfiguredBotSender && allowBotsMode === "mentions" && !isDirectMessage && !wasMentioned) {
2854
- logVerboseMessage(`matrix: drop configured bot sender=${senderId} (allowBots=mentions, missing mention, ${roomMatchMeta})`);
2855
- await commitInboundEventIfClaimedAndDiscardReserved();
2856
- return;
2857
- }
2858
- const allowTextCommands = core.channel.commands.shouldHandleTextCommands({
2859
- cfg,
2860
- surface: "matrix"
2861
- });
2862
- const useAccessGroups = true;
2863
- const commandCheckText = stripMatrixMentionPrefix({
2864
- text: mentionPrecheckText,
2865
- userId: selfUserId,
2866
- displayName: selfDisplayName,
2867
- mentionRegexes: agentMentionRegexes
2868
- });
2869
- const hasControlCommandInMessage = core.channel.text.hasControlCommand(commandCheckText, cfg);
2870
- const commandAccess = await resolveMatrixMonitorCommandAccess(accessState, {
2871
- useAccessGroups,
2872
- allowTextCommands,
2873
- hasControlCommand: hasControlCommandInMessage
2874
- });
2875
- const commandAuthorized = commandAccess.authorized;
2876
- if (isRoom && commandAccess.shouldBlockControlCommand) {
2877
- logInboundDrop({
2878
- log: logVerboseMessage,
2879
- channel: "matrix",
2880
- reason: "control command (unauthorized)",
2881
- target: senderId
2882
- });
2883
- await commitInboundEventIfClaimedAndDiscardReserved();
2884
- return;
2885
- }
2886
- const shouldRequireMention = isRoom ? roomConfig?.autoReply === true ? false : roomConfig?.autoReply === false ? true : typeof roomConfig?.requireMention === "boolean" ? roomConfig?.requireMention : true : false;
2887
- const mentionDecision = resolveInboundMentionDecision({
2888
- facts: {
2889
- canDetectMention: true,
2890
- wasMentioned,
2891
- hasAnyMention: hasExplicitMention
2892
- },
2893
- policy: {
2894
- isGroup: isRoom,
2895
- requireMention: shouldRequireMention,
2896
- allowTextCommands,
2897
- hasControlCommand: hasControlCommandInMessage,
2898
- commandAuthorized
2899
- }
2900
- });
2901
- const { effectiveWasMentioned, shouldBypassMention } = mentionDecision;
2902
- const canDetectMention = agentMentionRegexes.length > 0 || hasExplicitMention;
2903
- if (mentionDecision.shouldSkip) {
2904
- const pendingHistoryBody = preflightAudioTranscript ? formatAudioTranscriptForAgent(preflightAudioTranscript) : pendingHistoryText || pendingHistoryPollText;
2905
- if (historyLimit > 0 && pendingHistoryBody) {
2906
- const pendingEntry = {
2907
- sender: senderId,
2908
- body: pendingHistoryBody,
2909
- timestamp: eventTs ?? void 0,
2910
- messageId
2911
- };
2912
- if (reservedHistorySlot) {
2913
- roomHistoryTracker.finalizePending(roomId, reservedHistorySlot, pendingEntry, historyThreadId);
2914
- markReservedHistorySlotConsumed();
2915
- } else roomHistoryTracker.recordPending(roomId, pendingEntry, historyThreadId);
2916
- }
2917
- logger.info("skipping room message", {
2918
- roomId,
2919
- reason: "no-mention"
2920
- });
2921
- await commitInboundEventIfClaimed();
2922
- return;
2923
- }
2924
- if (preflightAudioTranscript) await sendMatrixPreflightAudioTranscriptEcho({
2925
- transcript: preflightAudioTranscript,
2926
- cfg,
2927
- accountId,
2928
- originatingTo: `room:${roomId}`,
2929
- messageThreadId: thread.threadId
2930
- });
2931
- if (isPollEvent) {
2932
- const pollSnapshot = await getPollSnapshot();
2933
- if (!pollSnapshot) {
2934
- discardReservedHistorySlot();
2935
- return;
2936
- }
2937
- content = {
2938
- msgtype: "m.text",
2939
- body: pollSnapshot.text
2940
- };
2941
- mediaContent = resolveMatrixInboundMediaContent(content);
2942
- }
2943
- let media = preflightMedia;
2944
- const finalMediaUrl = mediaContent.url;
2945
- if (!media && !mediaDownloadFailed && finalMediaUrl?.startsWith("mxc://")) media = await downloadMedia(finalMediaUrl);
2946
- let bodyText = resolveMatrixInboundBodyText({
2947
- rawBody: locationPayload?.text ?? mediaContent.body,
2948
- filename: typeof content.filename === "string" ? content.filename : void 0,
2949
- mediaPlaceholder: media?.placeholder,
2950
- msgtype: content.msgtype,
2951
- hadMediaUrl: Boolean(finalMediaUrl),
2952
- mediaDownloadFailed,
2953
- mediaSizeLimitExceeded
2954
- });
2955
- if (preflightMedia && bodyText && bodyText !== preflightMedia.placeholder && isLikelyBareFilename(bodyText)) bodyText = preflightMedia.placeholder;
2956
- if (preflightAudioTranscript) {
2957
- const transcriptBody = formatAudioTranscriptForAgent(preflightAudioTranscript);
2958
- bodyText = !bodyText || bodyText === media?.placeholder ? transcriptBody : `${bodyText}\n${transcriptBody}`;
2959
- }
2960
- if (!bodyText) {
2961
- await commitInboundEventIfClaimedAndDiscardReserved();
2962
- return;
2963
- }
2964
- const commandBodyText = hasControlCommandInMessage ? commandCheckText : bodyText;
2965
- const senderName = await getSenderName();
2966
- if (_configuredBinding) {
2967
- const { ensureConfiguredAcpBindingReady } = await loadAcpBindingRuntime();
2968
- if (!(await ensureConfiguredAcpBindingReady({
2969
- cfg,
2970
- configuredBinding: _configuredBinding
2971
- })).ok) {
2972
- logInboundDrop({
2973
- log: logVerboseMessage,
2974
- channel: "matrix",
2975
- reason: "configured ACP binding unavailable",
2976
- target: _configuredBinding.spec.conversationId
2977
- });
2978
- discardReservedHistorySlot();
2979
- return;
2980
- }
2981
- }
2982
- if (_runtimeBindingId) {
2983
- const { getSessionBindingService } = await loadSessionBindingRuntime();
2984
- getSessionBindingService().touch(_runtimeBindingId, eventTs ?? void 0, {
2985
- channel: "matrix",
2986
- accountId
2987
- });
2988
- }
2989
- const preparedTrigger = isRoom && historyLimit > 0 ? reservedHistorySlot ? roomHistoryTracker.prepareReservedTrigger(_route.agentId, roomId, historyLimit, reservedHistorySlot, {
2990
- sender: senderName,
2991
- body: bodyText,
2992
- timestamp: eventTs ?? void 0,
2993
- messageId
2994
- }, historyThreadId) : roomHistoryTracker.prepareTrigger(_route.agentId, roomId, historyLimit, {
2995
- sender: senderName,
2996
- body: bodyText,
2997
- timestamp: eventTs ?? void 0,
2998
- messageId
2999
- }, historyThreadId) : void 0;
3000
- if (reservedHistorySlot && preparedTrigger) markReservedHistorySlotConsumed();
3001
- return {
3002
- cfg,
3003
- liveDmAllowFrom,
3004
- messageIngress,
3005
- resolveMessageIngress,
3006
- route: _route,
3007
- hasExplicitSessionBinding,
3008
- roomConfig,
3009
- isDirectMessage,
3010
- isRoom,
3011
- shouldRequireMention,
3012
- wasMentioned,
3013
- effectiveWasMentioned,
3014
- shouldBypassMention,
3015
- canDetectMention,
3016
- commandAuthorized,
3017
- inboundHistory: preparedTrigger ? buildInboundHistoryFromEntries({
3018
- entries: preparedTrigger.history,
3019
- limit: historyLimit
3020
- }) : void 0,
3021
- senderName,
3022
- bodyText,
3023
- commandBodyText,
3024
- media,
3025
- preflightAudioTranscript,
3026
- locationPayload,
3027
- messageId,
3028
- triggerSnapshot: preparedTrigger,
3029
- threadRootId,
3030
- thread,
3031
- botLoopProtection,
3032
- effectiveGroupAllowFrom,
3033
- effectiveRoomUsers
3034
- };
3035
- }
3036
- //#endregion
3037
- //#region extensions/matrix/src/matrix/monitor/location.ts
3038
- function decodeGeoUriParamValue(value) {
3039
- try {
3040
- return decodeURIComponent(value);
3041
- } catch {
3042
- return value;
3043
- }
3044
- }
3045
- function parseGeoUri(value) {
3046
- const trimmed = value.trim();
3047
- if (!trimmed) return null;
3048
- if (!normalizeLowercaseStringOrEmpty(trimmed).startsWith("geo:")) return null;
3049
- const [coordsPart, ...paramParts] = trimmed.slice(4).split(";");
3050
- if (!coordsPart) return null;
3051
- const coords = coordsPart.split(",");
3052
- if (coords.length < 2) return null;
3053
- const latitude = parseStrictFiniteNumber(coords[0] ?? "");
3054
- const longitude = parseStrictFiniteNumber(coords[1] ?? "");
3055
- if (latitude === void 0 || longitude === void 0) return null;
3056
- const params = /* @__PURE__ */ new Map();
3057
- for (const part of paramParts) {
3058
- const segment = part.trim();
3059
- if (!segment) continue;
3060
- const eqIndex = segment.indexOf("=");
3061
- const rawKey = eqIndex === -1 ? segment : segment.slice(0, eqIndex);
3062
- const rawValue = eqIndex === -1 ? "" : segment.slice(eqIndex + 1);
3063
- const key = normalizeLowercaseStringOrEmpty(rawKey);
3064
- if (!key) continue;
3065
- const valuePart = rawValue.trim();
3066
- params.set(key, valuePart ? decodeGeoUriParamValue(valuePart) : "");
3067
- }
3068
- const accuracyRaw = params.get("u");
3069
- return {
3070
- latitude,
3071
- longitude,
3072
- accuracy: accuracyRaw ? parseStrictFiniteNumber(accuracyRaw) : void 0
3073
- };
3074
- }
3075
- function resolveMatrixLocation(params) {
3076
- const { eventType, content } = params;
3077
- if (!(eventType === EventType.Location || eventType === EventType.RoomMessage && content.msgtype === EventType.Location)) return null;
3078
- const geoUri = normalizeOptionalString(content.geo_uri) ?? "";
3079
- if (!geoUri) return null;
3080
- const parsed = parseGeoUri(geoUri);
3081
- if (!parsed) return null;
3082
- const caption = normalizeOptionalString(content.body) ?? "";
3083
- const location = {
3084
- latitude: parsed.latitude,
3085
- longitude: parsed.longitude,
3086
- accuracy: parsed.accuracy,
3087
- caption: caption || void 0,
3088
- source: "pin",
3089
- isLive: false
3090
- };
3091
- return {
3092
- text: formatLocationText(location),
3093
- context: toLocationContext(location)
3094
- };
3095
- }
3096
- //#endregion
3097
- //#region extensions/matrix/src/matrix/monitor/handler-ingress-prefix.ts
3098
- async function readMatrixIngressPrefix(config) {
3099
- const { client, senderId, dropPreStartupMessages, eventTs, eventAge, startupMs, startupGraceMs, event, eventType, eventId, inboundDeduper, roomId, logVerboseMessage, directTracker, claimInboundReplay } = config;
3100
- const selfUserId = await client.getUserId();
3101
- if (senderId === selfUserId) return;
3102
- if (dropPreStartupMessages) {
3103
- if (typeof eventTs === "number" && eventTs < startupMs - startupGraceMs) return;
3104
- if (typeof eventTs !== "number" && typeof eventAge === "number" && eventAge > startupGraceMs) return;
3105
- }
3106
- const content = event.content;
3107
- if (eventType === EventType.RoomMessage && isMatrixVerificationRoomMessage({
3108
- msgtype: content.msgtype,
3109
- body: content.body
3110
- })) {
3111
- logVerboseMessage(`matrix: skip verification/system room message room=${roomId}`);
3112
- return;
3113
- }
3114
- const locationPayload = resolveMatrixLocation({
3115
- eventType,
3116
- content
3117
- });
3118
- const relates = content["m.relates_to"];
3119
- if (relates && "rel_type" in relates && relates.rel_type === RelationType.Replace) return;
3120
- if (hasBundledMatrixReplacementRelation(event)) return;
3121
- if (eventId && inboundDeduper) {
3122
- const claim = await inboundDeduper.claim({
3123
- roomId,
3124
- eventId
3125
- });
3126
- if (claim.kind === "claimed") claimInboundReplay(claim.handle);
3127
- else if (claim.kind !== "invalid") {
3128
- logVerboseMessage(`matrix: skip duplicate inbound event room=${roomId} id=${eventId}`);
3129
- return;
3130
- }
3131
- }
3132
- return {
3133
- content,
3134
- isDirectMessage: await directTracker.isDirectMessage({
3135
- roomId,
3136
- senderId,
3137
- selfUserId
3138
- }),
3139
- locationPayload,
3140
- selfUserId
3141
- };
3142
- }
3143
- //#endregion
3144
- //#region extensions/matrix/src/matrix/monitor/replies.ts
3145
- function joinMatrixVisibleContent(contents) {
3146
- return contents.filter((content) => Boolean(content)).join("\n");
3147
- }
3148
- function mergeMatrixReplyDeliveryResults(results) {
3149
- const visibleResults = results.filter((result) => result.visibleReplySent);
3150
- if (visibleResults.length === 0) return {
3151
- visibleReplySent: false,
3152
- suppression: { reason: "no_visible_result" }
3153
- };
3154
- const content = joinMatrixVisibleContent(visibleResults.map((result) => result.content));
3155
- if (visibleResults.some((result) => result.receipt || result.messageIds?.length)) return createAcceptedChannelDeliveryResult({
3156
- deliveryResults: visibleResults,
3157
- content
3158
- });
3159
- return {
3160
- visibleReplySent: true,
3161
- content
3162
- };
3163
- }
3164
- function toMatrixPartialDeliveryError(error, settled) {
3165
- const failedPartial = isChannelPartialDeliveryError(error) ? error.deliveryResult : void 0;
3166
- const merged = mergeMatrixReplyDeliveryResults([...settled, ...failedPartial ? [failedPartial] : []]);
3167
- return merged.visibleReplySent ? createChannelPartialDeliveryError(error, {
3168
- ...merged,
3169
- visibleReplySent: true
3170
- }) : error;
3171
- }
3172
- function createMatrixReplyDeliveryResult(results) {
3173
- if (results.length === 0) return mergeMatrixReplyDeliveryResults([]);
3174
- return createAcceptedChannelDeliveryResult({
3175
- results: results.map((result) => ({ receipt: result.receipt })),
3176
- content: joinMatrixVisibleContent(results.map((result) => result.content))
3177
- });
3178
- }
3179
- function resolveVisibleMatrixReplyText(text) {
3180
- if (typeof text !== "string") return;
3181
- const trimmedStart = text.trimStart();
3182
- if (!trimmedStart) return text;
3183
- if (normalizeLowercaseStringOrEmpty(trimmedStart).startsWith("reasoning:")) return;
3184
- const visibleText = stripReasoningTagsFromText(text, {
3185
- mode: "strict",
3186
- trim: "none"
3187
- });
3188
- return visibleText.trim() ? visibleText : void 0;
3189
- }
3190
- async function deliverMatrixReplies(params) {
3191
- const core = getMatrixRuntime();
3192
- const logVerbose = (message) => {
3193
- if (core.logging.shouldLogVerbose()) params.runtime.log?.(message);
3194
- };
3195
- const hasRepliedRef = params.hasRepliedRef ?? { value: false };
3196
- const acceptedResults = [];
3197
- try {
3198
- for (const reply of params.replies) {
3199
- const visibleText = resolveVisibleMatrixReplyText(reply.text);
3200
- const { hasMedia, hasText, mediaUrls } = resolveSendableOutboundReplyParts(reply);
3201
- if (reply.isReasoning === true || !hasMedia && reply.text && visibleText === void 0) {
3202
- logVerbose("matrix reply suppressed as reasoning-only");
3203
- continue;
3204
- }
3205
- if (!hasText && !hasMedia) {
3206
- if (reply?.audioAsVoice) {
3207
- logVerbose("matrix reply has audioAsVoice without media/text; skipping");
3208
- continue;
3209
- }
3210
- params.runtime.error?.("matrix reply missing text/media");
3211
- continue;
3212
- }
3213
- const explicitReplyToId = reply.replyToTag || reply.replyToCurrent ? reply.replyToId?.trim() : void 0;
3214
- const rawText = visibleText ?? "";
3215
- const replyToIdForReply = explicitReplyToId || (!params.threadId && params.replyToMode !== "off" && (params.replyToMode === "all" || !hasRepliedRef.value) ? (reply.replyToId ?? params.replyToId)?.trim() : void 0);
3216
- const fallbackReplyToId = params.threadId ? (reply.replyToId ?? params.replyToId)?.trim() : void 0;
3217
- const onDeliveryResult = (result) => {
3218
- acceptedResults.push(result);
3219
- if (replyToIdForReply) hasRepliedRef.value = true;
3220
- };
3221
- const extraContent = resolveMatrixExtraContent(reply);
3222
- if (mediaUrls.length === 0) {
3223
- await sendMessageMatrix(params.roomId, rawText, {
3224
- client: params.client,
3225
- cfg: params.cfg,
3226
- replyToId: replyToIdForReply,
3227
- fallbackReplyToId,
3228
- threadId: params.threadId,
3229
- accountId: params.accountId,
3230
- extraContent,
3231
- onDeliveryResult
3232
- });
3233
- continue;
3234
- }
3235
- let first = true;
3236
- for (const mediaUrl of mediaUrls) {
3237
- const caption = first ? rawText : "";
3238
- await sendMessageMatrix(params.roomId, caption, {
3239
- client: params.client,
3240
- cfg: params.cfg,
3241
- mediaUrl,
3242
- mediaLocalRoots: params.mediaLocalRoots,
3243
- replyToId: replyToIdForReply,
3244
- fallbackReplyToId,
3245
- threadId: params.threadId,
3246
- audioAsVoice: reply.audioAsVoice,
3247
- accountId: params.accountId,
3248
- extraContent: first ? extraContent : void 0,
3249
- onDeliveryResult
3250
- });
3251
- first = false;
3252
- }
3253
- }
3254
- } catch (error) {
3255
- throw toMatrixPartialDeliveryError(error, [createMatrixReplyDeliveryResult(acceptedResults)]);
3256
- }
3257
- return createMatrixReplyDeliveryResult(acceptedResults);
3258
- }
3259
- //#endregion
3260
- //#region extensions/matrix/src/matrix/monitor/handler-reply-dispatcher.ts
3261
- function createMatrixReplyDispatcher(config) {
3262
- const { cfg, prefixOptions, humanDelay, typingCallbacks, streaming, draftStream, draftController, client, roomId, runtime, replyToMode, threadTarget, replyToEventId, accountId, mediaLocalRoots, logVerboseMessage } = config;
3263
- const quietDraftStreaming = streaming === "quiet" || streaming === "progress";
3264
- const hasRepliedRef = { value: false };
3265
- const deliverPayload = (reply) => deliverMatrixReplies({
3266
- cfg,
3267
- replies: [reply],
3268
- roomId,
3269
- client,
3270
- runtime,
3271
- replyToMode,
3272
- hasRepliedRef,
3273
- threadId: threadTarget,
3274
- replyToId: threadTarget ?? replyToEventId ?? void 0,
3275
- accountId,
3276
- mediaLocalRoots
3277
- });
3278
- let finalReplyDeliveryFailed = false;
3279
- let nonFinalReplyDeliveryFailed = false;
3280
- const beginNextBlockDraft = () => {
3281
- draftController.beginDraftGeneration();
3282
- draftController.advanceDraftBlockBoundary({ fallbackToLatestEnd: true });
3283
- draftStream?.reset();
3284
- draftController.resetReplyToIdForNextBlock();
3285
- draftController.updateDraftFromLatestFullText();
3286
- };
3287
- const { deliver: deliverReply, onError: onReplyError, ...turnDispatcherOptions } = {
3288
- ...prefixOptions,
3289
- humanDelay,
3290
- deliver: async (payload, info) => {
3291
- const completeDelivery = async (result) => {
3292
- if (info.kind === "block") {
3293
- beginNextBlockDraft();
3294
- await typingCallbacks.onReplyStart();
3295
- }
3296
- return result;
3297
- };
3298
- const createDraftReceipt = (id) => createPreviewMessageReceipt({
3299
- id,
3300
- ...threadTarget ? { threadId: threadTarget } : {},
3301
- ...draftController.currentReplyToId() ? { replyToId: draftController.currentReplyToId() } : {}
3302
- });
3303
- const createDraftDeliveryResult = (id, content) => {
3304
- const receipt = createDraftReceipt(id);
3305
- return {
3306
- messageIds: receipt.platformMessageIds,
3307
- receipt,
3308
- visibleReplySent: true,
3309
- content
3310
- };
3311
- };
3312
- const settleDraftReplacement = async (params) => {
3313
- const draftDelivery = createDraftDeliveryResult(params.draftEventId, params.draftContent);
3314
- let replacement;
3315
- try {
3316
- replacement = await params.deliver();
3317
- } catch (error) {
3318
- draftController.markDraftRetained();
3319
- throw toMatrixPartialDeliveryError(error, [draftDelivery]);
3320
- }
3321
- if (!replacement.visibleReplySent) {
3322
- draftController.markDraftRetained();
3323
- return draftDelivery;
3324
- }
3325
- if (!await redactMatrixDraftEvent(client, roomId, params.draftEventId)) {
3326
- draftController.markDraftRetained();
3327
- return mergeMatrixReplyDeliveryResults([draftDelivery, replacement]);
3328
- }
3329
- draftController.markDraftConsumed();
3330
- return replacement;
3331
- };
3332
- if (draftStream && info.kind !== "tool" && !payload.isCompactionNotice) {
3333
- const { hasMedia } = resolveSendableOutboundReplyParts(payload);
3334
- const ttsSupplement = getReplyPayloadTtsSupplement(payload);
3335
- const fallbackPayload = ttsSupplement && ttsSupplement.visibleTextAlreadyDelivered !== true && !payload.text?.trim() ? {
3336
- ...payload,
3337
- text: ttsSupplement.spokenText
3338
- } : payload;
3339
- if (draftController.draftDisposition() !== "active") {
3340
- await draftStream.discardPending();
3341
- return await completeDelivery(await deliverPayload(fallbackPayload));
3342
- }
3343
- const deliverFallback = async () => await deliverPayload(fallbackPayload);
3344
- const payloadReplyMismatch = (!threadTarget && replyToMode !== "off" || payload.replyToTag || payload.replyToCurrent) && normalizeOptionalString(payload.replyToId) !== draftController.currentReplyToId();
3345
- let mustDeliverFinalNormally = draftStream.mustDeliverFinalNormally();
3346
- if (Boolean(payload.text?.trim()) && !payload.isError && !payloadReplyMismatch && !mustDeliverFinalNormally) {
3347
- await draftStream.stop();
3348
- mustDeliverFinalNormally = draftStream.mustDeliverFinalNormally();
3349
- } else await draftStream.discardPending();
3350
- const draftEventId = draftStream.eventId();
3351
- const draftFinalTextNeedsNormalMentionDelivery = Boolean(draftEventId) && typeof payload.text === "string" && Boolean(payload.text.trim()) && !payload.isError && !payloadReplyMismatch && !mustDeliverFinalNormally && await matrixTextWouldActivateMentions(client, payload.text);
3352
- if (draftEventId && payload.text && !payload.isError && !hasMedia && !payloadReplyMismatch && !mustDeliverFinalNormally && !draftFinalTextNeedsNormalMentionDelivery) {
3353
- const finalPreviewText = payload.text;
3354
- const { prepareMatrixSingleText } = await loadMatrixSendModule();
3355
- const preparedFinalPreviewContent = prepareMatrixSingleText(finalPreviewText, {
3356
- cfg,
3357
- accountId,
3358
- preserveWhitespace: true
3359
- }).convertedText;
3360
- let finalizedDraftContent = draftStream.content() ?? preparedFinalPreviewContent;
3361
- let fallbackResult;
3362
- const previewResult = await deliverWithFinalizableLivePreviewAdapter({
3363
- kind: "final",
3364
- payload,
3365
- adapter: defineFinalizableLivePreviewAdapter({
3366
- draft: {
3367
- flush: async () => {},
3368
- clear: async () => {},
3369
- discardPending: async () => {},
3370
- id: () => draftEventId
3371
- },
3372
- buildFinalEdit: () => {
3373
- const presentationContent = resolveMatrixExtraContent(payload);
3374
- const extraContent = {
3375
- ...quietDraftStreaming ? buildMatrixFinalizedPreviewContent() : {},
3376
- ...presentationContent
3377
- };
3378
- return {
3379
- text: finalPreviewText,
3380
- finalizeLive: !(quietDraftStreaming || Boolean(presentationContent) || !draftStream.matchesPreparedText(finalPreviewText)),
3381
- ...Object.keys(extraContent).length > 0 ? { extraContent } : {}
3382
- };
3383
- },
3384
- editFinal: async (_draftEventId, edit) => {
3385
- if (edit.finalizeLive) {
3386
- if (!await draftStream.finalizeLive()) throw new Error("Matrix draft live finalize failed");
3387
- finalizedDraftContent = draftStream.content() ?? preparedFinalPreviewContent;
3388
- return;
3389
- }
3390
- const { editMessageMatrix } = await loadMatrixSendModule();
3391
- await editMessageMatrix(roomId, _draftEventId, edit.text, {
3392
- client,
3393
- cfg,
3394
- threadId: threadTarget,
3395
- accountId,
3396
- extraContent: edit.extraContent
3397
- });
3398
- finalizedDraftContent = prepareMatrixSingleText(edit.text, {
3399
- cfg,
3400
- accountId,
3401
- preserveWhitespace: true
3402
- }).convertedText;
3403
- },
3404
- createPreviewReceipt: createDraftReceipt,
3405
- logPreviewEditFailure: (err) => {
3406
- logVerboseMessage(`matrix: preview final edit failed: ${String(err)}`);
3407
- }
3408
- }),
3409
- deliverNormally: async () => {
3410
- fallbackResult = await settleDraftReplacement({
3411
- draftEventId,
3412
- draftContent: draftStream.content() ?? preparedFinalPreviewContent,
3413
- deliver: deliverFallback
3414
- });
3415
- return fallbackResult.visibleReplySent;
3416
- }
3417
- });
3418
- if (previewResult.kind === "preview-finalized") draftController.markDraftConsumed();
3419
- return await completeDelivery(previewResult.kind === "preview-finalized" && previewResult.liveState?.receipt ? createDraftDeliveryResult(draftEventId, finalizedDraftContent ?? preparedFinalPreviewContent) : fallbackResult ?? mergeMatrixReplyDeliveryResults([]));
3420
- } else if (draftEventId && hasMedia && !payloadReplyMismatch) {
3421
- let textEditOk = !mustDeliverFinalNormally;
3422
- const payloadText = payload.text ?? ttsSupplement?.spokenText;
3423
- const preparedPayloadContent = typeof payloadText === "string" ? (await loadMatrixSendModule()).prepareMatrixSingleText(payloadText, {
3424
- cfg,
3425
- accountId,
3426
- preserveWhitespace: true
3427
- }).convertedText : void 0;
3428
- let finalizedDraftContent = draftStream.content() ?? preparedPayloadContent;
3429
- const payloadTextMatchesDraft = typeof payloadText === "string" && draftStream.matchesPreparedText(payloadText);
3430
- const reusesDraftTextUnchanged = typeof payloadText === "string" && Boolean(payloadText.trim()) && payloadTextMatchesDraft;
3431
- const mediaTextNeedsNormalMentionDelivery = typeof payloadText === "string" && Boolean(payloadText.trim()) && await matrixTextWouldActivateMentions(client, payloadText);
3432
- const requiresFinalTextEdit = quietDraftStreaming || typeof payloadText === "string" && !payloadTextMatchesDraft;
3433
- if (textEditOk && mediaTextNeedsNormalMentionDelivery) textEditOk = false;
3434
- else if (textEditOk && payloadText && requiresFinalTextEdit) {
3435
- const { editMessageMatrix, prepareMatrixSingleText } = await loadMatrixSendModule();
3436
- textEditOk = await editMessageMatrix(roomId, draftEventId, payloadText, {
3437
- client,
3438
- cfg,
3439
- threadId: threadTarget,
3440
- accountId,
3441
- extraContent: quietDraftStreaming ? buildMatrixFinalizedPreviewContent() : void 0
3442
- }).then(() => {
3443
- finalizedDraftContent = prepareMatrixSingleText(payloadText, {
3444
- cfg,
3445
- accountId,
3446
- preserveWhitespace: true
3447
- }).convertedText;
3448
- return true;
3449
- }, () => false);
3450
- } else if (textEditOk && reusesDraftTextUnchanged) {
3451
- textEditOk = await draftStream.finalizeLive();
3452
- finalizedDraftContent = draftStream.content();
3453
- }
3454
- const reusesDraftAsFinalText = Boolean(payloadText?.trim()) && textEditOk;
3455
- const draftContent = draftStream.content();
3456
- const mediaPayload = ttsSupplement && reusesDraftAsFinalText ? buildTtsSupplementMediaPayload(payload) : {
3457
- ...payload,
3458
- text: reusesDraftAsFinalText ? void 0 : payload.text ?? (ttsSupplement?.visibleTextAlreadyDelivered === true ? void 0 : ttsSupplement?.spokenText)
3459
- };
3460
- const providerDraftContent = finalizedDraftContent ?? preparedPayloadContent;
3461
- const previewDelivery = reusesDraftAsFinalText && providerDraftContent ? createDraftDeliveryResult(draftEventId, providerDraftContent) : draftContent ? createDraftDeliveryResult(draftEventId, draftContent) : mergeMatrixReplyDeliveryResults([]);
3462
- const deliverMedia = async () => await deliverPayload(mediaPayload);
3463
- if (reusesDraftAsFinalText) {
3464
- draftController.markDraftConsumed();
3465
- let mediaDelivery;
3466
- try {
3467
- mediaDelivery = await deliverMedia();
3468
- } catch (error) {
3469
- throw toMatrixPartialDeliveryError(error, [previewDelivery]);
3470
- }
3471
- return await completeDelivery(mergeMatrixReplyDeliveryResults([previewDelivery, mediaDelivery]));
3472
- }
3473
- if (draftContent) return await completeDelivery(await settleDraftReplacement({
3474
- draftEventId,
3475
- draftContent,
3476
- deliver: deliverMedia
3477
- }));
3478
- return await completeDelivery(await deliverMedia());
3479
- }
3480
- const shouldRedactDraft = Boolean(draftEventId) && (payload.isError || payloadReplyMismatch || mustDeliverFinalNormally || draftFinalTextNeedsNormalMentionDelivery);
3481
- const draftContent = draftStream.content();
3482
- if (shouldRedactDraft && draftEventId && draftContent) return await completeDelivery(await settleDraftReplacement({
3483
- draftEventId,
3484
- draftContent,
3485
- deliver: deliverFallback
3486
- }));
3487
- return await completeDelivery(await deliverFallback());
3488
- }
3489
- return await completeDelivery(await deliverPayload(payload));
3490
- },
3491
- onError: (err, info) => {
3492
- if (info.kind === "final") finalReplyDeliveryFailed = true;
3493
- else nonFinalReplyDeliveryFailed = true;
3494
- if (info.kind === "block") beginNextBlockDraft();
3495
- runtime.error?.(`matrix ${info.kind} reply failed: ${String(err)}`);
3496
- },
3497
- onReplyStart: typingCallbacks.onReplyStart,
3498
- onIdle: typingCallbacks.onIdle
3499
- };
3500
- return {
3501
- deliverReply,
3502
- onReplyError,
3503
- turnDispatcherOptions,
3504
- finalReplyDeliveryFailed: () => finalReplyDeliveryFailed,
3505
- nonFinalReplyDeliveryFailed: () => nonFinalReplyDeliveryFailed
3506
- };
3507
- }
3508
- //#endregion
3509
- //#region extensions/matrix/src/matrix/monitor/handler-state.ts
3510
- const ALLOW_FROM_STORE_CACHE_TTL_MS = 3e4;
3511
- const PAIRING_REPLY_COOLDOWN_MS = 3e5;
3512
- const MAX_TRACKED_PAIRING_REPLY_SENDERS = 512;
3513
- function createMatrixHandlerState(config) {
3514
- const { core, accountId, runtime, allowFromResolvedEntries, groupAllowFromResolvedEntries, resolveLiveUserAllowlist } = config;
3515
- let cachedStoreAllowFrom = null;
3516
- let liveDmAllowlistCache = null;
3517
- let liveGroupAllowlistCache = null;
3518
- const resolveCachedLiveAllowlist = async (paramsValue) => {
3519
- const accountConfigLocal = resolveMatrixAccountConfig({
3520
- cfg: paramsValue.cfg,
3521
- accountId
3522
- });
3523
- const signature = JSON.stringify({
3524
- entries: (paramsValue.entries ?? []).map((entry) => String(entry).trim()),
3525
- failClosedOnUnresolved: paramsValue.failClosedOnUnresolved === true,
3526
- dangerouslyAllowNameMatching: isDangerousNameMatchingEnabled(accountConfigLocal)
3527
- });
3528
- if (paramsValue.cache?.signature === signature) return paramsValue.cache.entries;
3529
- const entries = await resolveLiveUserAllowlist({
3530
- cfg: paramsValue.cfg,
3531
- accountId,
3532
- entries: paramsValue.entries,
3533
- failClosedOnUnresolved: paramsValue.failClosedOnUnresolved,
3534
- startupResolvedEntries: paramsValue.startupResolvedEntries,
3535
- runtime
3536
- });
3537
- const next = {
3538
- signature,
3539
- entries
3540
- };
3541
- paramsValue.updateCache(next);
3542
- return entries;
3543
- };
3544
- const pairingReplySentAtMsBySender = /* @__PURE__ */ new Map();
3545
- const resolveLiveAccountAllowlists = async () => {
3546
- const liveCfg = core.config.current();
3547
- const liveAccountAllowlists = resolveMatrixAccountAllowlistConfig({
3548
- cfg: liveCfg,
3549
- accountId
3550
- });
3551
- return {
3552
- liveCfg,
3553
- liveDmAllowFrom: await resolveCachedLiveAllowlist({
3554
- cfg: liveCfg,
3555
- entries: liveAccountAllowlists.dmAllowFrom,
3556
- startupResolvedEntries: allowFromResolvedEntries,
3557
- cache: liveDmAllowlistCache,
3558
- updateCache: (next) => {
3559
- liveDmAllowlistCache = next;
3560
- }
3561
- }),
3562
- liveGroupAllowFrom: await resolveCachedLiveAllowlist({
3563
- cfg: liveCfg,
3564
- entries: liveAccountAllowlists.groupAllowFrom,
3565
- failClosedOnUnresolved: true,
3566
- startupResolvedEntries: groupAllowFromResolvedEntries,
3567
- cache: liveGroupAllowlistCache,
3568
- updateCache: (next) => {
3569
- liveGroupAllowlistCache = next;
3570
- }
3571
- })
3572
- };
3573
- };
3574
- const readStoreAllowFrom = async () => {
3575
- const now = Date.now();
3576
- if (cachedStoreAllowFrom && isFutureDateTimestampMs(cachedStoreAllowFrom.expiresAtMs, { nowMs: now })) return cachedStoreAllowFrom.value;
3577
- cachedStoreAllowFrom = null;
3578
- const value = await core.channel.pairing.readAllowFromStore({
3579
- channel: "matrix",
3580
- env: process.env,
3581
- accountId
3582
- }).catch(() => []);
3583
- const expiresAtMs = resolveExpiresAtMsFromDurationMs(ALLOW_FROM_STORE_CACHE_TTL_MS, { nowMs: now });
3584
- cachedStoreAllowFrom = expiresAtMs === void 0 ? null : {
3585
- value,
3586
- expiresAtMs
3587
- };
3588
- return value;
3589
- };
3590
- const shouldSendPairingReply = (senderId, created) => {
3591
- const now = Date.now();
3592
- if (created) {
3593
- pairingReplySentAtMsBySender.set(senderId, now);
3594
- return true;
3595
- }
3596
- const lastSentAtMs = pairingReplySentAtMsBySender.get(senderId);
3597
- if (typeof lastSentAtMs === "number" && now - lastSentAtMs < PAIRING_REPLY_COOLDOWN_MS) return false;
3598
- pairingReplySentAtMsBySender.set(senderId, now);
3599
- if (pairingReplySentAtMsBySender.size > MAX_TRACKED_PAIRING_REPLY_SENDERS) {
3600
- const oldestSender = pairingReplySentAtMsBySender.keys().next().value;
3601
- if (typeof oldestSender === "string") pairingReplySentAtMsBySender.delete(oldestSender);
3602
- }
3603
- return true;
3604
- };
3605
- return {
3606
- resolveLiveAccountAllowlists,
3607
- readStoreAllowFrom,
3608
- shouldSendPairingReply
3609
- };
3610
- }
3611
- //#endregion
3612
- //#region extensions/matrix/src/matrix/monitor/handler.ts
3613
- const SESSION_RESTART_RECOVERY_TOMBSTONE_ERROR_CODE = "SESSION_RESTART_RECOVERY_TOMBSTONE";
3614
- const RESTART_RECOVERY_TOMBSTONE_NOTICE = "This session ended during gateway restart recovery and cannot accept more messages. Send /new or /reset to start a replacement session.";
3615
- function createMatrixRoomMessageHandler(params) {
3616
- const { client, core, cfg: startupConfig, accountId, runtime, logger, logVerboseMessage, allowFromResolvedEntries = [], groupAllowFromResolvedEntries = [], configuredBotUserIds = /* @__PURE__ */ new Set(), replyToMode, streaming, previewToolProgressEnabled, blockStreamingEnabled, historyLimit, startupMs, startupGraceMs, dropPreStartupMessages, inboundDeduper, directTracker, getMemberDisplayName, resolveLiveUserAllowlist = resolveMatrixMonitorLiveUserAllowlist, resolveStorePath: resolveStorePathImpl = resolveStorePath, createChannelInboundEnvelopeBuilder: createChannelInboundEnvelopeBuilderImpl = createChannelInboundEnvelopeBuilder, resolveHumanDelayConfig: resolveHumanDelayConfigImpl = resolveHumanDelayConfig } = params;
3617
- const handlerConfig = {
3618
- ...params,
3619
- allowFromResolvedEntries,
3620
- groupAllowFromResolvedEntries,
3621
- configuredBotUserIds,
3622
- resolveLiveUserAllowlist,
3623
- resolveStorePath: resolveStorePathImpl,
3624
- createChannelInboundEnvelopeBuilder: createChannelInboundEnvelopeBuilderImpl,
3625
- resolveHumanDelayConfig: resolveHumanDelayConfigImpl
3626
- };
3627
- const handlerState = createMatrixHandlerState({
3628
- core,
3629
- accountId,
3630
- runtime,
3631
- allowFromResolvedEntries,
3632
- groupAllowFromResolvedEntries,
3633
- resolveLiveUserAllowlist
3634
- });
3635
- const resolveThreadContext = createMatrixThreadContextResolver({
3636
- client,
3637
- getMemberDisplayName,
3638
- logVerboseMessage
3639
- });
3640
- const resolveReplyContext = createMatrixReplyContextResolver({
3641
- client,
3642
- getMemberDisplayName,
3643
- logVerboseMessage
3644
- });
3645
- const roomHistoryTracker = createRoomHistoryTracker();
3646
- const roomIngressQueue = new KeyedAsyncQueue();
3647
- const sharedDmContextNoticeRooms = /* @__PURE__ */ new Set();
3648
- const runRoomIngress = async (roomId, task) => {
3649
- return await roomIngressQueue.enqueue(roomId, task);
3650
- };
3651
- return async (roomId, event) => {
3652
- const eventId = typeof event.event_id === "string" ? event.event_id.trim() : "";
3653
- let inboundReplayClaim;
3654
- let draftControllerRef;
3655
- try {
3656
- const eventType = event.type;
3657
- if (eventType === EventType.RoomMessageEncrypted) return;
3658
- const isPollEvent = isPollEventType(eventType);
3659
- const isReactionEvent = eventType === EventType.Reaction;
3660
- const locationContent = event.content;
3661
- const isLocationEvent = eventType === EventType.Location || eventType === EventType.RoomMessage && locationContent.msgtype === EventType.Location;
3662
- if (eventType !== EventType.RoomMessage && !isPollEvent && !isLocationEvent && !isReactionEvent) return;
3663
- logVerboseMessage(`matrix: inbound event room=${roomId} type=${eventType} id=${event.event_id ?? "unknown"}`);
3664
- if (event.unsigned?.redacted_because) return;
3665
- const senderId = event.sender;
3666
- if (!senderId) return;
3667
- const eventTs = event.origin_server_ts;
3668
- const eventAge = event.unsigned?.age;
3669
- const commitInboundEventIfClaimed = async () => {
3670
- const claim = inboundReplayClaim;
3671
- if (!claim) return;
3672
- await claim.commit();
3673
- if (inboundReplayClaim === claim) inboundReplayClaim = void 0;
3674
- };
3675
- const readIngressPrefix = () => readMatrixIngressPrefix({
3676
- client,
3677
- senderId,
3678
- dropPreStartupMessages,
3679
- eventTs: eventTs ?? void 0,
3680
- eventAge: eventAge ?? void 0,
3681
- startupMs,
3682
- startupGraceMs,
3683
- event,
3684
- eventType,
3685
- eventId,
3686
- inboundDeduper,
3687
- roomId,
3688
- logVerboseMessage,
3689
- directTracker,
3690
- claimInboundReplay: (handle) => {
3691
- inboundReplayClaim = handle;
3692
- }
3693
- });
3694
- const continueIngress = async (paramsLocal) => {
3695
- const access = await resolveMatrixIngressAccess({
3696
- handler: handlerConfig,
3697
- params: paramsLocal,
3698
- roomId,
3699
- event,
3700
- eventTs: eventTs ?? void 0,
3701
- senderId,
3702
- isReactionEvent,
3703
- readStoreAllowFrom: handlerState.readStoreAllowFrom,
3704
- shouldSendPairingReply: handlerState.shouldSendPairingReply,
3705
- resolveLiveAccountAllowlists: handlerState.resolveLiveAccountAllowlists,
3706
- roomHistoryTracker,
3707
- commitInboundEventIfClaimed
3708
- });
3709
- if (!access) return;
3710
- return await resolveMatrixIngressContent({
3711
- handler: handlerConfig,
3712
- params: paramsLocal,
3713
- access,
3714
- roomId,
3715
- event,
3716
- eventType,
3717
- isPollEvent,
3718
- eventTs: eventTs ?? void 0,
3719
- senderId,
3720
- roomHistoryTracker,
3721
- commitInboundEventIfClaimed
3722
- });
3723
- };
3724
- const ingressResult = historyLimit > 0 ? await runRoomIngress(roomId, async () => {
3725
- const prefix = await readIngressPrefix();
3726
- if (!prefix) return;
3727
- if (prefix.isDirectMessage) return { deferredPrefix: prefix };
3728
- const result = await continueIngress({
3729
- ...prefix,
3730
- audioPreflightMode: shouldDeferMatrixAudioPreflightForRoomIngress({
3731
- content: prefix.content,
3732
- cfg: startupConfig
3733
- }) ? "defer" : "run"
3734
- });
3735
- return result && "deferredPrefix" in result ? { deferredPrefix: result.deferredPrefix } : { ingressResult: result };
3736
- }) : void 0;
3737
- const resolvedIngressResult = historyLimit > 0 ? ingressResult?.deferredPrefix ? await continueIngress(ingressResult.deferredPrefix) : ingressResult?.ingressResult : await (async () => {
3738
- const prefix = await readIngressPrefix();
3739
- if (!prefix) return;
3740
- return await continueIngress(prefix);
3741
- })();
3742
- if (!resolvedIngressResult) return;
3743
- if ("deferredPrefix" in resolvedIngressResult) return;
3744
- const { cfg, liveDmAllowFrom, route: _route, roomConfig, isDirectMessage, isRoom, bodyText, messageId, triggerSnapshot, threadRootId, thread, botLoopProtection } = resolvedIngressResult;
3745
- const inboundContext = await resolveMatrixInboundContext({
3746
- handler: handlerConfig,
3747
- ingress: resolvedIngressResult,
3748
- roomId,
3749
- event,
3750
- eventTs: eventTs ?? void 0,
3751
- resolveThreadContext,
3752
- resolveReplyContext,
3753
- senderId,
3754
- sharedDmContextNoticeRooms
3755
- });
3756
- if (!inboundContext) return;
3757
- const { replyToEventId, threadTarget, storePath, ctxPayload, replyTarget, sharedDmContextNotice } = inboundContext;
3758
- const mediaLocalRoots = getAgentScopedMediaLocalRoots(cfg, _route.agentId);
3759
- const { onModelSelected, ...prefixOptions } = createReplyPrefixOptions({
3760
- cfg,
3761
- agentId: _route.agentId,
3762
- channel: "matrix",
3763
- accountId: _route.accountId
3764
- });
3765
- const typingCallbacks = createTypingCallbacks({
3766
- start: async () => {
3767
- const { sendTypingMatrix } = await loadMatrixSendModule();
3768
- await sendTypingMatrix(roomId, true, void 0, client);
3769
- },
3770
- stop: async () => {
3771
- const { sendTypingMatrix } = await loadMatrixSendModule();
3772
- await sendTypingMatrix(roomId, false, void 0, client);
3773
- },
3774
- onStartError: (err) => {
3775
- logTypingFailure({
3776
- log: logVerboseMessage,
3777
- channel: "matrix",
3778
- action: "start",
3779
- target: roomId,
3780
- error: err
3781
- });
3782
- },
3783
- onStopError: (err) => {
3784
- logTypingFailure({
3785
- log: logVerboseMessage,
3786
- channel: "matrix",
3787
- action: "stop",
3788
- target: roomId,
3789
- error: err
3790
- });
3791
- }
3792
- });
3793
- const hookRunner = getGlobalHookRunner();
3794
- const allowProviderPreview = !((hookRunner?.hasHooks("reply_payload_sending") ?? false) || (hookRunner?.hasHooks("message_sending") ?? false));
3795
- const draftController = await createMatrixDraftController({
3796
- streaming: allowProviderPreview ? streaming : "off",
3797
- previewToolProgressEnabled: allowProviderPreview && previewToolProgressEnabled,
3798
- replyToMode,
3799
- messageId,
3800
- threadTarget,
3801
- accountConfig: params.accountConfig,
3802
- cfg,
3803
- accountId: _route.accountId,
3804
- roomId,
3805
- client,
3806
- logVerboseMessage
3807
- });
3808
- const { draftStream } = draftController;
3809
- draftControllerRef = draftController;
3810
- const replyDispatcher = createMatrixReplyDispatcher({
3811
- cfg,
3812
- prefixOptions,
3813
- humanDelay: resolveHumanDelayConfigImpl(cfg, _route.agentId),
3814
- typingCallbacks,
3815
- streaming,
3816
- draftStream,
3817
- draftController,
3818
- client,
3819
- roomId,
3820
- runtime,
3821
- replyToMode,
3822
- threadTarget,
3823
- replyToEventId: replyToEventId ?? void 0,
3824
- accountId: _route.accountId,
3825
- mediaLocalRoots,
3826
- logVerboseMessage
3827
- });
3828
- const { deliverReply, onReplyError, turnDispatcherOptions } = replyDispatcher;
3829
- const pinnedMainDmOwner = isDirectMessage ? resolvePinnedMainDmOwnerFromAllowlist({
3830
- dmScope: cfg.session?.dmScope,
3831
- allowFrom: liveDmAllowFrom,
3832
- normalizeEntry: normalizeMatrixUserId
3833
- }) : null;
3834
- const inboundLastRouteSessionKey = resolveInboundLastRouteSessionKey({
3835
- route: _route,
3836
- sessionKey: _route.sessionKey
3837
- });
3838
- const replayClaimAtDispatch = inboundReplayClaim;
3839
- const turnAdoptionLifecycle = replayClaimAtDispatch ? {
3840
- admission: "exclusive",
3841
- onDeferred: () => {
3842
- if (inboundReplayClaim !== replayClaimAtDispatch) return false;
3843
- inboundReplayClaim = void 0;
3844
- },
3845
- onAdopted: async () => {
3846
- if (inboundReplayClaim === replayClaimAtDispatch) inboundReplayClaim = void 0;
3847
- await replayClaimAtDispatch.commit();
3848
- },
3849
- onAbandoned: () => {
3850
- if (inboundReplayClaim === replayClaimAtDispatch) inboundReplayClaim = void 0;
3851
- replayClaimAtDispatch.release();
3852
- }
3853
- } : void 0;
3854
- const turnResultPromise = core.channel.inbound.run({
3855
- channel: "matrix",
3856
- accountId: _route.accountId,
3857
- raw: event,
3858
- ...turnAdoptionLifecycle ? { turnAdoptionLifecycle } : {},
3859
- adapter: {
3860
- ingest: () => ({
3861
- id: messageId,
3862
- rawText: bodyText,
3863
- textForAgent: ctxPayload.BodyForAgent,
3864
- textForCommands: ctxPayload.CommandBody,
3865
- raw: event
3866
- }),
3867
- resolveTurn: () => ({
3868
- cfg,
3869
- channel: "matrix",
3870
- accountId: _route.accountId,
3871
- route: {
3872
- agentId: _route.agentId,
3873
- sessionKey: _route.sessionKey
3874
- },
3875
- ctxPayload,
3876
- botLoopProtection,
3877
- record: {
3878
- updateLastRoute: isDirectMessage ? {
3879
- sessionKey: inboundLastRouteSessionKey,
3880
- channel: "matrix",
3881
- to: `room:${roomId}`,
3882
- accountId: _route.accountId,
3883
- mainDmOwnerPin: inboundLastRouteSessionKey === _route.mainSessionKey && pinnedMainDmOwner ? {
3884
- ownerRecipient: pinnedMainDmOwner,
3885
- senderRecipient: normalizeMatrixUserId(senderId),
3886
- onSkip: ({ ownerRecipient, senderRecipient }) => {
3887
- logVerboseMessage(`matrix: skip main-session last route for ${senderRecipient} (pinned owner ${ownerRecipient})`);
3888
- }
3889
- } : void 0
3890
- } : void 0,
3891
- onRecordError: (err) => {
3892
- logger.warn("failed updating session meta", {
3893
- error: String(err),
3894
- storePath,
3895
- sessionKey: ctxPayload.SessionKey ?? _route.sessionKey
3896
- });
3897
- }
3898
- },
3899
- afterRecord: async () => {
3900
- if (sharedDmContextNotice && markTrackedRoomIfFirst(sharedDmContextNoticeRooms, roomId)) try {
3901
- await client.sendMessage(roomId, {
3902
- msgtype: "m.notice",
3903
- body: sharedDmContextNotice
3904
- });
3905
- } catch (err) {
3906
- logVerboseMessage(`matrix: failed sending shared DM session notice room=${roomId}: ${String(err)}`);
3907
- }
3908
- },
3909
- delivery: {
3910
- observeMessageSent: true,
3911
- preparePayload: prepareMatrixReplyPayload,
3912
- deliver: deliverReply,
3913
- onError: (err, info) => onReplyError(err, info)
3914
- },
3915
- dispatcherOptions: {
3916
- ...turnDispatcherOptions,
3917
- onSettled: () => draftController.cancelProgressDraft()
3918
- },
3919
- replyOptions: {
3920
- skillFilter: roomConfig?.skills,
3921
- disableBlockStreaming: !blockStreamingEnabled,
3922
- onPartialReply: draftStream ? (payload) => draftController.onPartialReply(payload.text ?? "") : void 0,
3923
- onBlockReplyQueued: draftStream ? (payload, context) => {
3924
- if (payload.isCompactionNotice === true) return false;
3925
- draftController.queueDraftBlockBoundary(payload, context);
3926
- return false;
3927
- } : void 0,
3928
- onAssistantMessageStart: draftStream ? () => {
3929
- draftController.resetDraftBlockOffsets();
3930
- draftController.beginAssistantMessage();
3931
- return false;
3932
- } : void 0,
3933
- onQueuedFollowupAdmitted: draftStream ? draftController.resetDraftDeliveryState : void 0,
3934
- ...draftController.buildPreviewToolProgressReplyOptions(),
3935
- onModelSelected
3936
- }
3937
- })
3938
- }
3939
- });
3940
- let turnResult;
3941
- try {
3942
- turnResult = await turnResultPromise;
3943
- } catch (err) {
3944
- if (extractErrorCode(err) !== SESSION_RESTART_RECOVERY_TOMBSTONE_ERROR_CODE) throw err;
3945
- try {
3946
- const { sendMessageMatrix } = await loadMatrixSendModule();
3947
- await sendMessageMatrix(roomId, RESTART_RECOVERY_TOMBSTONE_NOTICE, {
3948
- cfg,
3949
- client,
3950
- accountId: _route.accountId,
3951
- replyToId: threadTarget || replyToMode === "off" ? void 0 : messageId,
3952
- fallbackReplyToId: threadTarget,
3953
- threadId: threadTarget,
3954
- deliveryQueueId: `matrix:restart-recovery-tombstone:${_route.accountId}:${roomId}:${eventId}`,
3955
- deliveryPartIndex: 0,
3956
- deliveryPartCount: 1,
3957
- extraContent: { msgtype: "m.notice" }
3958
- });
3959
- await commitInboundEventIfClaimed();
3960
- } catch (noticeError) {
3961
- runtime.error?.(`matrix: failed completing restart-recovery tombstone notice room=${roomId} id=${eventId || "unknown"}: ${String(noticeError)}`);
3962
- }
3963
- return;
3964
- }
3965
- if (!turnResult.dispatched) {
3966
- if (turnResult.admission.kind === "drop" && turnResult.admission.reason === "bot-loop-protection") await commitInboundEventIfClaimed();
3967
- return;
3968
- }
3969
- const { dispatchResult } = turnResult;
3970
- const { queuedFinal } = dispatchResult;
3971
- if (replyDispatcher.finalReplyDeliveryFailed()) {
3972
- logVerboseMessage(`matrix: final reply delivery failed room=${roomId} id=${messageId}; keeping replay committed`);
3973
- await commitInboundEventIfClaimed();
3974
- return;
3975
- }
3976
- if (!queuedFinal && replyDispatcher.nonFinalReplyDeliveryFailed()) {
3977
- logVerboseMessage(`matrix: non-final reply delivery failed room=${roomId} id=${messageId}; keeping replay committed`);
3978
- await commitInboundEventIfClaimed();
3979
- return;
3980
- }
3981
- if (isRoom && triggerSnapshot) roomHistoryTracker.consumeHistory(_route.agentId, roomId, triggerSnapshot, messageId, threadRootId ? thread.threadId : void 0);
3982
- if (!hasFinalInboundReplyDispatch(dispatchResult)) {
3983
- await commitInboundEventIfClaimed();
3984
- return;
3985
- }
3986
- const finalCount = resolveInboundReplyDispatchCounts(dispatchResult).final;
3987
- logVerboseMessage(`matrix: delivered ${finalCount} reply${finalCount === 1 ? "" : "ies"} to ${replyTarget}`);
3988
- await commitInboundEventIfClaimed();
3989
- } catch (err) {
3990
- const draftController = draftControllerRef;
3991
- if (draftController?.draftStream?.eventId() && draftController.draftDisposition() === "active") draftController.markDraftRetained();
3992
- runtime.error?.(`matrix handler failed: ${String(err)}`);
3993
- } finally {
3994
- const draftStream = draftControllerRef?.draftStream;
3995
- if (draftStream) {
3996
- const draftEventId = await draftStream.stop().catch(() => void 0);
3997
- if (draftEventId && draftControllerRef?.draftDisposition() === "active") await redactMatrixDraftEvent(client, roomId, draftEventId);
3998
- }
3999
- inboundReplayClaim?.release();
4000
- }
4001
- };
4002
- }
4003
- //#endregion
4004
- //#region extensions/matrix/src/matrix/monitor/recent-invite.ts
4005
- function shouldPromoteRecentInviteRoom(params) {
4006
- if (!params.roomInfo.nameResolved || !params.roomInfo.aliasesResolved) return false;
4007
- const roomAliases = [params.roomInfo.canonicalAlias ?? "", ...params.roomInfo.altAliases].filter(Boolean);
4008
- if ((params.roomInfo.name?.trim() ?? "") || roomAliases.length > 0) return false;
4009
- return resolveMatrixRoomConfig({
4010
- rooms: params.rooms,
4011
- roomId: params.roomId,
4012
- aliases: roomAliases
4013
- }).matchSource === void 0;
4014
- }
4015
- //#endregion
4016
- //#region extensions/matrix/src/matrix/monitor/startup.ts
4017
- const loadMatrixStartupMaintenanceDeps = createLazyRuntimeModule(() => Promise.all([
4018
- import("./config-update-B_4qZ5bV.mjs").then((n) => n.t),
4019
- import("./device-health-CWOuIirq.mjs").then((n) => n.t),
4020
- import("./profile-ClrB3IgR.mjs").then((n) => n.n),
4021
- import("./startup-verification-Bq5qeEGn.mjs")
4022
- ]).then(([configUpdateModule, deviceHealthModule, profileModule, startupVerificationModule]) => ({
4023
- updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
4024
- summarizeMatrixDeviceHealth: deviceHealthModule.summarizeMatrixDeviceHealth,
4025
- syncMatrixOwnProfile: profileModule.syncMatrixOwnProfile,
4026
- ensureMatrixStartupVerification: startupVerificationModule.ensureMatrixStartupVerification
4027
- })));
4028
- async function runMatrixStartupMaintenance(params, deps) {
4029
- const runtimeDeps = deps ?? await loadMatrixStartupMaintenanceDeps();
4030
- throwIfMatrixStartupAborted(params.abortSignal);
4031
- try {
4032
- const profileSync = await runtimeDeps.syncMatrixOwnProfile({
4033
- client: params.client,
4034
- userId: params.auth.userId,
4035
- displayName: params.accountConfig.name,
4036
- avatarUrl: params.accountConfig.avatarUrl,
4037
- loadAvatarFromUrl: async (url, maxBytes) => await params.loadWebMedia(url, maxBytes)
4038
- });
4039
- throwIfMatrixStartupAborted(params.abortSignal);
4040
- if (profileSync.displayNameUpdated) params.logger.info(`matrix: profile display name updated for ${params.auth.userId}`);
4041
- if (profileSync.avatarUpdated) params.logger.info(`matrix: profile avatar updated for ${params.auth.userId}`);
4042
- if (profileSync.convertedAvatarFromHttp && profileSync.resolvedAvatarUrl && params.accountConfig.avatarUrl !== profileSync.resolvedAvatarUrl) {
4043
- const latestCfg = params.getRuntimeConfig();
4044
- const updatedCfg = runtimeDeps.updateMatrixAccountConfig(latestCfg, params.accountId, { avatarUrl: profileSync.resolvedAvatarUrl });
4045
- await params.replaceConfigFile(updatedCfg);
4046
- throwIfMatrixStartupAborted(params.abortSignal);
4047
- params.logVerboseMessage(`matrix: persisted converted avatar URL for account ${params.accountId} (${profileSync.resolvedAvatarUrl})`);
4048
- }
4049
- } catch (err) {
4050
- if (isMatrixStartupAbortError(err)) throw err;
4051
- params.logger.warn("matrix: failed to sync profile from config", { error: String(err) });
4052
- }
4053
- if (!(params.auth.encryption && params.client.crypto)) return;
4054
- try {
4055
- throwIfMatrixStartupAborted(params.abortSignal);
4056
- const deviceHealth = runtimeDeps.summarizeMatrixDeviceHealth(await params.client.listOwnDevices());
4057
- if (deviceHealth.staleOpenClawDevices.length > 0) params.logger.warn(`matrix: stale OpenClaw devices detected for ${params.auth.userId}: ${deviceHealth.staleOpenClawDevices.map((device) => device.deviceId).join(", ")}. Run 'openclaw matrix devices prune-stale --account ${params.effectiveAccountId}' to keep encrypted-room trust healthy.`);
4058
- } catch (err) {
4059
- if (isMatrixStartupAbortError(err)) throw err;
4060
- params.logger.debug?.("Failed to inspect matrix device hygiene (non-fatal)", { error: String(err) });
4061
- }
4062
- try {
4063
- throwIfMatrixStartupAborted(params.abortSignal);
4064
- const startupVerification = await runtimeDeps.ensureMatrixStartupVerification({
4065
- client: params.client,
4066
- auth: params.auth,
4067
- accountConfig: params.accountConfig,
4068
- env: params.env
4069
- });
4070
- throwIfMatrixStartupAborted(params.abortSignal);
4071
- if (startupVerification.kind === "verified") params.logger.info("matrix: device is verified by its owner and ready for encrypted rooms");
4072
- else if (startupVerification.kind === "disabled" || startupVerification.kind === "cooldown" || startupVerification.kind === "pending" || startupVerification.kind === "request-failed") {
4073
- params.logger.info("matrix: device not verified — run 'openclaw matrix verify device <key>' to enable E2EE");
4074
- if (startupVerification.kind === "pending") params.logger.info("matrix: startup verification request is already pending; finish it in another Matrix client");
4075
- else if (startupVerification.kind === "cooldown") params.logVerboseMessage(`matrix: skipped startup verification request due to cooldown (retryAfterMs=${startupVerification.retryAfterMs ?? 0})`);
4076
- else if (startupVerification.kind === "request-failed") params.logger.debug?.("Matrix startup verification request failed (non-fatal)", { error: startupVerification.error ?? "unknown" });
4077
- } else if (startupVerification.kind === "requested") params.logger.info("matrix: device not verified — requested verification in another Matrix client");
4078
- } catch (err) {
4079
- if (isMatrixStartupAbortError(err)) throw err;
4080
- params.logger.debug?.("Failed to resolve matrix verification status (non-fatal)", { error: String(err) });
4081
- }
4082
- }
4083
- //#endregion
4084
- //#region extensions/matrix/src/matrix/monitor/status.ts
4085
- function cloneLastDisconnect(value) {
4086
- if (!value || typeof value === "string") return value ?? null;
4087
- return { ...value };
4088
- }
4089
- function formatSyncError(error) {
4090
- if (!error) return null;
4091
- if (error instanceof Error) return error.message || error.name || "unknown";
4092
- return formatErrorMessage(error);
4093
- }
4094
- function createMatrixMonitorStatusController(params) {
4095
- const status = {
4096
- accountId: params.accountId,
4097
- ...params.baseUrl ? { baseUrl: params.baseUrl } : {},
4098
- connected: false,
4099
- lastConnectedAt: null,
4100
- lastDisconnect: null,
4101
- lastError: null,
4102
- healthState: "starting",
4103
- lifecycle: "starting"
4104
- };
4105
- const emit = () => {
4106
- params.statusSink?.({
4107
- ...status,
4108
- lastDisconnect: cloneLastDisconnect(status.lastDisconnect)
4109
- });
4110
- };
4111
- const noteConnected = (at = Date.now(), options) => {
4112
- const lastConnectedAt = status.connected === true ? status.lastConnectedAt ?? at : at;
4113
- Object.assign(status, channelReadyPatch({
4114
- lastConnectedAt,
4115
- lastEventAt: at,
4116
- lastDisconnect: null,
4117
- healthState: "healthy"
4118
- }));
4119
- if (options?.transportActivity) Object.assign(status, createTransportActivityStatusPatch(at));
4120
- emit();
4121
- };
4122
- const noteDisconnected = (paramsLocal) => {
4123
- const at = paramsLocal.at ?? Date.now();
4124
- const tokenInvalidated = isMatrixAccessTokenInvalidatedError(paramsLocal.error);
4125
- if (status.lifecycle === "blocked" && status.terminalDisconnect === true && !tokenInvalidated) {
4126
- status.connected = false;
4127
- status.lastEventAt = at;
4128
- emit();
4129
- return;
4130
- }
4131
- const error = formatSyncError(paramsLocal.error);
4132
- status.connected = false;
4133
- status.lastEventAt = at;
4134
- status.lastDisconnect = {
4135
- at,
4136
- ...error ? { error } : {}
4137
- };
4138
- status.healthState = paramsLocal.state.toLowerCase();
4139
- if (tokenInvalidated) Object.assign(status, channelBlockedPatch(error ?? "Matrix access token invalidated"));
4140
- else {
4141
- status.lastError = error;
4142
- status.lifecycle = "recovering";
4143
- status.terminalDisconnect = void 0;
4144
- }
4145
- emit();
4146
- };
4147
- emit();
4148
- return {
4149
- noteSyncState(state, error, at = Date.now()) {
4150
- if (isMatrixReadySyncState(state)) {
4151
- noteConnected(at, { transportActivity: state === "SYNCING" });
4152
- return;
4153
- }
4154
- if (isMatrixDisconnectedSyncState(state)) {
4155
- noteDisconnected({
4156
- state,
4157
- at,
4158
- error
4159
- });
4160
- return;
4161
- }
4162
- status.lastEventAt = at;
4163
- status.healthState = state.toLowerCase();
4164
- emit();
4165
- },
4166
- noteUnexpectedError(error, at = Date.now()) {
4167
- noteDisconnected({
4168
- state: "ERROR",
4169
- at,
4170
- error
4171
- });
4172
- },
4173
- markStopped(at = Date.now()) {
4174
- if (status.lifecycle !== "blocked" && status.healthState !== "error") Object.assign(status, channelStoppedPatch({
4175
- lastEventAt: at,
4176
- healthState: "stopped"
4177
- }));
4178
- else {
4179
- status.connected = false;
4180
- status.lastEventAt = at;
4181
- }
4182
- emit();
4183
- }
4184
- };
4185
- }
4186
- //#endregion
4187
- //#region extensions/matrix/src/matrix/monitor/sync-lifecycle.ts
4188
- function formatSyncLifecycleError(state, error) {
4189
- if (error instanceof Error) return error;
4190
- const message = typeof error === "string" && error.trim() ? error.trim() : void 0;
4191
- if (state === "STOPPED") return new Error(message ?? "Matrix sync stopped unexpectedly");
4192
- if (state === "ERROR") return new Error(message ?? "Matrix sync entered ERROR unexpectedly");
4193
- return new Error(message ?? `Matrix sync entered ${state} unexpectedly`);
4194
- }
4195
- function createMatrixMonitorSyncLifecycle(params) {
4196
- let fatalError = null;
4197
- let resolveFatalWait = null;
4198
- let rejectFatalWait = null;
4199
- const settleFatal = (error) => {
4200
- if (fatalError) return;
4201
- fatalError = error;
4202
- rejectFatalWait?.(error);
4203
- resolveFatalWait = null;
4204
- rejectFatalWait = null;
4205
- };
4206
- const onSyncState = (state, _prevState, error) => {
4207
- if (isMatrixTerminalSyncState(state) && !params.isStopping?.()) {
4208
- const fatalErrorLocal = formatSyncLifecycleError(state, error);
4209
- params.statusController.noteUnexpectedError(fatalErrorLocal);
4210
- settleFatal(fatalErrorLocal);
4211
- return;
4212
- }
4213
- if (fatalError) return;
4214
- if (params.isStopping?.() && !isMatrixTerminalSyncState(state)) return;
4215
- params.statusController.noteSyncState(state, error);
4216
- };
4217
- const onUnexpectedError = (error) => {
4218
- if (params.isStopping?.()) return;
4219
- params.statusController.noteUnexpectedError(error);
4220
- settleFatal(error);
4221
- };
4222
- params.client.on("sync.state", onSyncState);
4223
- params.client.on("sync.unexpected_error", onUnexpectedError);
4224
- return {
4225
- async waitForFatalStop() {
4226
- if (fatalError) throw fatalError;
4227
- if (resolveFatalWait || rejectFatalWait) throw new Error("Matrix fatal-stop wait already in progress");
4228
- await new Promise((resolve, reject) => {
4229
- resolveFatalWait = resolve;
4230
- rejectFatalWait = (error) => reject(error);
4231
- });
4232
- },
4233
- dispose() {
4234
- resolveFatalWait?.();
4235
- resolveFatalWait = null;
4236
- rejectFatalWait = null;
4237
- params.client.off("sync.state", onSyncState);
4238
- params.client.off("sync.unexpected_error", onUnexpectedError);
4239
- }
4240
- };
4241
- }
4242
- //#endregion
4243
- //#region extensions/matrix/src/matrix/monitor/index.ts
4244
- function resolveMatrixStreamingMode(streaming) {
4245
- const mode = streaming?.mode;
4246
- if (mode === "partial" || mode === "quiet" || mode === "progress") return mode;
4247
- return "off";
4248
- }
4249
- function resolveMatrixPreviewToolProgress(streaming) {
4250
- if (!streaming) return true;
4251
- if (resolveMatrixStreamingMode(streaming) === "progress") return streaming.progress?.toolProgress ?? streaming.preview?.toolProgress ?? false;
4252
- return streaming.preview?.toolProgress ?? true;
4253
- }
4254
- function resolveMatrixPreviewToolProgressEnabled(streaming) {
4255
- return resolveMatrixStreamingMode(streaming) !== "off" && resolveMatrixPreviewToolProgress(streaming);
4256
- }
4257
- const DEFAULT_MEDIA_MAX_MB = 20;
4258
- async function monitorMatrixProvider(opts = {}) {
4259
- if (opts.abortSignal?.aborted) return;
4260
- const core = getMatrixRuntime();
4261
- let cfg = core.config.current();
4262
- if (cfg.channels?.["matrix"]?.enabled === false) return;
4263
- const logger = core.logging.getChildLogger({ module: "matrix-auto-reply" });
4264
- const formatRuntimeMessage = (...args) => format(...args);
4265
- const runtime = opts.runtime ?? {
4266
- log: (...args) => {
4267
- logger.info(formatRuntimeMessage(...args));
4268
- },
4269
- error: (...args) => {
4270
- logger.error(formatRuntimeMessage(...args));
4271
- },
4272
- exit: (code) => {
4273
- throw new Error(`exit ${code}`);
4274
- }
4275
- };
4276
- const logVerboseMessage = (message) => {
4277
- if (!core.logging.shouldLogVerbose()) return;
4278
- logger.debug?.(message);
4279
- };
4280
- const effectiveAccountId = resolveMatrixAuthContext({
4281
- cfg,
4282
- accountId: opts.accountId
4283
- }).accountId;
4284
- const accountConfig = resolveMatrixAccountConfig({
4285
- cfg,
4286
- accountId: effectiveAccountId
4287
- });
4288
- const allowlistOnly = accountConfig.allowlistOnly === true;
4289
- const accountAllowBots = accountConfig.allowBots;
4290
- let roomsConfig = accountConfig.groups ?? accountConfig.rooms;
4291
- let needsRoomAliasesForConfig = false;
4292
- const initialAllowFrom = (accountConfig.dm?.allowFrom ?? []).map(String);
4293
- const initialGroupAllowFrom = (accountConfig.groupAllowFrom ?? []).map(String);
4294
- const configuredBotUserIds = resolveConfiguredMatrixBotUserIds({
4295
- cfg,
4296
- accountId: effectiveAccountId
4297
- });
4298
- const { allowFrom, allowFromResolvedEntries, groupAllowFrom, groupAllowFromResolvedEntries, roomsConfig: resolvedRoomsConfig } = await resolveMatrixMonitorConfig({
4299
- cfg,
4300
- accountId: effectiveAccountId,
4301
- allowFrom: initialAllowFrom,
4302
- groupAllowFrom: initialGroupAllowFrom,
4303
- roomsConfig,
4304
- runtime
4305
- });
4306
- roomsConfig = resolvedRoomsConfig;
4307
- needsRoomAliasesForConfig = Boolean(roomsConfig && Object.keys(roomsConfig).some((key) => key.trim().startsWith("#")));
4308
- cfg = {
4309
- ...cfg,
4310
- channels: {
4311
- ...cfg.channels,
4312
- matrix: {
4313
- ...cfg.channels?.["matrix"],
4314
- dm: {
4315
- ...cfg.channels?.["matrix"]?.dm,
4316
- allowFrom
4317
- },
4318
- groupAllowFrom,
4319
- ...roomsConfig ? { groups: roomsConfig } : {}
4320
- }
4321
- }
4322
- };
4323
- const auth = await resolveMatrixAuth({
4324
- cfg,
4325
- accountId: effectiveAccountId
4326
- });
4327
- const resolvedInitialSyncLimit = resolveOptionalIntegerOption(opts.initialSyncLimit, { min: 0 }) ?? auth.initialSyncLimit;
4328
- const authWithLimit = resolvedInitialSyncLimit === auth.initialSyncLimit ? auth : {
4329
- ...auth,
4330
- initialSyncLimit: resolvedInitialSyncLimit
4331
- };
4332
- const statusController = createMatrixMonitorStatusController({
4333
- accountId: auth.accountId,
4334
- baseUrl: auth.homeserver,
4335
- statusSink: opts.setStatus
4336
- });
4337
- let cleanedUp = false;
4338
- let cleanupPromise = null;
4339
- let client = null;
4340
- let clientLease = null;
4341
- let monitorLifecycleSignal = opts.abortSignal;
4342
- let threadBindingManager = null;
4343
- const monitorTaskRunner = createMatrixMonitorTaskRunner({
4344
- logger,
4345
- logVerboseMessage
4346
- });
4347
- let disposeAutoJoin = () => {};
4348
- let disposeMonitorEvents = () => {};
4349
- let syncLifecycle = null;
4350
- let monitorSetupClosed = false;
4351
- const cleanup = (mode = "persist") => {
4352
- if (cleanupPromise) return cleanupPromise;
4353
- cleanedUp = true;
4354
- cleanupPromise = (async () => {
4355
- try {
4356
- await clientLease?.release({ mode });
4357
- } finally {
4358
- statusController.markStopped();
4359
- }
4360
- })();
4361
- return cleanupPromise;
4362
- };
4363
- const defaultGroupPolicy = resolveDefaultGroupPolicy(cfg);
4364
- const { groupPolicy: groupPolicyRaw, providerMissingFallbackApplied } = resolveAllowlistProviderRuntimeGroupPolicy({
4365
- providerConfigPresent: cfg.channels?.["matrix"] !== void 0,
4366
- groupPolicy: accountConfig.groupPolicy,
4367
- defaultGroupPolicy
4368
- });
4369
- warnMissingProviderGroupPolicyFallbackOnce({
4370
- providerMissingFallbackApplied,
4371
- providerKey: "matrix",
4372
- accountId: effectiveAccountId,
4373
- blockedLabel: GROUP_POLICY_BLOCKED_LABEL.room,
4374
- log: (message) => logVerboseMessage(message)
4375
- });
4376
- const groupPolicy = allowlistOnly && groupPolicyRaw === "open" ? "allowlist" : groupPolicyRaw;
4377
- const replyToMode = opts.replyToMode ?? accountConfig.replyToMode ?? "off";
4378
- const threadReplies = accountConfig.threadReplies ?? "inbound";
4379
- const dmThreadReplies = accountConfig.dm?.threadReplies;
4380
- const threadBindingIdleTimeoutMs = resolveThreadBindingIdleTimeoutMsForChannel({
4381
- cfg,
4382
- channel: "matrix",
4383
- accountId: effectiveAccountId
4384
- });
4385
- const threadBindingMaxAgeMs = resolveThreadBindingMaxAgeMsForChannel({
4386
- cfg,
4387
- channel: "matrix",
4388
- accountId: effectiveAccountId
4389
- });
4390
- const dmConfig = accountConfig.dm;
4391
- const dmEnabled = dmConfig?.enabled ?? true;
4392
- const dmPolicyRaw = dmConfig?.policy ?? "pairing";
4393
- const dmPolicy = allowlistOnly && dmPolicyRaw !== "disabled" ? "allowlist" : dmPolicyRaw;
4394
- const dmSessionScope = dmConfig?.sessionScope ?? "per-user";
4395
- const globalGroupChatHistoryLimit = cfg.messages?.groupChat?.historyLimit;
4396
- const historyLimit = Math.max(0, accountConfig.historyLimit ?? globalGroupChatHistoryLimit ?? 0);
4397
- const mediaMaxMb = opts.mediaMaxMb ?? accountConfig.mediaMaxMb ?? DEFAULT_MEDIA_MAX_MB;
4398
- const mediaMaxBytes = Math.max(1, mediaMaxMb) * 1024 * 1024;
4399
- const streaming = resolveMatrixStreamingMode(accountConfig.streaming);
4400
- const previewToolProgressEnabled = resolveMatrixPreviewToolProgressEnabled(accountConfig.streaming);
4401
- const blockStreamingEnabled = resolveChannelStreamingBlockEnabled(accountConfig) === true;
4402
- const startupMs = Date.now();
4403
- const startupGraceMs = 0;
4404
- const warnedEncryptedRooms = /* @__PURE__ */ new Set();
4405
- const warnedCryptoMissingRooms = /* @__PURE__ */ new Set();
4406
- let healthySyncSinceMs;
4407
- const noteSyncHealthState = (state, at = Date.now()) => {
4408
- if (isMatrixReadySyncState(state)) {
4409
- healthySyncSinceMs ??= at;
4410
- return;
4411
- }
4412
- if (isMatrixDisconnectedSyncState(state)) healthySyncSinceMs = void 0;
4413
- };
4414
- const onSyncState = (state) => {
4415
- noteSyncHealthState(state);
4416
- };
4417
- const monitorRetirement = {
4418
- closeTaskAdmission: () => {
4419
- monitorSetupClosed = true;
4420
- monitorTaskRunner.close();
4421
- },
4422
- detachListeners: () => {
4423
- disposeAutoJoin();
4424
- disposeMonitorEvents();
4425
- client?.off("sync.state", onSyncState);
4426
- syncLifecycle?.dispose();
4427
- },
4428
- waitForTasks: monitorTaskRunner.waitForIdle,
4429
- cleanup: () => threadBindingManager?.stop()
4430
- };
4431
- try {
4432
- clientLease = await acquireSharedMatrixClient({
4433
- cfg,
4434
- auth: authWithLimit,
4435
- startClient: false,
4436
- accountId: auth.accountId,
4437
- abortSignal: opts.abortSignal,
4438
- role: "monitor"
4439
- });
4440
- client = clientLease.client;
4441
- monitorLifecycleSignal = opts.abortSignal ? AbortSignal.any([opts.abortSignal, clientLease.abortSignal]) : clientLease.abortSignal;
4442
- clientLease.registerMonitorRetirement(monitorRetirement);
4443
- const inboundDeduper = createMatrixInboundEventDeduper({
4444
- auth,
4445
- env: process.env
4446
- });
4447
- syncLifecycle = createMatrixMonitorSyncLifecycle({
4448
- client,
4449
- statusController,
4450
- isStopping: () => cleanedUp || monitorLifecycleSignal?.aborted === true
4451
- });
4452
- client.on("sync.state", onSyncState);
4453
- const dropPreStartupMessages = !client.hasPersistedSyncState();
4454
- const { getRoomInfo, getMemberDisplayName, invalidateMemberDisplayName } = createMatrixRoomInfoResolver(client);
4455
- const isExplicitlyConfiguredRoom = async (roomId) => {
4456
- const roomInfoForConfig = needsRoomAliasesForConfig ? await getRoomInfo(roomId, { includeAliases: true }) : void 0;
4457
- const aliases = roomInfoForConfig ? [roomInfoForConfig.canonicalAlias ?? "", ...roomInfoForConfig.altAliases].filter(Boolean) : [];
4458
- return resolveMatrixRoomConfig({
4459
- rooms: roomsConfig,
4460
- roomId,
4461
- aliases
4462
- }).matchSource === "direct";
4463
- };
4464
- const directTracker = createDirectRoomTracker(client, {
4465
- log: logVerboseMessage,
4466
- isExplicitlyConfiguredRoom,
4467
- canPromoteRecentInvite: async (roomId) => shouldPromoteRecentInviteRoom({
4468
- roomId,
4469
- roomInfo: await getRoomInfo(roomId, { includeAliases: true }),
4470
- rooms: roomsConfig
4471
- }),
4472
- ...dmSessionScope === "per-room" ? { canPromoteUnmappedStrictRoom: async (roomId) => shouldPromoteRecentInviteRoom({
4473
- roomId,
4474
- roomInfo: await getRoomInfo(roomId, { includeAliases: true }),
4475
- rooms: roomsConfig
4476
- }) } : {},
4477
- shouldKeepLocallyPromotedDirectRoom: async (roomId) => {
4478
- try {
4479
- const roomInfo = await getRoomInfo(roomId, { includeAliases: true });
4480
- if (!roomInfo.nameResolved || !roomInfo.aliasesResolved) return;
4481
- return shouldPromoteRecentInviteRoom({
4482
- roomId,
4483
- roomInfo,
4484
- rooms: roomsConfig
4485
- });
4486
- } catch (err) {
4487
- logVerboseMessage(`matrix: local promotion revalidation failed room=${roomId} (${String(err)})`);
4488
- return;
4489
- }
4490
- }
4491
- });
4492
- disposeAutoJoin = registerMatrixAutoJoin({
4493
- client,
4494
- accountConfig,
4495
- runtime,
4496
- runDetachedTask: monitorTaskRunner.runDetachedTask
4497
- });
4498
- const handleRoomMessage = createMatrixRoomMessageHandler({
4499
- client,
4500
- core,
4501
- cfg,
4502
- accountId: effectiveAccountId,
4503
- accountConfig,
4504
- runtime,
4505
- logger,
4506
- logVerboseMessage,
4507
- allowFrom,
4508
- allowFromResolvedEntries,
4509
- groupAllowFrom,
4510
- groupAllowFromResolvedEntries,
4511
- roomsConfig,
4512
- accountAllowBots,
4513
- configuredBotUserIds,
4514
- groupPolicy,
4515
- replyToMode,
4516
- threadReplies,
4517
- dmThreadReplies,
4518
- dmSessionScope,
4519
- streaming,
4520
- previewToolProgressEnabled,
4521
- blockStreamingEnabled,
4522
- dmEnabled,
4523
- dmPolicy,
4524
- mediaMaxBytes,
4525
- historyLimit,
4526
- startupMs,
4527
- startupGraceMs,
4528
- dropPreStartupMessages,
4529
- inboundDeduper,
4530
- directTracker,
4531
- getRoomInfo,
4532
- getMemberDisplayName,
4533
- needsRoomAliasesForConfig
4534
- });
4535
- const createdThreadBindingManager = await createMatrixThreadBindingManager({
4536
- cfg,
4537
- accountId: effectiveAccountId,
4538
- auth,
4539
- client,
4540
- env: process.env,
4541
- idleTimeoutMs: threadBindingIdleTimeoutMs,
4542
- maxAgeMs: threadBindingMaxAgeMs,
4543
- logVerboseMessage
4544
- });
4545
- if (monitorSetupClosed) {
4546
- await createdThreadBindingManager.stop();
4547
- await cleanup("stop");
4548
- return;
4549
- }
4550
- threadBindingManager = createdThreadBindingManager;
4551
- logVerboseMessage(`matrix: thread bindings ready account=${threadBindingManager.accountId} idleMs=${threadBindingIdleTimeoutMs} maxAgeMs=${threadBindingMaxAgeMs}`);
4552
- disposeMonitorEvents = registerMatrixMonitorEvents({
4553
- cfg,
4554
- client,
4555
- auth,
4556
- allowFrom,
4557
- dmEnabled,
4558
- dmPolicy,
4559
- readStoreAllowFrom: async () => await core.channel.pairing.readAllowFromStore({
4560
- channel: "matrix",
4561
- env: process.env,
4562
- accountId: effectiveAccountId
4563
- }).catch(() => []),
4564
- directTracker,
4565
- groupPolicy,
4566
- roomsConfig,
4567
- needsRoomAliasesForConfig,
4568
- getRoomInfo,
4569
- invalidateMemberDisplayName,
4570
- logVerboseMessage,
4571
- warnedEncryptedRooms,
4572
- warnedCryptoMissingRooms,
4573
- logger,
4574
- startupGraceMs,
4575
- getHealthySyncSinceMs: () => healthySyncSinceMs,
4576
- formatNativeDependencyHint: core.system.formatNativeDependencyHint,
4577
- onRoomMessage: handleRoomMessage,
4578
- runDetachedTask: monitorTaskRunner.runDetachedTask
4579
- });
4580
- logVerboseMessage("matrix: starting client");
4581
- await clientLease.start(monitorLifecycleSignal);
4582
- if (monitorSetupClosed) {
4583
- await cleanup("stop");
4584
- return;
4585
- }
4586
- logVerboseMessage("matrix: client started");
4587
- logger.info(`matrix: logged in as ${auth.userId}`);
4588
- backfillMatrixAuthDeviceIdAfterStartup({
4589
- auth,
4590
- env: process.env,
4591
- abortSignal: monitorLifecycleSignal
4592
- }).catch((err) => {
4593
- logVerboseMessage(`matrix: failed to backfill deviceId after startup (${String(err)})`);
4594
- });
4595
- registerChannelRuntimeContext({
4596
- channelRuntime: opts.channelRuntime,
4597
- channelId: "matrix",
4598
- accountId: effectiveAccountId,
4599
- capability: CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY,
4600
- context: { client },
4601
- abortSignal: monitorLifecycleSignal
4602
- });
4603
- await runMatrixStartupMaintenance({
4604
- client,
4605
- auth,
4606
- accountId: effectiveAccountId,
4607
- effectiveAccountId,
4608
- accountConfig,
4609
- logger,
4610
- logVerboseMessage,
4611
- getRuntimeConfig: () => core.config.current(),
4612
- replaceConfigFile: async (nextCfg) => {
4613
- await core.config.replaceConfigFile({
4614
- nextConfig: nextCfg,
4615
- afterWrite: { mode: "auto" }
4616
- });
4617
- },
4618
- loadWebMedia: async (url, maxBytes) => await core.media.loadWebMedia(url, maxBytes),
4619
- env: process.env,
4620
- abortSignal: monitorLifecycleSignal
4621
- });
4622
- if (monitorSetupClosed) {
4623
- await cleanup("stop");
4624
- return;
4625
- }
4626
- await Promise.race([waitUntilAbort(monitorLifecycleSignal, async () => {
4627
- try {
4628
- logVerboseMessage("matrix: stopping client");
4629
- await cleanup();
4630
- } catch (err) {
4631
- logger.warn("matrix: failed during monitor shutdown cleanup", { error: String(err) });
4632
- }
4633
- }), syncLifecycle.waitForFatalStop()]);
4634
- await cleanup();
4635
- } catch (err) {
4636
- if (monitorSetupClosed) {
4637
- await cleanup("stop");
4638
- return;
4639
- }
4640
- if (monitorLifecycleSignal?.aborted === true && isMatrixStartupAbortError(err)) {
4641
- await cleanup("stop");
4642
- return;
4643
- }
4644
- statusController.noteUnexpectedError(err);
4645
- await cleanup();
4646
- throw err;
4647
- }
4648
- }
4649
- //#endregion
4650
- export { monitorMatrixProvider };