@openclaw/matrix 2026.9.6 → 2026.9.8

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 (1932) 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 +142 -288
  68. package/dist/helper-api.js +2 -2
  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/@openclaw/fs-safe/CHANGELOG.md +1289 -0
  78. package/node_modules/@openclaw/fs-safe/LICENSE +22 -0
  79. package/node_modules/@openclaw/fs-safe/README.md +672 -0
  80. package/node_modules/@openclaw/fs-safe/SECURITY.md +45 -0
  81. package/node_modules/@openclaw/fs-safe/dist/absolute-path.d.ts +32 -0
  82. package/node_modules/@openclaw/fs-safe/dist/absolute-path.js +323 -0
  83. package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +41 -0
  84. package/node_modules/@openclaw/fs-safe/dist/advanced.js +40 -0
  85. package/node_modules/@openclaw/fs-safe/dist/archive-crc32.d.ts +1 -0
  86. package/node_modules/@openclaw/fs-safe/dist/archive-crc32.js +19 -0
  87. package/node_modules/@openclaw/fs-safe/dist/archive-deadline.d.ts +11 -0
  88. package/node_modules/@openclaw/fs-safe/dist/archive-deadline.js +101 -0
  89. package/node_modules/@openclaw/fs-safe/dist/archive-durability.d.ts +23 -0
  90. package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +180 -0
  91. package/node_modules/@openclaw/fs-safe/dist/archive-entry.d.ts +13 -0
  92. package/node_modules/@openclaw/fs-safe/dist/archive-entry.js +85 -0
  93. package/node_modules/@openclaw/fs-safe/dist/archive-errors.d.ts +12 -0
  94. package/node_modules/@openclaw/fs-safe/dist/archive-errors.js +23 -0
  95. package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.d.ts +20 -0
  96. package/node_modules/@openclaw/fs-safe/dist/archive-gzip-tail.js +99 -0
  97. package/node_modules/@openclaw/fs-safe/dist/archive-input.d.ts +18 -0
  98. package/node_modules/@openclaw/fs-safe/dist/archive-input.js +98 -0
  99. package/node_modules/@openclaw/fs-safe/dist/archive-kind.d.ts +7 -0
  100. package/node_modules/@openclaw/fs-safe/dist/archive-kind.js +71 -0
  101. package/node_modules/@openclaw/fs-safe/dist/archive-limits.d.ts +56 -0
  102. package/node_modules/@openclaw/fs-safe/dist/archive-limits.js +131 -0
  103. package/node_modules/@openclaw/fs-safe/dist/archive-merge.d.ts +22 -0
  104. package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +282 -0
  105. package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.d.ts +1 -0
  106. package/node_modules/@openclaw/fs-safe/dist/archive-parser-errors.js +12 -0
  107. package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
  108. package/node_modules/@openclaw/fs-safe/dist/archive-plan.d.ts +85 -0
  109. package/node_modules/@openclaw/fs-safe/dist/archive-plan.js +119 -0
  110. package/node_modules/@openclaw/fs-safe/dist/archive-read.d.ts +5 -0
  111. package/node_modules/@openclaw/fs-safe/dist/archive-read.js +234 -0
  112. package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +32 -0
  113. package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +308 -0
  114. package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.d.ts +27 -0
  115. package/node_modules/@openclaw/fs-safe/dist/archive-tar-stream.js +127 -0
  116. package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.d.ts +29 -0
  117. package/node_modules/@openclaw/fs-safe/dist/archive-tar-wasm.js +203 -0
  118. package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.d.ts +7 -0
  119. package/node_modules/@openclaw/fs-safe/dist/archive-zip-admission.js +96 -0
  120. package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.d.ts +1 -0
  121. package/node_modules/@openclaw/fs-safe/dist/archive-zip-count.js +160 -0
  122. package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.d.ts +21 -0
  123. package/node_modules/@openclaw/fs-safe/dist/archive-zip-directory.js +267 -0
  124. package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.d.ts +24 -0
  125. package/node_modules/@openclaw/fs-safe/dist/archive-zip-entry.js +10 -0
  126. package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.d.ts +4 -0
  127. package/node_modules/@openclaw/fs-safe/dist/archive-zip-integrity.js +30 -0
  128. package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.d.ts +12 -0
  129. package/node_modules/@openclaw/fs-safe/dist/archive-zip-loader.js +150 -0
  130. package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.d.ts +4 -0
  131. package/node_modules/@openclaw/fs-safe/dist/archive-zip-manifest.js +24 -0
  132. package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.d.ts +17 -0
  133. package/node_modules/@openclaw/fs-safe/dist/archive-zip-names.js +149 -0
  134. package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.d.ts +4 -0
  135. package/node_modules/@openclaw/fs-safe/dist/archive-zip-preflight.js +21 -0
  136. package/node_modules/@openclaw/fs-safe/dist/archive.d.ts +20 -0
  137. package/node_modules/@openclaw/fs-safe/dist/archive.js +332 -0
  138. package/node_modules/@openclaw/fs-safe/dist/async-lock.d.ts +1 -0
  139. package/node_modules/@openclaw/fs-safe/dist/async-lock.js +17 -0
  140. package/node_modules/@openclaw/fs-safe/dist/atomic.d.ts +6 -0
  141. package/node_modules/@openclaw/fs-safe/dist/atomic.js +4 -0
  142. package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.d.ts +2 -0
  143. package/node_modules/@openclaw/fs-safe/dist/bounded-read-stream.js +15 -0
  144. package/node_modules/@openclaw/fs-safe/dist/bounded-read.d.ts +25 -0
  145. package/node_modules/@openclaw/fs-safe/dist/bounded-read.js +143 -0
  146. package/node_modules/@openclaw/fs-safe/dist/byte-budget.d.ts +3 -0
  147. package/node_modules/@openclaw/fs-safe/dist/byte-budget.js +9 -0
  148. package/node_modules/@openclaw/fs-safe/dist/byte-view.d.ts +2 -0
  149. package/node_modules/@openclaw/fs-safe/dist/byte-view.js +13 -0
  150. package/node_modules/@openclaw/fs-safe/dist/clone-metadata.d.ts +19 -0
  151. package/node_modules/@openclaw/fs-safe/dist/clone-metadata.js +36 -0
  152. package/node_modules/@openclaw/fs-safe/dist/config.d.ts +2 -0
  153. package/node_modules/@openclaw/fs-safe/dist/config.js +2 -0
  154. package/node_modules/@openclaw/fs-safe/dist/containment.d.ts +1 -0
  155. package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +21 -0
  156. package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +71 -0
  157. package/node_modules/@openclaw/fs-safe/dist/copy-policy.d.ts +2 -0
  158. package/node_modules/@openclaw/fs-safe/dist/copy-policy.js +8 -0
  159. package/node_modules/@openclaw/fs-safe/dist/copy-publication.d.ts +18 -0
  160. package/node_modules/@openclaw/fs-safe/dist/copy-publication.js +29 -0
  161. package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.d.ts +8 -0
  162. package/node_modules/@openclaw/fs-safe/dist/copy-tree-portable.js +245 -0
  163. package/node_modules/@openclaw/fs-safe/dist/copy.d.ts +15 -0
  164. package/node_modules/@openclaw/fs-safe/dist/copy.js +143 -0
  165. package/node_modules/@openclaw/fs-safe/dist/create-owned-file.d.ts +7 -0
  166. package/node_modules/@openclaw/fs-safe/dist/create-owned-file.js +16 -0
  167. package/node_modules/@openclaw/fs-safe/dist/create.d.ts +17 -0
  168. package/node_modules/@openclaw/fs-safe/dist/create.js +388 -0
  169. package/node_modules/@openclaw/fs-safe/dist/creation-boundary.d.ts +60 -0
  170. package/node_modules/@openclaw/fs-safe/dist/creation-boundary.js +371 -0
  171. package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.d.ts +2 -0
  172. package/node_modules/@openclaw/fs-safe/dist/deny-mutation-match.js +71 -0
  173. package/node_modules/@openclaw/fs-safe/dist/deny-mutations.d.ts +11 -0
  174. package/node_modules/@openclaw/fs-safe/dist/deny-mutations.js +96 -0
  175. package/node_modules/@openclaw/fs-safe/dist/device-path.d.ts +14 -0
  176. package/node_modules/@openclaw/fs-safe/dist/device-path.js +139 -0
  177. package/node_modules/@openclaw/fs-safe/dist/directory-durability.d.ts +43 -0
  178. package/node_modules/@openclaw/fs-safe/dist/directory-durability.js +286 -0
  179. package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.d.ts +2 -0
  180. package/node_modules/@openclaw/fs-safe/dist/directory-entry-path.js +21 -0
  181. package/node_modules/@openclaw/fs-safe/dist/directory-guard.d.ts +54 -0
  182. package/node_modules/@openclaw/fs-safe/dist/directory-guard.js +176 -0
  183. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.d.ts +39 -0
  184. package/node_modules/@openclaw/fs-safe/dist/directory-mode-node.js +285 -0
  185. package/node_modules/@openclaw/fs-safe/dist/directory-receipt.d.ts +23 -0
  186. package/node_modules/@openclaw/fs-safe/dist/directory-receipt.js +121 -0
  187. package/node_modules/@openclaw/fs-safe/dist/durability.d.ts +4 -0
  188. package/node_modules/@openclaw/fs-safe/dist/durability.js +3 -0
  189. package/node_modules/@openclaw/fs-safe/dist/effective-uid.d.ts +1 -0
  190. package/node_modules/@openclaw/fs-safe/dist/effective-uid.js +22 -0
  191. package/node_modules/@openclaw/fs-safe/dist/error-detail.d.ts +2 -0
  192. package/node_modules/@openclaw/fs-safe/dist/error-detail.js +13 -0
  193. package/node_modules/@openclaw/fs-safe/dist/errors.d.ts +15 -0
  194. package/node_modules/@openclaw/fs-safe/dist/errors.js +27 -0
  195. package/node_modules/@openclaw/fs-safe/dist/file-cleanup.d.ts +19 -0
  196. package/node_modules/@openclaw/fs-safe/dist/file-cleanup.js +81 -0
  197. package/node_modules/@openclaw/fs-safe/dist/file-contents.d.ts +5 -0
  198. package/node_modules/@openclaw/fs-safe/dist/file-contents.js +40 -0
  199. package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.d.ts +15 -0
  200. package/node_modules/@openclaw/fs-safe/dist/file-handle-transfer.js +190 -0
  201. package/node_modules/@openclaw/fs-safe/dist/file-hash.d.ts +16 -0
  202. package/node_modules/@openclaw/fs-safe/dist/file-hash.js +296 -0
  203. package/node_modules/@openclaw/fs-safe/dist/file-identity.d.ts +7 -0
  204. package/node_modules/@openclaw/fs-safe/dist/file-identity.js +56 -0
  205. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.d.ts +22 -0
  206. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-acquisition.js +98 -0
  207. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.d.ts +17 -0
  208. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-admission.js +58 -0
  209. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +3 -0
  210. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +303 -0
  211. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.d.ts +17 -0
  212. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.js +66 -0
  213. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.d.ts +25 -0
  214. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-held.js +392 -0
  215. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.d.ts +40 -0
  216. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-io.js +209 -0
  217. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.d.ts +16 -0
  218. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-mutation.js +275 -0
  219. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.d.ts +11 -0
  220. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-options.js +58 -0
  221. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.d.ts +1 -0
  222. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-registration.js +90 -0
  223. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.d.ts +34 -0
  224. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root.js +288 -0
  225. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.d.ts +19 -0
  226. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-stale-admission.js +199 -0
  227. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.d.ts +17 -0
  228. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync.js +341 -0
  229. package/node_modules/@openclaw/fs-safe/dist/file-lock.d.ts +23 -0
  230. package/node_modules/@openclaw/fs-safe/dist/file-lock.js +66 -0
  231. package/node_modules/@openclaw/fs-safe/dist/file-observation.d.ts +8 -0
  232. package/node_modules/@openclaw/fs-safe/dist/file-observation.js +22 -0
  233. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.d.ts +34 -0
  234. package/node_modules/@openclaw/fs-safe/dist/file-store-boundary.js +174 -0
  235. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.d.ts +11 -0
  236. package/node_modules/@openclaw/fs-safe/dist/file-store-prune.js +110 -0
  237. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.d.ts +15 -0
  238. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-directory.js +319 -0
  239. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.d.ts +9 -0
  240. package/node_modules/@openclaw/fs-safe/dist/file-store-sync-write.js +128 -0
  241. package/node_modules/@openclaw/fs-safe/dist/file-store.d.ts +62 -0
  242. package/node_modules/@openclaw/fs-safe/dist/file-store.js +360 -0
  243. package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +4 -0
  244. package/node_modules/@openclaw/fs-safe/dist/file-sync.js +19 -0
  245. package/node_modules/@openclaw/fs-safe/dist/filename.d.ts +8 -0
  246. package/node_modules/@openclaw/fs-safe/dist/filename.js +138 -0
  247. package/node_modules/@openclaw/fs-safe/dist/fs.d.ts +12 -0
  248. package/node_modules/@openclaw/fs-safe/dist/fs.js +30 -0
  249. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.d.ts +25 -0
  250. package/node_modules/@openclaw/fs-safe/dist/guarded-mkdir.js +281 -0
  251. package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.d.ts +32 -0
  252. package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +81 -0
  253. package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.d.ts +1 -0
  254. package/node_modules/@openclaw/fs-safe/dist/guest-dispatch-python.js +68 -0
  255. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.d.ts +3 -0
  256. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +127 -0
  257. package/node_modules/@openclaw/fs-safe/dist/guest.d.ts +8 -0
  258. package/node_modules/@openclaw/fs-safe/dist/guest.js +433 -0
  259. package/node_modules/@openclaw/fs-safe/dist/home-dir.d.ts +11 -0
  260. package/node_modules/@openclaw/fs-safe/dist/home-dir.js +149 -0
  261. package/node_modules/@openclaw/fs-safe/dist/index.d.ts +9 -0
  262. package/node_modules/@openclaw/fs-safe/dist/index.js +5 -0
  263. package/node_modules/@openclaw/fs-safe/dist/install-path.d.ts +25 -0
  264. package/node_modules/@openclaw/fs-safe/dist/install-path.js +136 -0
  265. package/node_modules/@openclaw/fs-safe/dist/json-document-store.d.ts +32 -0
  266. package/node_modules/@openclaw/fs-safe/dist/json-document-store.js +105 -0
  267. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.d.ts +14 -0
  268. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-directory.js +154 -0
  269. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.d.ts +19 -0
  270. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-ownership.js +355 -0
  271. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.d.ts +5 -0
  272. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue-read.js +65 -0
  273. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.d.ts +44 -0
  274. package/node_modules/@openclaw/fs-safe/dist/json-durable-queue.js +210 -0
  275. package/node_modules/@openclaw/fs-safe/dist/json-store.d.ts +8 -0
  276. package/node_modules/@openclaw/fs-safe/dist/json-store.js +15 -0
  277. package/node_modules/@openclaw/fs-safe/dist/json-stringify.d.ts +1 -0
  278. package/node_modules/@openclaw/fs-safe/dist/json-stringify.js +7 -0
  279. package/node_modules/@openclaw/fs-safe/dist/json.d.ts +49 -0
  280. package/node_modules/@openclaw/fs-safe/dist/json.js +323 -0
  281. package/node_modules/@openclaw/fs-safe/dist/local-file-access.d.ts +8 -0
  282. package/node_modules/@openclaw/fs-safe/dist/local-file-access.js +81 -0
  283. package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.d.ts +13 -0
  284. package/node_modules/@openclaw/fs-safe/dist/local-file-descriptor.js +84 -0
  285. package/node_modules/@openclaw/fs-safe/dist/local-roots.d.ts +20 -0
  286. package/node_modules/@openclaw/fs-safe/dist/local-roots.js +160 -0
  287. package/node_modules/@openclaw/fs-safe/dist/lock-config.d.ts +9 -0
  288. package/node_modules/@openclaw/fs-safe/dist/lock-config.js +12 -0
  289. package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.d.ts +30 -0
  290. package/node_modules/@openclaw/fs-safe/dist/move-path-cleanup.js +224 -0
  291. package/node_modules/@openclaw/fs-safe/dist/move-path-stage.d.ts +7 -0
  292. package/node_modules/@openclaw/fs-safe/dist/move-path-stage.js +56 -0
  293. package/node_modules/@openclaw/fs-safe/dist/move-path.d.ts +20 -0
  294. package/node_modules/@openclaw/fs-safe/dist/move-path.js +390 -0
  295. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.d.ts +8 -0
  296. package/node_modules/@openclaw/fs-safe/dist/mutation-authority.js +41 -0
  297. package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +199 -0
  298. package/node_modules/@openclaw/fs-safe/dist/native-binding.js +8 -0
  299. package/node_modules/@openclaw/fs-safe/dist/native-config.d.ts +16 -0
  300. package/node_modules/@openclaw/fs-safe/dist/native-config.js +71 -0
  301. package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.d.ts +16 -0
  302. package/node_modules/@openclaw/fs-safe/dist/native-directory-observation.js +37 -0
  303. package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.d.ts +3 -0
  304. package/node_modules/@openclaw/fs-safe/dist/native-fallback-warning.js +11 -0
  305. package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +15 -0
  306. package/node_modules/@openclaw/fs-safe/dist/native-operations.js +111 -0
  307. package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.d.ts +34 -0
  308. package/node_modules/@openclaw/fs-safe/dist/native-parent-admission.js +147 -0
  309. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.d.ts +6 -0
  310. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +252 -0
  311. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.d.ts +4 -0
  312. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write.js +478 -0
  313. package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.d.ts +11 -0
  314. package/node_modules/@openclaw/fs-safe/dist/native-policy-directory-observation.js +61 -0
  315. package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.d.ts +13 -0
  316. package/node_modules/@openclaw/fs-safe/dist/native-policy-parent-windows.js +209 -0
  317. package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.d.ts +3 -0
  318. package/node_modules/@openclaw/fs-safe/dist/native-rename-outcome.js +8 -0
  319. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.d.ts +45 -0
  320. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +442 -0
  321. package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.d.ts +13 -0
  322. package/node_modules/@openclaw/fs-safe/dist/native-staged-symlink.js +303 -0
  323. package/node_modules/@openclaw/fs-safe/dist/native.d.ts +13 -0
  324. package/node_modules/@openclaw/fs-safe/dist/native.js +209 -0
  325. package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.d.ts +7 -0
  326. package/node_modules/@openclaw/fs-safe/dist/opened-file-failure.js +46 -0
  327. package/node_modules/@openclaw/fs-safe/dist/opened-realpath.d.ts +15 -0
  328. package/node_modules/@openclaw/fs-safe/dist/opened-realpath.js +102 -0
  329. package/node_modules/@openclaw/fs-safe/dist/output.d.ts +16 -0
  330. package/node_modules/@openclaw/fs-safe/dist/output.js +139 -0
  331. package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.d.ts +7 -0
  332. package/node_modules/@openclaw/fs-safe/dist/overwrite-file-handle.js +46 -0
  333. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.d.ts +1 -0
  334. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch-worker.js +54 -0
  335. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.d.ts +5 -0
  336. package/node_modules/@openclaw/fs-safe/dist/owner-dacl-batch.js +64 -0
  337. package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +32 -0
  338. package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +39 -0
  339. package/node_modules/@openclaw/fs-safe/dist/path-case.d.ts +6 -0
  340. package/node_modules/@openclaw/fs-safe/dist/path-case.js +136 -0
  341. package/node_modules/@openclaw/fs-safe/dist/path-policy.d.ts +24 -0
  342. package/node_modules/@openclaw/fs-safe/dist/path-policy.js +49 -0
  343. package/node_modules/@openclaw/fs-safe/dist/path-prefix.d.ts +6 -0
  344. package/node_modules/@openclaw/fs-safe/dist/path-prefix.js +104 -0
  345. package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.d.ts +13 -0
  346. package/node_modules/@openclaw/fs-safe/dist/path-scope-lexical.js +37 -0
  347. package/node_modules/@openclaw/fs-safe/dist/path-segment-route.d.ts +6 -0
  348. package/node_modules/@openclaw/fs-safe/dist/path-segment-route.js +24 -0
  349. package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.d.ts +11 -0
  350. package/node_modules/@openclaw/fs-safe/dist/path-suffix-aliases.js +394 -0
  351. package/node_modules/@openclaw/fs-safe/dist/path.d.ts +20 -0
  352. package/node_modules/@openclaw/fs-safe/dist/path.js +185 -0
  353. package/node_modules/@openclaw/fs-safe/dist/permission-exec.d.ts +32 -0
  354. package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +194 -0
  355. package/node_modules/@openclaw/fs-safe/dist/permissions-public.d.ts +5 -0
  356. package/node_modules/@openclaw/fs-safe/dist/permissions-public.js +4 -0
  357. package/node_modules/@openclaw/fs-safe/dist/permissions-windows.d.ts +48 -0
  358. package/node_modules/@openclaw/fs-safe/dist/permissions-windows.js +319 -0
  359. package/node_modules/@openclaw/fs-safe/dist/permissions.d.ts +52 -0
  360. package/node_modules/@openclaw/fs-safe/dist/permissions.js +131 -0
  361. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.d.ts +23 -0
  362. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-admission.js +421 -0
  363. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.d.ts +38 -0
  364. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-observation.js +205 -0
  365. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.d.ts +18 -0
  366. package/node_modules/@openclaw/fs-safe/dist/pinned-mutation-shared-route.js +70 -0
  367. package/node_modules/@openclaw/fs-safe/dist/pinned-open.d.ts +30 -0
  368. package/node_modules/@openclaw/fs-safe/dist/pinned-open.js +98 -0
  369. package/node_modules/@openclaw/fs-safe/dist/pinned-operation.d.ts +1 -0
  370. package/node_modules/@openclaw/fs-safe/dist/pinned-operation.js +22 -0
  371. package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.d.ts +3 -0
  372. package/node_modules/@openclaw/fs-safe/dist/pinned-write-input.js +35 -0
  373. package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.d.ts +4 -0
  374. package/node_modules/@openclaw/fs-safe/dist/pinned-write-mode.js +31 -0
  375. package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.d.ts +5 -0
  376. package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +185 -0
  377. package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +68 -0
  378. package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.js +1 -0
  379. package/node_modules/@openclaw/fs-safe/dist/pinned-write.d.ts +12 -0
  380. package/node_modules/@openclaw/fs-safe/dist/pinned-write.js +300 -0
  381. package/node_modules/@openclaw/fs-safe/dist/positional-read.d.ts +8 -0
  382. package/node_modules/@openclaw/fs-safe/dist/positional-read.js +36 -0
  383. package/node_modules/@openclaw/fs-safe/dist/private-directory.d.ts +4 -0
  384. package/node_modules/@openclaw/fs-safe/dist/private-directory.js +30 -0
  385. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.d.ts +3 -0
  386. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff-sync.js +72 -0
  387. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.d.ts +53 -0
  388. package/node_modules/@openclaw/fs-safe/dist/private-producer-handoff.js +358 -0
  389. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.d.ts +7 -0
  390. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +341 -0
  391. package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +13 -0
  392. package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +60 -0
  393. package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.d.ts +27 -0
  394. package/node_modules/@openclaw/fs-safe/dist/publish-file-failure.js +22 -0
  395. package/node_modules/@openclaw/fs-safe/dist/publish-file.d.ts +19 -0
  396. package/node_modules/@openclaw/fs-safe/dist/publish-file.js +332 -0
  397. package/node_modules/@openclaw/fs-safe/dist/read-open-flags.d.ts +7 -0
  398. package/node_modules/@openclaw/fs-safe/dist/read-open-flags.js +13 -0
  399. package/node_modules/@openclaw/fs-safe/dist/read-opened-file.d.ts +17 -0
  400. package/node_modules/@openclaw/fs-safe/dist/read-opened-file.js +18 -0
  401. package/node_modules/@openclaw/fs-safe/dist/realpath.d.ts +3 -0
  402. package/node_modules/@openclaw/fs-safe/dist/realpath.js +43 -0
  403. package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.d.ts +2 -0
  404. package/node_modules/@openclaw/fs-safe/dist/recursive-mkdir-path.js +8 -0
  405. package/node_modules/@openclaw/fs-safe/dist/regular-file.d.ts +37 -0
  406. package/node_modules/@openclaw/fs-safe/dist/regular-file.js +317 -0
  407. package/node_modules/@openclaw/fs-safe/dist/replace-directory.d.ts +6 -0
  408. package/node_modules/@openclaw/fs-safe/dist/replace-directory.js +275 -0
  409. package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.d.ts +4 -0
  410. package/node_modules/@openclaw/fs-safe/dist/replace-file-buffer.js +36 -0
  411. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.d.ts +32 -0
  412. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +369 -0
  413. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.d.ts +20 -0
  414. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-source.js +101 -0
  415. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.d.ts +46 -0
  416. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +168 -0
  417. package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.d.ts +21 -0
  418. package/node_modules/@openclaw/fs-safe/dist/replace-file-destination.js +123 -0
  419. package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.d.ts +2 -0
  420. package/node_modules/@openclaw/fs-safe/dist/replace-file-mode.js +10 -0
  421. package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.d.ts +26 -0
  422. package/node_modules/@openclaw/fs-safe/dist/replace-file-mutation.js +47 -0
  423. package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.d.ts +5 -0
  424. package/node_modules/@openclaw/fs-safe/dist/replace-file-rename-policy.js +30 -0
  425. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.d.ts +49 -0
  426. package/node_modules/@openclaw/fs-safe/dist/replace-file-temp-owner.js +368 -0
  427. package/node_modules/@openclaw/fs-safe/dist/replace-file-types.d.ts +55 -0
  428. package/node_modules/@openclaw/fs-safe/dist/replace-file-types.js +1 -0
  429. package/node_modules/@openclaw/fs-safe/dist/replace-file.d.ts +6 -0
  430. package/node_modules/@openclaw/fs-safe/dist/replace-file.js +356 -0
  431. package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.d.ts +26 -0
  432. package/node_modules/@openclaw/fs-safe/dist/retained-directory-replacement.js +193 -0
  433. package/node_modules/@openclaw/fs-safe/dist/retained-file-types.d.ts +50 -0
  434. package/node_modules/@openclaw/fs-safe/dist/retained-file-types.js +1 -0
  435. package/node_modules/@openclaw/fs-safe/dist/retained-file.d.ts +3 -0
  436. package/node_modules/@openclaw/fs-safe/dist/retained-file.js +121 -0
  437. package/node_modules/@openclaw/fs-safe/dist/root-boundary.d.ts +29 -0
  438. package/node_modules/@openclaw/fs-safe/dist/root-boundary.js +186 -0
  439. package/node_modules/@openclaw/fs-safe/dist/root-context.d.ts +43 -0
  440. package/node_modules/@openclaw/fs-safe/dist/root-context.js +233 -0
  441. package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +16 -0
  442. package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +93 -0
  443. package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.d.ts +12 -0
  444. package/node_modules/@openclaw/fs-safe/dist/root-directory-creation.js +225 -0
  445. package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.d.ts +9 -0
  446. package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +28 -0
  447. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +46 -0
  448. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +433 -0
  449. package/node_modules/@openclaw/fs-safe/dist/root-directory.d.ts +22 -0
  450. package/node_modules/@openclaw/fs-safe/dist/root-directory.js +141 -0
  451. package/node_modules/@openclaw/fs-safe/dist/root-entries.d.ts +10 -0
  452. package/node_modules/@openclaw/fs-safe/dist/root-entries.js +61 -0
  453. package/node_modules/@openclaw/fs-safe/dist/root-errors.d.ts +16 -0
  454. package/node_modules/@openclaw/fs-safe/dist/root-errors.js +92 -0
  455. package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.d.ts +20 -0
  456. package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +81 -0
  457. package/node_modules/@openclaw/fs-safe/dist/root-file.d.ts +46 -0
  458. package/node_modules/@openclaw/fs-safe/dist/root-file.js +205 -0
  459. package/node_modules/@openclaw/fs-safe/dist/root-handle-context.d.ts +4 -0
  460. package/node_modules/@openclaw/fs-safe/dist/root-handle-context.js +12 -0
  461. package/node_modules/@openclaw/fs-safe/dist/root-impl.d.ts +117 -0
  462. package/node_modules/@openclaw/fs-safe/dist/root-impl.js +1446 -0
  463. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.d.ts +10 -0
  464. package/node_modules/@openclaw/fs-safe/dist/root-move-noreplace.js +205 -0
  465. package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +7 -0
  466. package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.js +16 -0
  467. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.d.ts +7 -0
  468. package/node_modules/@openclaw/fs-safe/dist/root-observed-path.js +90 -0
  469. package/node_modules/@openclaw/fs-safe/dist/root-options.d.ts +84 -0
  470. package/node_modules/@openclaw/fs-safe/dist/root-options.js +18 -0
  471. package/node_modules/@openclaw/fs-safe/dist/root-path-errors.d.ts +12 -0
  472. package/node_modules/@openclaw/fs-safe/dist/root-path-errors.js +22 -0
  473. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +12 -0
  474. package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +160 -0
  475. package/node_modules/@openclaw/fs-safe/dist/root-path-observation.d.ts +55 -0
  476. package/node_modules/@openclaw/fs-safe/dist/root-path-observation.js +180 -0
  477. package/node_modules/@openclaw/fs-safe/dist/root-path-stat.d.ts +4 -0
  478. package/node_modules/@openclaw/fs-safe/dist/root-path-stat.js +151 -0
  479. package/node_modules/@openclaw/fs-safe/dist/root-path.d.ts +53 -0
  480. package/node_modules/@openclaw/fs-safe/dist/root-path.js +440 -0
  481. package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.d.ts +8 -0
  482. package/node_modules/@openclaw/fs-safe/dist/root-paths-lexical.js +22 -0
  483. package/node_modules/@openclaw/fs-safe/dist/root-paths.d.ts +58 -0
  484. package/node_modules/@openclaw/fs-safe/dist/root-paths.js +296 -0
  485. package/node_modules/@openclaw/fs-safe/dist/root-public-types.d.ts +11 -0
  486. package/node_modules/@openclaw/fs-safe/dist/root-public-types.js +1 -0
  487. package/node_modules/@openclaw/fs-safe/dist/root-read-admission.d.ts +25 -0
  488. package/node_modules/@openclaw/fs-safe/dist/root-read-admission.js +86 -0
  489. package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.d.ts +12 -0
  490. package/node_modules/@openclaw/fs-safe/dist/root-remove-identity.js +87 -0
  491. package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.d.ts +16 -0
  492. package/node_modules/@openclaw/fs-safe/dist/root-remove-receipt.js +37 -0
  493. package/node_modules/@openclaw/fs-safe/dist/root-remove.d.ts +6 -0
  494. package/node_modules/@openclaw/fs-safe/dist/root-remove.js +464 -0
  495. package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.d.ts +13 -0
  496. package/node_modules/@openclaw/fs-safe/dist/root-symlink-policy.js +34 -0
  497. package/node_modules/@openclaw/fs-safe/dist/root-walk.d.ts +48 -0
  498. package/node_modules/@openclaw/fs-safe/dist/root-walk.js +234 -0
  499. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.d.ts +65 -0
  500. package/node_modules/@openclaw/fs-safe/dist/root-write-admission.js +299 -0
  501. package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.d.ts +11 -0
  502. package/node_modules/@openclaw/fs-safe/dist/root-write-compatibility.js +23 -0
  503. package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.d.ts +43 -0
  504. package/node_modules/@openclaw/fs-safe/dist/root-write-complete-parent.js +180 -0
  505. package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.d.ts +14 -0
  506. package/node_modules/@openclaw/fs-safe/dist/root-write-lock-binding.js +162 -0
  507. package/node_modules/@openclaw/fs-safe/dist/root-write-mode.d.ts +7 -0
  508. package/node_modules/@openclaw/fs-safe/dist/root-write-mode.js +72 -0
  509. package/node_modules/@openclaw/fs-safe/dist/root-write-publication.d.ts +23 -0
  510. package/node_modules/@openclaw/fs-safe/dist/root-write-publication.js +85 -0
  511. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +11 -0
  512. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +95 -0
  513. package/node_modules/@openclaw/fs-safe/dist/root.d.ts +2 -0
  514. package/node_modules/@openclaw/fs-safe/dist/root.js +1 -0
  515. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.d.ts +12 -0
  516. package/node_modules/@openclaw/fs-safe/dist/safe-path-segment.js +80 -0
  517. package/node_modules/@openclaw/fs-safe/dist/secret-file.d.ts +29 -0
  518. package/node_modules/@openclaw/fs-safe/dist/secret-file.js +333 -0
  519. package/node_modules/@openclaw/fs-safe/dist/secret-read-async.d.ts +3 -0
  520. package/node_modules/@openclaw/fs-safe/dist/secret-read-async.js +58 -0
  521. package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.d.ts +20 -0
  522. package/node_modules/@openclaw/fs-safe/dist/secret-read-policy.js +68 -0
  523. package/node_modules/@openclaw/fs-safe/dist/secret.d.ts +3 -0
  524. package/node_modules/@openclaw/fs-safe/dist/secret.js +3 -0
  525. package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.d.ts +10 -0
  526. package/node_modules/@openclaw/fs-safe/dist/secure-file-windows.js +79 -0
  527. package/node_modules/@openclaw/fs-safe/dist/secure-file.d.ts +31 -0
  528. package/node_modules/@openclaw/fs-safe/dist/secure-file.js +298 -0
  529. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.d.ts +29 -0
  530. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +176 -0
  531. package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.d.ts +34 -0
  532. package/node_modules/@openclaw/fs-safe/dist/secure-temp-repair.js +110 -0
  533. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +17 -0
  534. package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +301 -0
  535. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.d.ts +28 -0
  536. package/node_modules/@openclaw/fs-safe/dist/sibling-temp.js +132 -0
  537. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.d.ts +4 -0
  538. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +442 -0
  539. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.d.ts +18 -0
  540. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-context.js +60 -0
  541. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.d.ts +41 -0
  542. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission-parser.js +113 -0
  543. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +31 -0
  544. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.js +1 -0
  545. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.d.ts +20 -0
  546. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-handle.js +48 -0
  547. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.d.ts +14 -0
  548. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-policy.js +113 -0
  549. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.d.ts +67 -0
  550. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-reclaim.js +374 -0
  551. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.d.ts +13 -0
  552. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-registration.js +47 -0
  553. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.d.ts +2 -0
  554. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-root.js +79 -0
  555. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.d.ts +34 -0
  556. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-stale-admission.js +228 -0
  557. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.d.ts +7 -0
  558. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-target.js +55 -0
  559. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.d.ts +68 -0
  560. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-types.js +1 -0
  561. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.d.ts +13 -0
  562. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +282 -0
  563. package/node_modules/@openclaw/fs-safe/dist/staged-directory.d.ts +27 -0
  564. package/node_modules/@openclaw/fs-safe/dist/staged-directory.js +148 -0
  565. package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.d.ts +16 -0
  566. package/node_modules/@openclaw/fs-safe/dist/staged-file-settlement.js +57 -0
  567. package/node_modules/@openclaw/fs-safe/dist/staged-file-types.d.ts +55 -0
  568. package/node_modules/@openclaw/fs-safe/dist/staged-file-types.js +1 -0
  569. package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.d.ts +39 -0
  570. package/node_modules/@openclaw/fs-safe/dist/staged-symlink-types.js +1 -0
  571. package/node_modules/@openclaw/fs-safe/dist/stat-observation.d.ts +10 -0
  572. package/node_modules/@openclaw/fs-safe/dist/stat-observation.js +57 -0
  573. package/node_modules/@openclaw/fs-safe/dist/store.d.ts +3 -0
  574. package/node_modules/@openclaw/fs-safe/dist/store.js +3 -0
  575. package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.d.ts +7 -0
  576. package/node_modules/@openclaw/fs-safe/dist/strict-file-identity.js +88 -0
  577. package/node_modules/@openclaw/fs-safe/dist/string-coerce.d.ts +4 -0
  578. package/node_modules/@openclaw/fs-safe/dist/string-coerce.js +16 -0
  579. package/node_modules/@openclaw/fs-safe/dist/suppressed-error.d.ts +5 -0
  580. package/node_modules/@openclaw/fs-safe/dist/suppressed-error.js +15 -0
  581. package/node_modules/@openclaw/fs-safe/dist/symlink-parents.d.ts +11 -0
  582. package/node_modules/@openclaw/fs-safe/dist/symlink-parents.js +109 -0
  583. package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.d.ts +13 -0
  584. package/node_modules/@openclaw/fs-safe/dist/temp-cleanup.js +88 -0
  585. package/node_modules/@openclaw/fs-safe/dist/temp-target.d.ts +31 -0
  586. package/node_modules/@openclaw/fs-safe/dist/temp-target.js +236 -0
  587. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.d.ts +14 -0
  588. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +387 -0
  589. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +23 -0
  590. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +150 -0
  591. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.d.ts +42 -0
  592. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +341 -0
  593. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.d.ts +24 -0
  594. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-owner.js +398 -0
  595. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.d.ts +8 -0
  596. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-ownership.js +52 -0
  597. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.d.ts +39 -0
  598. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-types.js +1 -0
  599. package/node_modules/@openclaw/fs-safe/dist/temp.d.ts +3 -0
  600. package/node_modules/@openclaw/fs-safe/dist/temp.js +2 -0
  601. package/node_modules/@openclaw/fs-safe/dist/test-hooks.d.ts +35 -0
  602. package/node_modules/@openclaw/fs-safe/dist/test-hooks.js +13 -0
  603. package/node_modules/@openclaw/fs-safe/dist/text-atomic.d.ts +14 -0
  604. package/node_modules/@openclaw/fs-safe/dist/text-atomic.js +18 -0
  605. package/node_modules/@openclaw/fs-safe/dist/timing.d.ts +8 -0
  606. package/node_modules/@openclaw/fs-safe/dist/timing.js +59 -0
  607. package/node_modules/@openclaw/fs-safe/dist/trash.d.ts +4 -0
  608. package/node_modules/@openclaw/fs-safe/dist/trash.js +245 -0
  609. package/node_modules/@openclaw/fs-safe/dist/types.d.ts +22 -0
  610. package/node_modules/@openclaw/fs-safe/dist/types.js +1 -0
  611. package/node_modules/@openclaw/fs-safe/dist/unicode-path.d.ts +2 -0
  612. package/node_modules/@openclaw/fs-safe/dist/unicode-path.js +16 -0
  613. package/node_modules/@openclaw/fs-safe/dist/walk.d.ts +37 -0
  614. package/node_modules/@openclaw/fs-safe/dist/walk.js +207 -0
  615. package/node_modules/@openclaw/fs-safe/dist/watch-alias.d.ts +6 -0
  616. package/node_modules/@openclaw/fs-safe/dist/watch-alias.js +88 -0
  617. package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +9 -0
  618. package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +93 -0
  619. package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +36 -0
  620. package/node_modules/@openclaw/fs-safe/dist/watch-native.js +73 -0
  621. package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +28 -0
  622. package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +300 -0
  623. package/node_modules/@openclaw/fs-safe/dist/watch-stream.d.ts +8 -0
  624. package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +32 -0
  625. package/node_modules/@openclaw/fs-safe/dist/watch-types.d.ts +60 -0
  626. package/node_modules/@openclaw/fs-safe/dist/watch-types.js +1 -0
  627. package/node_modules/@openclaw/fs-safe/dist/watch.d.ts +5 -0
  628. package/node_modules/@openclaw/fs-safe/dist/watch.js +530 -0
  629. package/node_modules/@openclaw/fs-safe/dist/windows-command.d.ts +1 -0
  630. package/node_modules/@openclaw/fs-safe/dist/windows-command.js +34 -0
  631. package/node_modules/@openclaw/fs-safe/dist/windows-owner.d.ts +24 -0
  632. package/node_modules/@openclaw/fs-safe/dist/windows-owner.js +100 -0
  633. package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.d.ts +39 -0
  634. package/node_modules/@openclaw/fs-safe/dist/windows-path-alias.js +122 -0
  635. package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.d.ts +5 -0
  636. package/node_modules/@openclaw/fs-safe/dist/windows-path-syntax.js +21 -0
  637. package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.cs +336 -0
  638. package/node_modules/@openclaw/fs-safe/dist/windows-security-bridge.ps1 +90 -0
  639. package/node_modules/@openclaw/fs-safe/dist/windows-security-command.d.ts +33 -0
  640. package/node_modules/@openclaw/fs-safe/dist/windows-security-command.js +414 -0
  641. package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +9 -0
  642. package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +112 -0
  643. package/node_modules/@openclaw/fs-safe/dist/write-file-handle.d.ts +13 -0
  644. package/node_modules/@openclaw/fs-safe/dist/write-file-handle.js +49 -0
  645. package/node_modules/@openclaw/fs-safe/dist/write-open-flags.d.ts +4 -0
  646. package/node_modules/@openclaw/fs-safe/dist/write-open-flags.js +27 -0
  647. package/node_modules/@openclaw/fs-safe/dist/write-queue.d.ts +1 -0
  648. package/node_modules/@openclaw/fs-safe/dist/write-queue.js +15 -0
  649. package/node_modules/@openclaw/fs-safe/docs/advanced.md +271 -0
  650. package/node_modules/@openclaw/fs-safe/docs/archive.md +859 -0
  651. package/node_modules/@openclaw/fs-safe/docs/assets/readme-banner.jpg +0 -0
  652. package/node_modules/@openclaw/fs-safe/docs/atomic.md +611 -0
  653. package/node_modules/@openclaw/fs-safe/docs/config.md +136 -0
  654. package/node_modules/@openclaw/fs-safe/docs/contributing.md +360 -0
  655. package/node_modules/@openclaw/fs-safe/docs/copy.md +199 -0
  656. package/node_modules/@openclaw/fs-safe/docs/creation.md +132 -0
  657. package/node_modules/@openclaw/fs-safe/docs/directory-identity.md +85 -0
  658. package/node_modules/@openclaw/fs-safe/docs/durability.md +445 -0
  659. package/node_modules/@openclaw/fs-safe/docs/entries.md +109 -0
  660. package/node_modules/@openclaw/fs-safe/docs/errors.md +240 -0
  661. package/node_modules/@openclaw/fs-safe/docs/file-contents.md +68 -0
  662. package/node_modules/@openclaw/fs-safe/docs/file-store.md +369 -0
  663. package/node_modules/@openclaw/fs-safe/docs/filename.md +110 -0
  664. package/node_modules/@openclaw/fs-safe/docs/guest.md +152 -0
  665. package/node_modules/@openclaw/fs-safe/docs/in-place-write.md +81 -0
  666. package/node_modules/@openclaw/fs-safe/docs/index.md +87 -0
  667. package/node_modules/@openclaw/fs-safe/docs/install-path.md +216 -0
  668. package/node_modules/@openclaw/fs-safe/docs/install.md +252 -0
  669. package/node_modules/@openclaw/fs-safe/docs/json-store.md +240 -0
  670. package/node_modules/@openclaw/fs-safe/docs/json.md +225 -0
  671. package/node_modules/@openclaw/fs-safe/docs/local-roots.md +150 -0
  672. package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +205 -0
  673. package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.6.md +48 -0
  674. package/node_modules/@openclaw/fs-safe/docs/mutation-policy-proof.md +69 -0
  675. package/node_modules/@openclaw/fs-safe/docs/native-helper.md +193 -0
  676. package/node_modules/@openclaw/fs-safe/docs/native.md +351 -0
  677. package/node_modules/@openclaw/fs-safe/docs/output.md +193 -0
  678. package/node_modules/@openclaw/fs-safe/docs/path-case.md +64 -0
  679. package/node_modules/@openclaw/fs-safe/docs/path-prefix.md +74 -0
  680. package/node_modules/@openclaw/fs-safe/docs/path-scope.md +159 -0
  681. package/node_modules/@openclaw/fs-safe/docs/path-suffix-aliases.md +204 -0
  682. package/node_modules/@openclaw/fs-safe/docs/path.md +219 -0
  683. package/node_modules/@openclaw/fs-safe/docs/permissions.md +352 -0
  684. package/node_modules/@openclaw/fs-safe/docs/positional-read.md +63 -0
  685. package/node_modules/@openclaw/fs-safe/docs/private-file-store.md +68 -0
  686. package/node_modules/@openclaw/fs-safe/docs/public-api.md +188 -0
  687. package/node_modules/@openclaw/fs-safe/docs/quickstart.md +154 -0
  688. package/node_modules/@openclaw/fs-safe/docs/reading.md +196 -0
  689. package/node_modules/@openclaw/fs-safe/docs/regular-file.md +193 -0
  690. package/node_modules/@openclaw/fs-safe/docs/retained-file.md +115 -0
  691. package/node_modules/@openclaw/fs-safe/docs/root.md +571 -0
  692. package/node_modules/@openclaw/fs-safe/docs/secret-file.md +318 -0
  693. package/node_modules/@openclaw/fs-safe/docs/secure-file.md +112 -0
  694. package/node_modules/@openclaw/fs-safe/docs/security-model.md +272 -0
  695. package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +599 -0
  696. package/node_modules/@openclaw/fs-safe/docs/staged-file.md +192 -0
  697. package/node_modules/@openclaw/fs-safe/docs/staged-symlink.md +124 -0
  698. package/node_modules/@openclaw/fs-safe/docs/store.md +129 -0
  699. package/node_modules/@openclaw/fs-safe/docs/temp.md +780 -0
  700. package/node_modules/@openclaw/fs-safe/docs/test-hooks.md +110 -0
  701. package/node_modules/@openclaw/fs-safe/docs/testing.md +399 -0
  702. package/node_modules/@openclaw/fs-safe/docs/timing.md +123 -0
  703. package/node_modules/@openclaw/fs-safe/docs/types.md +217 -0
  704. package/node_modules/@openclaw/fs-safe/docs/walk.md +283 -0
  705. package/node_modules/@openclaw/fs-safe/docs/watch.md +251 -0
  706. package/node_modules/@openclaw/fs-safe/docs/writing.md +662 -0
  707. package/node_modules/@openclaw/fs-safe/package.json +204 -0
  708. package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
  709. package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +29 -0
  710. package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
  711. package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +29 -0
  712. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
  713. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +32 -0
  714. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
  715. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +32 -0
  716. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
  717. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +32 -0
  718. package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
  719. package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +32 -0
  720. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
  721. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +29 -0
  722. package/node_modules/content-type/README.md +81 -0
  723. package/node_modules/content-type/dist/index.d.ts +54 -0
  724. package/node_modules/content-type/dist/index.js +291 -0
  725. package/node_modules/content-type/dist/index.js.map +1 -0
  726. package/node_modules/content-type/package.json +61 -0
  727. package/node_modules/core-util-is/LICENSE +19 -0
  728. package/node_modules/core-util-is/README.md +3 -0
  729. package/node_modules/core-util-is/lib/util.js +107 -0
  730. package/node_modules/core-util-is/package.json +38 -0
  731. package/node_modules/file-type/package.json +275 -0
  732. package/node_modules/file-type/readme.md +605 -0
  733. package/node_modules/file-type/source/detectors/zip.js +653 -0
  734. package/node_modules/immediate/LICENSE.txt +20 -0
  735. package/node_modules/immediate/README.md +93 -0
  736. package/node_modules/immediate/dist/immediate.js +75 -0
  737. package/node_modules/immediate/dist/immediate.min.js +1 -0
  738. package/node_modules/immediate/lib/browser.js +69 -0
  739. package/node_modules/immediate/lib/index.js +73 -0
  740. package/node_modules/immediate/package.json +42 -0
  741. package/node_modules/inherits/LICENSE +16 -0
  742. package/node_modules/inherits/README.md +42 -0
  743. package/node_modules/inherits/inherits.js +9 -0
  744. package/node_modules/inherits/inherits_browser.js +27 -0
  745. package/node_modules/inherits/package.json +29 -0
  746. package/node_modules/isarray/.npmignore +1 -0
  747. package/node_modules/isarray/.travis.yml +4 -0
  748. package/node_modules/isarray/Makefile +6 -0
  749. package/node_modules/isarray/README.md +60 -0
  750. package/node_modules/isarray/component.json +19 -0
  751. package/node_modules/isarray/index.js +5 -0
  752. package/node_modules/isarray/package.json +45 -0
  753. package/node_modules/isarray/test.js +20 -0
  754. package/node_modules/jszip/.codeclimate.yml +16 -0
  755. package/node_modules/jszip/.editorconfig +8 -0
  756. package/node_modules/jszip/.eslintrc.js +43 -0
  757. package/node_modules/jszip/.github/FUNDING.yml +1 -0
  758. package/node_modules/jszip/.github/actions/setup/action.yml +23 -0
  759. package/node_modules/jszip/.github/workflows/benchmark.yml +38 -0
  760. package/node_modules/jszip/.github/workflows/main.yml +55 -0
  761. package/node_modules/jszip/CHANGES.md +210 -0
  762. package/node_modules/jszip/LICENSE.markdown +651 -0
  763. package/node_modules/jszip/README.markdown +33 -0
  764. package/node_modules/jszip/dist/jszip.js +11586 -0
  765. package/node_modules/jszip/dist/jszip.min.js +13 -0
  766. package/node_modules/jszip/index.d.ts +344 -0
  767. package/node_modules/jszip/lib/base64.js +106 -0
  768. package/node_modules/jszip/lib/compressedObject.js +74 -0
  769. package/node_modules/jszip/lib/compressions.js +14 -0
  770. package/node_modules/jszip/lib/crc32.js +77 -0
  771. package/node_modules/jszip/lib/defaults.js +11 -0
  772. package/node_modules/jszip/lib/external.js +18 -0
  773. package/node_modules/jszip/lib/flate.js +85 -0
  774. package/node_modules/jszip/lib/generate/ZipFileWorker.js +539 -0
  775. package/node_modules/jszip/lib/generate/index.js +57 -0
  776. package/node_modules/jszip/lib/index.js +55 -0
  777. package/node_modules/jszip/lib/license_header.js +11 -0
  778. package/node_modules/jszip/lib/load.js +88 -0
  779. package/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
  780. package/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
  781. package/node_modules/jszip/lib/nodejsUtils.js +57 -0
  782. package/node_modules/jszip/lib/object.js +384 -0
  783. package/node_modules/jszip/lib/readable-stream-browser.js +10 -0
  784. package/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
  785. package/node_modules/jszip/lib/reader/DataReader.js +116 -0
  786. package/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
  787. package/node_modules/jszip/lib/reader/StringReader.js +38 -0
  788. package/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
  789. package/node_modules/jszip/lib/reader/readerFor.js +28 -0
  790. package/node_modules/jszip/lib/signature.js +7 -0
  791. package/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
  792. package/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
  793. package/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
  794. package/node_modules/jszip/lib/stream/DataWorker.js +116 -0
  795. package/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
  796. package/node_modules/jszip/lib/stream/StreamHelper.js +214 -0
  797. package/node_modules/jszip/lib/support.js +38 -0
  798. package/node_modules/jszip/lib/utf8.js +275 -0
  799. package/node_modules/jszip/lib/utils.js +510 -0
  800. package/node_modules/jszip/lib/zipEntries.js +261 -0
  801. package/node_modules/jszip/lib/zipEntry.js +293 -0
  802. package/node_modules/jszip/lib/zipObject.js +133 -0
  803. package/node_modules/jszip/package.json +67 -0
  804. package/node_modules/jszip/sponsors.md +21 -0
  805. package/node_modules/jszip/tsconfig.json +101 -0
  806. package/node_modules/jszip/vendor/FileSaver.js +247 -0
  807. package/node_modules/lie/README.md +62 -0
  808. package/node_modules/lie/dist/lie.js +350 -0
  809. package/node_modules/lie/dist/lie.min.js +1 -0
  810. package/node_modules/lie/dist/lie.polyfill.js +358 -0
  811. package/node_modules/lie/dist/lie.polyfill.min.js +1 -0
  812. package/node_modules/lie/lib/browser.js +273 -0
  813. package/node_modules/lie/lib/index.js +298 -0
  814. package/node_modules/lie/license.md +7 -0
  815. package/node_modules/lie/lie.d.ts +244 -0
  816. package/node_modules/lie/package.json +69 -0
  817. package/node_modules/lie/polyfill.js +4 -0
  818. package/node_modules/matrix-js-sdk/CHANGELOG.md +20 -0
  819. package/node_modules/matrix-js-sdk/lib/@types/json.d.ts.map +1 -1
  820. package/node_modules/matrix-js-sdk/lib/@types/json.js.map +1 -1
  821. package/node_modules/matrix-js-sdk/lib/client.d.ts +74 -5
  822. package/node_modules/matrix-js-sdk/lib/client.d.ts.map +1 -1
  823. package/node_modules/matrix-js-sdk/lib/client.js +83 -7
  824. package/node_modules/matrix-js-sdk/lib/client.js.map +1 -1
  825. package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.d.ts +42 -23
  826. package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.d.ts.map +1 -1
  827. package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.js +7 -0
  828. package/node_modules/matrix-js-sdk/lib/common-crypto/CryptoBackend.js.map +1 -1
  829. package/node_modules/matrix-js-sdk/lib/embedded.d.ts +35 -1
  830. package/node_modules/matrix-js-sdk/lib/embedded.d.ts.map +1 -1
  831. package/node_modules/matrix-js-sdk/lib/embedded.js +49 -1
  832. package/node_modules/matrix-js-sdk/lib/embedded.js.map +1 -1
  833. package/node_modules/matrix-js-sdk/lib/http-api/fetch.d.ts +0 -1
  834. package/node_modules/matrix-js-sdk/lib/http-api/fetch.d.ts.map +1 -1
  835. package/node_modules/matrix-js-sdk/lib/http-api/fetch.js +3 -22
  836. package/node_modules/matrix-js-sdk/lib/http-api/fetch.js.map +1 -1
  837. package/node_modules/matrix-js-sdk/lib/http-api/logging.d.ts +10 -0
  838. package/node_modules/matrix-js-sdk/lib/http-api/logging.d.ts.map +1 -0
  839. package/node_modules/matrix-js-sdk/lib/http-api/logging.js +46 -0
  840. package/node_modules/matrix-js-sdk/lib/http-api/logging.js.map +1 -0
  841. package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.d.ts +5 -0
  842. package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.d.ts.map +1 -1
  843. package/node_modules/matrix-js-sdk/lib/matrixrtc/EncryptionManager.js.map +1 -1
  844. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts +82 -0
  845. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.d.ts.map +1 -1
  846. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js +25 -0
  847. package/node_modules/matrix-js-sdk/lib/matrixrtc/LivekitTransport.js.map +1 -1
  848. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts +41 -2
  849. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
  850. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js +59 -1
  851. package/node_modules/matrix-js-sdk/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
  852. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js +7 -4
  853. package/node_modules/matrix-js-sdk/lib/matrixrtc/MembershipManager.js.map +1 -1
  854. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts +17 -0
  855. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.d.ts.map +1 -1
  856. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js +68 -29
  857. package/node_modules/matrix-js-sdk/lib/matrixrtc/RTCEncryptionManager.js.map +1 -1
  858. package/node_modules/matrix-js-sdk/lib/models/room-receipts.d.ts +9 -3
  859. package/node_modules/matrix-js-sdk/lib/models/room-receipts.d.ts.map +1 -1
  860. package/node_modules/matrix-js-sdk/lib/models/room-receipts.js +51 -11
  861. package/node_modules/matrix-js-sdk/lib/models/room-receipts.js.map +1 -1
  862. package/node_modules/matrix-js-sdk/lib/oauth/authorize.d.ts +7 -2
  863. package/node_modules/matrix-js-sdk/lib/oauth/authorize.d.ts.map +1 -1
  864. package/node_modules/matrix-js-sdk/lib/oauth/authorize.js +10 -4
  865. package/node_modules/matrix-js-sdk/lib/oauth/authorize.js.map +1 -1
  866. package/node_modules/matrix-js-sdk/lib/oauth/fetch.d.ts +17 -0
  867. package/node_modules/matrix-js-sdk/lib/oauth/fetch.d.ts.map +1 -0
  868. package/node_modules/matrix-js-sdk/lib/oauth/fetch.js +47 -0
  869. package/node_modules/matrix-js-sdk/lib/oauth/fetch.js.map +1 -0
  870. package/node_modules/matrix-js-sdk/lib/oauth/index.d.ts +15 -2
  871. package/node_modules/matrix-js-sdk/lib/oauth/index.d.ts.map +1 -1
  872. package/node_modules/matrix-js-sdk/lib/oauth/index.js +33 -12
  873. package/node_modules/matrix-js-sdk/lib/oauth/index.js.map +1 -1
  874. package/node_modules/matrix-js-sdk/lib/rust-crypto/index.d.ts +17 -0
  875. package/node_modules/matrix-js-sdk/lib/rust-crypto/index.d.ts.map +1 -1
  876. package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js +4 -2
  877. package/node_modules/matrix-js-sdk/lib/rust-crypto/index.js.map +1 -1
  878. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.d.ts +6 -26
  879. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
  880. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js +19 -54
  881. package/node_modules/matrix-js-sdk/lib/rust-crypto/rust-crypto.js.map +1 -1
  882. package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.d.ts.map +1 -1
  883. package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js +65 -27
  884. package/node_modules/matrix-js-sdk/lib/sliding-sync-sdk.js.map +1 -1
  885. package/node_modules/matrix-js-sdk/lib/sliding-sync.d.ts +17 -0
  886. package/node_modules/matrix-js-sdk/lib/sliding-sync.d.ts.map +1 -1
  887. package/node_modules/matrix-js-sdk/lib/sliding-sync.js +21 -9
  888. package/node_modules/matrix-js-sdk/lib/sliding-sync.js.map +1 -1
  889. package/node_modules/matrix-js-sdk/lib/sync.d.ts +9 -1
  890. package/node_modules/matrix-js-sdk/lib/sync.d.ts.map +1 -1
  891. package/node_modules/matrix-js-sdk/lib/sync.js +54 -29
  892. package/node_modules/matrix-js-sdk/lib/sync.js.map +1 -1
  893. package/node_modules/matrix-js-sdk/package.json +5 -5
  894. package/node_modules/matrix-js-sdk/src/@types/json.ts +11 -2
  895. package/node_modules/matrix-js-sdk/src/client.ts +126 -11
  896. package/node_modules/matrix-js-sdk/src/common-crypto/CryptoBackend.ts +45 -23
  897. package/node_modules/matrix-js-sdk/src/embedded.ts +67 -4
  898. package/node_modules/matrix-js-sdk/src/http-api/fetch.ts +2 -23
  899. package/node_modules/matrix-js-sdk/src/http-api/logging.ts +46 -0
  900. package/node_modules/matrix-js-sdk/src/matrixrtc/EncryptionManager.ts +6 -0
  901. package/node_modules/matrix-js-sdk/src/matrixrtc/LivekitTransport.ts +86 -0
  902. package/node_modules/matrix-js-sdk/src/matrixrtc/MatrixRTCSession.ts +81 -1
  903. package/node_modules/matrix-js-sdk/src/matrixrtc/MembershipManager.ts +7 -7
  904. package/node_modules/matrix-js-sdk/src/matrixrtc/RTCEncryptionManager.ts +80 -31
  905. package/node_modules/matrix-js-sdk/src/models/room-receipts.ts +54 -10
  906. package/node_modules/matrix-js-sdk/src/oauth/authorize.ts +10 -2
  907. package/node_modules/matrix-js-sdk/src/oauth/fetch.ts +54 -0
  908. package/node_modules/matrix-js-sdk/src/oauth/index.ts +29 -10
  909. package/node_modules/matrix-js-sdk/src/rust-crypto/index.ts +23 -0
  910. package/node_modules/matrix-js-sdk/src/rust-crypto/rust-crypto.ts +25 -67
  911. package/node_modules/matrix-js-sdk/src/sliding-sync-sdk.ts +73 -33
  912. package/node_modules/matrix-js-sdk/src/sliding-sync.ts +31 -14
  913. package/node_modules/matrix-js-sdk/src/sync.ts +58 -35
  914. package/node_modules/pako/CHANGELOG.md +164 -0
  915. package/node_modules/pako/LICENSE +21 -0
  916. package/node_modules/pako/README.md +191 -0
  917. package/node_modules/pako/dist/pako.js +6818 -0
  918. package/node_modules/pako/dist/pako.min.js +1 -0
  919. package/node_modules/pako/dist/pako_deflate.js +3997 -0
  920. package/node_modules/pako/dist/pako_deflate.min.js +1 -0
  921. package/node_modules/pako/dist/pako_inflate.js +3300 -0
  922. package/node_modules/pako/dist/pako_inflate.min.js +1 -0
  923. package/node_modules/pako/index.js +14 -0
  924. package/node_modules/pako/lib/deflate.js +400 -0
  925. package/node_modules/pako/lib/inflate.js +423 -0
  926. package/node_modules/pako/lib/utils/common.js +105 -0
  927. package/node_modules/pako/lib/utils/strings.js +187 -0
  928. package/node_modules/pako/lib/zlib/README +59 -0
  929. package/node_modules/pako/lib/zlib/adler32.js +51 -0
  930. package/node_modules/pako/lib/zlib/constants.js +68 -0
  931. package/node_modules/pako/lib/zlib/crc32.js +59 -0
  932. package/node_modules/pako/lib/zlib/deflate.js +1874 -0
  933. package/node_modules/pako/lib/zlib/gzheader.js +58 -0
  934. package/node_modules/pako/lib/zlib/inffast.js +345 -0
  935. package/node_modules/pako/lib/zlib/inflate.js +1556 -0
  936. package/node_modules/pako/lib/zlib/inftrees.js +343 -0
  937. package/node_modules/pako/lib/zlib/messages.js +32 -0
  938. package/node_modules/pako/lib/zlib/trees.js +1222 -0
  939. package/node_modules/pako/lib/zlib/zstream.js +47 -0
  940. package/node_modules/pako/package.json +44 -0
  941. package/node_modules/process-nextick-args/index.js +45 -0
  942. package/node_modules/process-nextick-args/license.md +19 -0
  943. package/node_modules/process-nextick-args/package.json +25 -0
  944. package/node_modules/process-nextick-args/readme.md +18 -0
  945. package/node_modules/readable-stream/.travis.yml +34 -0
  946. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  947. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  948. package/node_modules/readable-stream/LICENSE +47 -0
  949. package/node_modules/readable-stream/README.md +58 -0
  950. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  951. package/node_modules/readable-stream/duplex-browser.js +1 -0
  952. package/node_modules/readable-stream/duplex.js +1 -0
  953. package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
  954. package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
  955. package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
  956. package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
  957. package/node_modules/readable-stream/lib/_stream_writable.js +685 -0
  958. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
  959. package/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
  960. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  961. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  962. package/node_modules/readable-stream/package.json +52 -0
  963. package/node_modules/readable-stream/passthrough.js +1 -0
  964. package/node_modules/readable-stream/readable-browser.js +7 -0
  965. package/node_modules/readable-stream/readable.js +19 -0
  966. package/node_modules/readable-stream/transform.js +1 -0
  967. package/node_modules/readable-stream/writable-browser.js +1 -0
  968. package/node_modules/readable-stream/writable.js +8 -0
  969. package/node_modules/safe-buffer/LICENSE +21 -0
  970. package/node_modules/safe-buffer/README.md +584 -0
  971. package/node_modules/safe-buffer/index.d.ts +187 -0
  972. package/node_modules/safe-buffer/index.js +62 -0
  973. package/node_modules/safe-buffer/package.json +37 -0
  974. package/node_modules/setimmediate/LICENSE.txt +20 -0
  975. package/node_modules/setimmediate/package.json +30 -0
  976. package/node_modules/setimmediate/setImmediate.js +186 -0
  977. package/node_modules/string_decoder/.travis.yml +50 -0
  978. package/node_modules/string_decoder/LICENSE +48 -0
  979. package/node_modules/string_decoder/README.md +47 -0
  980. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  981. package/node_modules/string_decoder/package.json +31 -0
  982. package/node_modules/strtok3/lib/types.js +1 -0
  983. package/node_modules/typebox/build/compile/code.mjs +1 -2
  984. package/node_modules/typebox/build/compile/validator.mjs +5 -1
  985. package/node_modules/typebox/build/format/iri.mjs +16 -9
  986. package/node_modules/typebox/build/guard/emit.mjs +2 -2
  987. package/node_modules/typebox/build/guard/guard.d.mts +7 -5
  988. package/node_modules/typebox/build/guard/guard.mjs +14 -9
  989. package/node_modules/typebox/build/guard/index.mjs +6 -0
  990. package/node_modules/typebox/build/guard/unicode/unicode.d.mts +6 -0
  991. package/node_modules/typebox/build/guard/unicode/unicode.mjs +35 -0
  992. package/node_modules/typebox/build/guard/unicode/unicode_segment.mjs +165 -0
  993. package/node_modules/typebox/build/schema/build.mjs +2 -3
  994. package/node_modules/typebox/build/schema/engine/_pathing.d.mts +1 -0
  995. package/node_modules/typebox/build/schema/engine/_pathing.mjs +11 -0
  996. package/node_modules/typebox/build/schema/engine/_refine.mjs +13 -5
  997. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +2 -1
  998. package/node_modules/typebox/build/schema/engine/dependencies.mjs +2 -1
  999. package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +2 -1
  1000. package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +1 -1
  1001. package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +2 -2
  1002. package/node_modules/typebox/build/schema/engine/format.mjs +9 -2
  1003. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +3 -2
  1004. package/node_modules/typebox/build/schema/engine/properties.mjs +3 -2
  1005. package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -1
  1006. package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +1 -1
  1007. package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +2 -2
  1008. package/node_modules/typebox/build/schema/engine/ref.d.mts +1 -1
  1009. package/node_modules/typebox/build/schema/engine/ref.mjs +2 -2
  1010. package/node_modules/typebox/build/schema/engine/schema.mjs +24 -24
  1011. package/node_modules/typebox/build/schema/parse.mjs +3 -0
  1012. package/node_modules/typebox/build/schema/pointer/pointer.d.mts +1 -6
  1013. package/node_modules/typebox/build/schema/pointer/pointer.mjs +47 -64
  1014. package/node_modules/typebox/build/system/settings/internal.d.mts +2 -0
  1015. package/node_modules/typebox/build/system/settings/internal.mjs +20 -0
  1016. package/node_modules/typebox/build/system/settings/settings.d.mts +11 -0
  1017. package/node_modules/typebox/build/system/settings/settings.mjs +14 -0
  1018. package/node_modules/typebox/build/type/extends/inference.d.mts +1 -1
  1019. package/node_modules/typebox/build/type/extends/inference.mjs +15 -2
  1020. package/node_modules/typebox/build/type/extends/tuple.d.mts +2 -1
  1021. package/node_modules/typebox/build/type/extends/tuple.mjs +21 -1
  1022. package/node_modules/typebox/build/value/parse/parse.mjs +10 -4
  1023. package/node_modules/typebox/package.json +1 -1
  1024. package/node_modules/typebox/readme.md +3 -1
  1025. package/node_modules/util-deprecate/History.md +16 -0
  1026. package/node_modules/util-deprecate/LICENSE +24 -0
  1027. package/node_modules/util-deprecate/README.md +53 -0
  1028. package/node_modules/util-deprecate/browser.js +67 -0
  1029. package/node_modules/util-deprecate/node.js +6 -0
  1030. package/node_modules/util-deprecate/package.json +27 -0
  1031. package/openclaw.plugin.json +24 -0
  1032. package/package.json +8 -6
  1033. package/dist/.setup/account-selection-BHkfU1eC.mjs +0 -212
  1034. package/dist/.setup/accounts-iThMol10.mjs +0 -130
  1035. package/dist/.setup/approval-handler.runtime-9W7R2ZMq.mjs +0 -415
  1036. package/dist/.setup/approval-ids-j08q8LEG.mjs +0 -7
  1037. package/dist/.setup/approval-reaction-auth-DMVE7VSp.mjs +0 -31
  1038. package/dist/.setup/approval-reactions-B0hfA6qz.mjs +0 -196
  1039. package/dist/.setup/channel-ConuJfxT.mjs +0 -1427
  1040. package/dist/.setup/channel.runtime-CnxR2JUK.mjs +0 -71
  1041. package/dist/.setup/channel.setup-C6KvBV8l.mjs +0 -357
  1042. package/dist/.setup/cli-O196sg8g.mjs +0 -1410
  1043. package/dist/.setup/cli-metadata-DFHQj5XR.mjs +0 -22
  1044. package/dist/.setup/client-C2yVkVdw.mjs +0 -27
  1045. package/dist/.setup/client-ChrXpxos.mjs +0 -922
  1046. package/dist/.setup/client-bootstrap-BSnUAoz1.mjs +0 -78
  1047. package/dist/.setup/config-secret-input.runtime-CwsP3--c.mjs +0 -2
  1048. package/dist/.setup/config-update-B_4qZ5bV.mjs +0 -167
  1049. package/dist/.setup/create-client-CHxcron_.mjs +0 -67
  1050. package/dist/.setup/credentials-BGKfiaJW.mjs +0 -85
  1051. package/dist/.setup/credentials-read-Q5sHkkHv.mjs +0 -74
  1052. package/dist/.setup/credentials-write.runtime-DxbXh-pK.mjs +0 -14
  1053. package/dist/.setup/crypto-runtime-D9qn_Pbj.mjs +0 -1138
  1054. package/dist/.setup/crypto-snapshot-doctor.runtime-CMWa1d9Y.mjs +0 -91
  1055. package/dist/.setup/deps-mtxF2mHI.mjs +0 -169
  1056. package/dist/.setup/device-health-CWOuIirq.mjs +0 -21
  1057. package/dist/.setup/direct-management-B2Bno2xL.mjs +0 -346
  1058. package/dist/.setup/directory-live-CxqkcYbT.mjs +0 -153
  1059. package/dist/.setup/doctor-BLCvdOFo.mjs +0 -64
  1060. package/dist/.setup/doctor-contract-HyWFZQVG.mjs +0 -167
  1061. package/dist/.setup/draft-stream-y0Vq5f38.mjs +0 -175
  1062. package/dist/.setup/encryption-guidance-CMWXiBzJ.mjs +0 -16
  1063. package/dist/.setup/file-sync-store-CsalA4yI.mjs +0 -213
  1064. package/dist/.setup/http-client-Bi6uKmzh.mjs +0 -410
  1065. package/dist/.setup/idb-persistence-c8uxcofH.mjs +0 -237
  1066. package/dist/.setup/idb-persistence-lock-B3fZXyF_.mjs +0 -32
  1067. package/dist/.setup/inbound-dedupe-BSlv35xl.mjs +0 -48
  1068. package/dist/.setup/joined-room-encryption-BCtxQ3hR.mjs +0 -67
  1069. package/dist/.setup/logger-xBjiRIp1.mjs +0 -78
  1070. package/dist/.setup/logging-rgm8ep9H.mjs +0 -99
  1071. package/dist/.setup/messages-COuAcrz-.mjs +0 -324
  1072. package/dist/.setup/monitor-CzE3myC_.mjs +0 -4544
  1073. package/dist/.setup/outbound-B508VPBM.mjs +0 -228
  1074. package/dist/.setup/probe.runtime-C-NMeYk2.mjs +0 -2
  1075. package/dist/.setup/profile-ClrB3IgR.mjs +0 -108
  1076. package/dist/.setup/profile-update-DrblJttE.mjs +0 -70
  1077. package/dist/.setup/reaction-events-BvZmhjLC.mjs +0 -168
  1078. package/dist/.setup/resolve-targets-BLz748lX.mjs +0 -140
  1079. package/dist/.setup/resolver.runtime-CuLQ2uHe.mjs +0 -5
  1080. package/dist/.setup/rolldown-runtime-8H4AJuhK.mjs +0 -14
  1081. package/dist/.setup/room-info-DTyP1k5g.mjs +0 -153
  1082. package/dist/.setup/sdk-rqFjgltR.mjs +0 -1949
  1083. package/dist/.setup/send-aVdC5NJO.mjs +0 -2216
  1084. package/dist/.setup/send-currentness-BrGXL7b8.mjs +0 -90
  1085. package/dist/.setup/setup-bootstrap-A_WGFq1Y.mjs +0 -62
  1086. package/dist/.setup/setup-core-D2hMbIi3.mjs +0 -386
  1087. package/dist/.setup/setup-plugin-api-JiRgm8s6.mjs +0 -3
  1088. package/dist/.setup/setup-surface-BL3ha1l-.mjs +0 -482
  1089. package/dist/.setup/startup-verification-Cp1Gf7pM.mjs +0 -233
  1090. package/dist/.setup/storage-BXaFc0S4.mjs +0 -324
  1091. package/dist/.setup/storage-metadata-fHN6Df2m.mjs +0 -372
  1092. package/dist/.setup/storage-paths-DVCANXTc.mjs +0 -53
  1093. package/dist/.setup/subagent-hooks-jFgft_Mr.mjs +0 -52
  1094. package/dist/.setup/sync-cache-state-BMtGMxU1.mjs +0 -227
  1095. package/dist/.setup/thread-bindings-JlnLDfPM.mjs +0 -444
  1096. package/dist/.setup/thread-bindings-shared-oNPiyMWY.mjs +0 -92
  1097. package/dist/.setup/tool-actions.runtime-REzYTNxm.mjs +0 -862
  1098. package/dist/.setup/url-validation-GRHde6lq.mjs +0 -36
  1099. package/dist/.setup/verification-0o8MOW9T.mjs +0 -346
  1100. package/node_modules/matrix-js-sdk/node_modules/content-type/README.md +0 -71
  1101. package/node_modules/matrix-js-sdk/node_modules/content-type/dist/index.d.ts +0 -46
  1102. package/node_modules/matrix-js-sdk/node_modules/content-type/dist/index.js +0 -176
  1103. package/node_modules/matrix-js-sdk/node_modules/content-type/dist/index.js.map +0 -1
  1104. package/node_modules/matrix-js-sdk/node_modules/content-type/package.json +0 -52
  1105. package/node_modules/music-metadata/node_modules/debug/LICENSE +0 -20
  1106. package/node_modules/music-metadata/node_modules/debug/README.md +0 -481
  1107. package/node_modules/music-metadata/node_modules/debug/package.json +0 -64
  1108. package/node_modules/music-metadata/node_modules/debug/src/browser.js +0 -272
  1109. package/node_modules/music-metadata/node_modules/debug/src/common.js +0 -292
  1110. package/node_modules/music-metadata/node_modules/debug/src/index.js +0 -10
  1111. package/node_modules/music-metadata/node_modules/debug/src/node.js +0 -263
  1112. package/node_modules/music-metadata/node_modules/file-type/package.json +0 -275
  1113. package/node_modules/music-metadata/node_modules/file-type/readme.md +0 -603
  1114. package/node_modules/music-metadata/node_modules/file-type/source/detectors/zip.js +0 -648
  1115. package/node_modules/music-metadata/node_modules/ms/index.js +0 -162
  1116. package/node_modules/music-metadata/node_modules/ms/license.md +0 -21
  1117. package/node_modules/music-metadata/node_modules/ms/package.json +0 -38
  1118. package/node_modules/music-metadata/node_modules/ms/readme.md +0 -59
  1119. package/node_modules/typebox/build/guard/string.mjs +0 -168
  1120. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/LICENSE +0 -0
  1121. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/README.md +0 -0
  1122. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/OverloadYield.js +0 -0
  1123. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/applyDecoratedDescriptor.js +0 -0
  1124. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/applyDecs2311.js +0 -0
  1125. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/arrayLikeToArray.js +0 -0
  1126. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/arrayWithHoles.js +0 -0
  1127. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/arrayWithoutHoles.js +0 -0
  1128. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/assertClassBrand.js +0 -0
  1129. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/assertThisInitialized.js +0 -0
  1130. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/asyncGeneratorDelegate.js +0 -0
  1131. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/asyncIterator.js +0 -0
  1132. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/asyncToGenerator.js +0 -0
  1133. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/awaitAsyncGenerator.js +0 -0
  1134. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/callSuper.js +0 -0
  1135. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/checkInRHS.js +0 -0
  1136. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/checkPrivateRedeclaration.js +0 -0
  1137. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classCallCheck.js +0 -0
  1138. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classNameTDZError.js +0 -0
  1139. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateFieldGet2.js +0 -0
  1140. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateFieldInitSpec.js +0 -0
  1141. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateFieldLooseBase.js +0 -0
  1142. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateFieldLooseKey.js +0 -0
  1143. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateFieldSet2.js +0 -0
  1144. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateGetter.js +0 -0
  1145. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateMethodInitSpec.js +0 -0
  1146. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classPrivateSetter.js +0 -0
  1147. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/classStaticPrivateMethodGet.js +0 -0
  1148. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/construct.js +0 -0
  1149. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/createClass.js +0 -0
  1150. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/createForOfIteratorHelper.js +0 -0
  1151. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/createForOfIteratorHelperLoose.js +0 -0
  1152. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/createSuper.js +0 -0
  1153. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/defaults.js +0 -0
  1154. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/defineAccessor.js +0 -0
  1155. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/defineProperty.js +0 -0
  1156. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/OverloadYield.js +0 -0
  1157. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/applyDecoratedDescriptor.js +0 -0
  1158. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/applyDecs2311.js +0 -0
  1159. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/arrayLikeToArray.js +0 -0
  1160. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/arrayWithHoles.js +0 -0
  1161. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/arrayWithoutHoles.js +0 -0
  1162. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/assertClassBrand.js +0 -0
  1163. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/assertThisInitialized.js +0 -0
  1164. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/asyncGeneratorDelegate.js +0 -0
  1165. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/asyncIterator.js +0 -0
  1166. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/asyncToGenerator.js +0 -0
  1167. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/awaitAsyncGenerator.js +0 -0
  1168. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/callSuper.js +0 -0
  1169. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/checkInRHS.js +0 -0
  1170. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/checkPrivateRedeclaration.js +0 -0
  1171. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classCallCheck.js +0 -0
  1172. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classNameTDZError.js +0 -0
  1173. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateFieldGet2.js +0 -0
  1174. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateFieldInitSpec.js +0 -0
  1175. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateFieldLooseBase.js +0 -0
  1176. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateFieldLooseKey.js +0 -0
  1177. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateFieldSet2.js +0 -0
  1178. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateGetter.js +0 -0
  1179. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateMethodInitSpec.js +0 -0
  1180. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classPrivateSetter.js +0 -0
  1181. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/classStaticPrivateMethodGet.js +0 -0
  1182. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/construct.js +0 -0
  1183. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/createClass.js +0 -0
  1184. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/createForOfIteratorHelper.js +0 -0
  1185. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/createForOfIteratorHelperLoose.js +0 -0
  1186. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/createSuper.js +0 -0
  1187. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/defaults.js +0 -0
  1188. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/defineAccessor.js +0 -0
  1189. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/defineProperty.js +0 -0
  1190. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/extends.js +0 -0
  1191. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/get.js +0 -0
  1192. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/getPrototypeOf.js +0 -0
  1193. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/identity.js +0 -0
  1194. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/importDeferProxy.js +0 -0
  1195. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/inherits.js +0 -0
  1196. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/inheritsLoose.js +0 -0
  1197. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/initializerDefineProperty.js +0 -0
  1198. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/initializerWarningHelper.js +0 -0
  1199. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/instanceof.js +0 -0
  1200. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/interopRequireDefault.js +0 -0
  1201. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/interopRequireWildcard.js +0 -0
  1202. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/isNativeFunction.js +0 -0
  1203. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/isNativeReflectConstruct.js +0 -0
  1204. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/iterableToArray.js +0 -0
  1205. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/iterableToArrayLimit.js +0 -0
  1206. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/jsx.js +0 -0
  1207. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/maybeArrayLike.js +0 -0
  1208. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/newArrowCheck.js +0 -0
  1209. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/nonIterableRest.js +0 -0
  1210. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/nonIterableSpread.js +0 -0
  1211. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/nullishReceiverError.js +0 -0
  1212. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/objectDestructuringEmpty.js +0 -0
  1213. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/objectSpread2.js +0 -0
  1214. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/objectWithoutProperties.js +0 -0
  1215. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -0
  1216. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/package.json +0 -0
  1217. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/possibleConstructorReturn.js +0 -0
  1218. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/readOnlyError.js +0 -0
  1219. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regenerator.js +0 -0
  1220. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regeneratorAsync.js +0 -0
  1221. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regeneratorAsyncGen.js +0 -0
  1222. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regeneratorAsyncIterator.js +0 -0
  1223. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regeneratorDefine.js +0 -0
  1224. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regeneratorKeys.js +0 -0
  1225. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/regeneratorValues.js +0 -0
  1226. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/set.js +0 -0
  1227. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/setFunctionName.js +0 -0
  1228. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/setPrototypeOf.js +0 -0
  1229. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/skipFirstGeneratorNext.js +0 -0
  1230. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/slicedToArray.js +0 -0
  1231. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/superPropBase.js +0 -0
  1232. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/superPropGet.js +0 -0
  1233. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/superPropSet.js +0 -0
  1234. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/taggedTemplateLiteral.js +0 -0
  1235. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/taggedTemplateLiteralLoose.js +0 -0
  1236. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/tdz.js +0 -0
  1237. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/temporalRef.js +0 -0
  1238. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/temporalUndefined.js +0 -0
  1239. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/toArray.js +0 -0
  1240. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/toConsumableArray.js +0 -0
  1241. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/toPrimitive.js +0 -0
  1242. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/toPropertyKey.js +0 -0
  1243. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/toSetter.js +0 -0
  1244. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/tsRewriteRelativeImportExtensions.js +0 -0
  1245. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/typeof.js +0 -0
  1246. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/unsupportedIterableToArray.js +0 -0
  1247. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/usingCtx.js +0 -0
  1248. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/wrapAsyncGenerator.js +0 -0
  1249. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/wrapNativeSuper.js +0 -0
  1250. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/wrapRegExp.js +0 -0
  1251. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/esm/writeOnlyError.js +0 -0
  1252. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/extends.js +0 -0
  1253. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/get.js +0 -0
  1254. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/getPrototypeOf.js +0 -0
  1255. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/identity.js +0 -0
  1256. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/importDeferProxy.js +0 -0
  1257. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/inherits.js +0 -0
  1258. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/inheritsLoose.js +0 -0
  1259. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/initializerDefineProperty.js +0 -0
  1260. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/initializerWarningHelper.js +0 -0
  1261. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/instanceof.js +0 -0
  1262. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/interopRequireDefault.js +0 -0
  1263. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/interopRequireWildcard.js +0 -0
  1264. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/isNativeFunction.js +0 -0
  1265. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/isNativeReflectConstruct.js +0 -0
  1266. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/iterableToArray.js +0 -0
  1267. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/iterableToArrayLimit.js +0 -0
  1268. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/jsx.js +0 -0
  1269. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/maybeArrayLike.js +0 -0
  1270. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/newArrowCheck.js +0 -0
  1271. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/nonIterableRest.js +0 -0
  1272. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/nonIterableSpread.js +0 -0
  1273. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/nullishReceiverError.js +0 -0
  1274. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/objectDestructuringEmpty.js +0 -0
  1275. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/objectSpread2.js +0 -0
  1276. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/objectWithoutProperties.js +0 -0
  1277. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/objectWithoutPropertiesLoose.js +0 -0
  1278. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/possibleConstructorReturn.js +0 -0
  1279. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/readOnlyError.js +0 -0
  1280. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regenerator.js +0 -0
  1281. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regeneratorAsync.js +0 -0
  1282. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regeneratorAsyncGen.js +0 -0
  1283. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regeneratorAsyncIterator.js +0 -0
  1284. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regeneratorDefine.js +0 -0
  1285. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regeneratorKeys.js +0 -0
  1286. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/regeneratorValues.js +0 -0
  1287. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/set.js +0 -0
  1288. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/setFunctionName.js +0 -0
  1289. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/setPrototypeOf.js +0 -0
  1290. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/skipFirstGeneratorNext.js +0 -0
  1291. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/slicedToArray.js +0 -0
  1292. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/superPropBase.js +0 -0
  1293. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/superPropGet.js +0 -0
  1294. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/superPropSet.js +0 -0
  1295. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/taggedTemplateLiteral.js +0 -0
  1296. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/taggedTemplateLiteralLoose.js +0 -0
  1297. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/tdz.js +0 -0
  1298. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/temporalRef.js +0 -0
  1299. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/temporalUndefined.js +0 -0
  1300. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/toArray.js +0 -0
  1301. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/toConsumableArray.js +0 -0
  1302. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/toPrimitive.js +0 -0
  1303. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/toPropertyKey.js +0 -0
  1304. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/toSetter.js +0 -0
  1305. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/tsRewriteRelativeImportExtensions.js +0 -0
  1306. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/typeof.js +0 -0
  1307. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/unsupportedIterableToArray.js +0 -0
  1308. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/usingCtx.js +0 -0
  1309. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/wrapAsyncGenerator.js +0 -0
  1310. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/wrapNativeSuper.js +0 -0
  1311. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/wrapRegExp.js +0 -0
  1312. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/helpers/writeOnlyError.js +0 -0
  1313. /package/node_modules/{matrix-js-sdk/node_modules/@babel → @babel}/runtime/package.json +0 -0
  1314. /package/node_modules/{music-metadata/node_modules/@borewit → @borewit}/text-codec/LICENSE.txt +0 -0
  1315. /package/node_modules/{music-metadata/node_modules/@borewit → @borewit}/text-codec/README.md +0 -0
  1316. /package/node_modules/{music-metadata/node_modules/@borewit → @borewit}/text-codec/lib/index.d.ts +0 -0
  1317. /package/node_modules/{music-metadata/node_modules/@borewit → @borewit}/text-codec/lib/index.js +0 -0
  1318. /package/node_modules/{music-metadata/node_modules/@borewit → @borewit}/text-codec/package.json +0 -0
  1319. /package/node_modules/{music-metadata/node_modules/strtok3/lib/types.js → @openclaw/fs-safe/dist/containment.js} +0 -0
  1320. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/LICENSE +0 -0
  1321. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/README.md +0 -0
  1322. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/GzipHandler.d.ts +0 -0
  1323. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/GzipHandler.js +0 -0
  1324. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/ZipHandler.d.ts +0 -0
  1325. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/ZipHandler.js +0 -0
  1326. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/ZipToken.d.ts +0 -0
  1327. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/ZipToken.js +0 -0
  1328. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/index.d.ts +0 -0
  1329. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/lib/index.js +0 -0
  1330. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/inflate/package.json +0 -0
  1331. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/token/README.md +0 -0
  1332. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/token/index.d.ts +0 -0
  1333. /package/node_modules/{music-metadata/node_modules/@tokenizer → @tokenizer}/token/package.json +0 -0
  1334. /package/node_modules/{matrix-js-sdk/node_modules/@types → @types}/events/LICENSE +0 -0
  1335. /package/node_modules/{matrix-js-sdk/node_modules/@types → @types}/events/README.md +0 -0
  1336. /package/node_modules/{matrix-js-sdk/node_modules/@types → @types}/events/index.d.ts +0 -0
  1337. /package/node_modules/{matrix-js-sdk/node_modules/@types → @types}/events/package.json +0 -0
  1338. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/LICENSE +0 -0
  1339. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/README.md +0 -0
  1340. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/helpers.d.ts +0 -0
  1341. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/helpers.d.ts.map +0 -0
  1342. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/helpers.js +0 -0
  1343. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/helpers.js.map +0 -0
  1344. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/index.d.ts +0 -0
  1345. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/index.d.ts.map +0 -0
  1346. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/index.js +0 -0
  1347. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/dist/index.js.map +0 -0
  1348. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/agent-base → agent-base}/package.json +0 -0
  1349. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/.jshint +0 -0
  1350. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/.npmignore +0 -0
  1351. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/.travis.yml +0 -0
  1352. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/LICENSE +0 -0
  1353. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/README.md +0 -0
  1354. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/another-json.js +0 -0
  1355. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/package.json +0 -0
  1356. /package/node_modules/{matrix-js-sdk/node_modules/another-json → another-json}/spec/another-json-spec.js +0 -0
  1357. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/LICENSE +0 -0
  1358. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/README.md +0 -0
  1359. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/lib/_colorize.js +0 -0
  1360. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/lib/argparse.d.ts +0 -0
  1361. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/lib/argparse.js +0 -0
  1362. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/lib/difflib.js +0 -0
  1363. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/lib/sub.js +0 -0
  1364. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/lib/textwrap.js +0 -0
  1365. /package/node_modules/{markdown-it/node_modules/argparse → argparse}/package.json +0 -0
  1366. /package/node_modules/{matrix-js-sdk/node_modules/base-x → base-x}/LICENSE.md +0 -0
  1367. /package/node_modules/{matrix-js-sdk/node_modules/base-x → base-x}/README.md +0 -0
  1368. /package/node_modules/{matrix-js-sdk/node_modules/base-x → base-x}/package.json +0 -0
  1369. /package/node_modules/{matrix-js-sdk/node_modules/base-x → base-x}/src/cjs/index.cjs +0 -0
  1370. /package/node_modules/{matrix-js-sdk/node_modules/base-x → base-x}/src/cjs/index.d.ts +0 -0
  1371. /package/node_modules/{matrix-js-sdk/node_modules/base-x → base-x}/src/esm/index.js +0 -0
  1372. /package/node_modules/{matrix-js-sdk/node_modules/bs58 → bs58}/LICENSE +0 -0
  1373. /package/node_modules/{matrix-js-sdk/node_modules/bs58 → bs58}/README.md +0 -0
  1374. /package/node_modules/{matrix-js-sdk/node_modules/bs58 → bs58}/package.json +0 -0
  1375. /package/node_modules/{matrix-js-sdk/node_modules/bs58 → bs58}/src/cjs/index.cjs +0 -0
  1376. /package/node_modules/{matrix-js-sdk/node_modules/bs58 → bs58}/src/cjs/index.d.ts +0 -0
  1377. /package/node_modules/{matrix-js-sdk/node_modules/bs58 → bs58}/src/esm/index.js +0 -0
  1378. /package/node_modules/{matrix-js-sdk/node_modules/content-type → content-type}/LICENSE +0 -0
  1379. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/LICENSE +0 -0
  1380. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/README.md +0 -0
  1381. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/package.json +0 -0
  1382. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/src/browser.js +0 -0
  1383. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/src/common.js +0 -0
  1384. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/src/index.js +0 -0
  1385. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/debug → debug}/src/node.js +0 -0
  1386. /package/node_modules/{markdown-it/node_modules/entities → entities}/LICENSE +0 -0
  1387. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode-codepoint.d.ts +0 -0
  1388. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode-codepoint.d.ts.map +0 -0
  1389. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode-codepoint.js +0 -0
  1390. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode-codepoint.js.map +0 -0
  1391. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode.d.ts +0 -0
  1392. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode.d.ts.map +0 -0
  1393. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode.js +0 -0
  1394. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/decode.js.map +0 -0
  1395. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/encode.d.ts +0 -0
  1396. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/encode.d.ts.map +0 -0
  1397. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/encode.js +0 -0
  1398. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/encode.js.map +0 -0
  1399. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/escape.d.ts +0 -0
  1400. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/escape.d.ts.map +0 -0
  1401. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/escape.js +0 -0
  1402. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/escape.js.map +0 -0
  1403. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-html.d.ts +0 -0
  1404. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-html.d.ts.map +0 -0
  1405. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-html.js +0 -0
  1406. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-html.js.map +0 -0
  1407. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-xml.d.ts +0 -0
  1408. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-xml.d.ts.map +0 -0
  1409. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-xml.js +0 -0
  1410. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/decode-data-xml.js.map +0 -0
  1411. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/encode-html.d.ts +0 -0
  1412. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/encode-html.d.ts.map +0 -0
  1413. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/encode-html.js +0 -0
  1414. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/generated/encode-html.js.map +0 -0
  1415. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/index.d.ts +0 -0
  1416. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/index.d.ts.map +0 -0
  1417. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/index.js +0 -0
  1418. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/index.js.map +0 -0
  1419. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/bin-trie-flags.d.ts +0 -0
  1420. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/bin-trie-flags.d.ts.map +0 -0
  1421. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/bin-trie-flags.js +0 -0
  1422. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/bin-trie-flags.js.map +0 -0
  1423. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/decode-shared.d.ts +0 -0
  1424. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/decode-shared.d.ts.map +0 -0
  1425. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/decode-shared.js +0 -0
  1426. /package/node_modules/{markdown-it/node_modules/entities → entities}/dist/internal/decode-shared.js.map +0 -0
  1427. /package/node_modules/{markdown-it/node_modules/entities → entities}/package.json +0 -0
  1428. /package/node_modules/{markdown-it/node_modules/entities → entities}/readme.md +0 -0
  1429. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/decode-codepoint.ts +0 -0
  1430. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/decode.ts +0 -0
  1431. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/encode.ts +0 -0
  1432. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/escape.ts +0 -0
  1433. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/generated/decode-data-html.ts +0 -0
  1434. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/generated/decode-data-xml.ts +0 -0
  1435. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/generated/encode-html.ts +0 -0
  1436. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/index.ts +0 -0
  1437. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/internal/bin-trie-flags.ts +0 -0
  1438. /package/node_modules/{markdown-it/node_modules/entities → entities}/src/internal/decode-shared.ts +0 -0
  1439. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/.airtap.yml +0 -0
  1440. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/.github/FUNDING.yml +0 -0
  1441. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/.travis.yml +0 -0
  1442. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/History.md +0 -0
  1443. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/LICENSE +0 -0
  1444. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/Readme.md +0 -0
  1445. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/events.js +0 -0
  1446. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/package.json +0 -0
  1447. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/security.md +0 -0
  1448. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/add-listeners.js +0 -0
  1449. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/check-listener-leaks.js +0 -0
  1450. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/common.js +0 -0
  1451. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/errors.js +0 -0
  1452. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/events-list.js +0 -0
  1453. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/events-once.js +0 -0
  1454. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/index.js +0 -0
  1455. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/legacy-compat.js +0 -0
  1456. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/listener-count.js +0 -0
  1457. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/listeners-side-effects.js +0 -0
  1458. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/listeners.js +0 -0
  1459. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/max-listeners.js +0 -0
  1460. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/method-names.js +0 -0
  1461. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/modify-in-emit.js +0 -0
  1462. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/num-args.js +0 -0
  1463. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/once.js +0 -0
  1464. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/prepend.js +0 -0
  1465. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/remove-all-listeners.js +0 -0
  1466. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/remove-listeners.js +0 -0
  1467. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/set-max-listeners-side-effects.js +0 -0
  1468. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/special-event-names.js +0 -0
  1469. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/subclass.js +0 -0
  1470. /package/node_modules/{matrix-js-sdk/node_modules/events → events}/tests/symbols.js +0 -0
  1471. /package/node_modules/{matrix-js-sdk/node_modules/is-network-error → file-type}/license +0 -0
  1472. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/detectors/asf.js +0 -0
  1473. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/detectors/ebml.js +0 -0
  1474. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/detectors/png.js +0 -0
  1475. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/index.d.ts +0 -0
  1476. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/index.js +0 -0
  1477. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/index.test-d.ts +0 -0
  1478. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/parser.js +0 -0
  1479. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/supported.js +0 -0
  1480. /package/node_modules/{music-metadata/node_modules/file-type → file-type}/source/tokens.js +0 -0
  1481. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/LICENSE +0 -0
  1482. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/README.md +0 -0
  1483. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.d.ts +0 -0
  1484. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.d.ts.map +0 -0
  1485. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.js +0 -0
  1486. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.js.map +0 -0
  1487. /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
  1488. /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
  1489. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.js +0 -0
  1490. /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
  1491. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/https-proxy-agent → https-proxy-agent}/package.json +0 -0
  1492. /package/node_modules/{music-metadata/node_modules/ieee754 → ieee754}/LICENSE +0 -0
  1493. /package/node_modules/{music-metadata/node_modules/ieee754 → ieee754}/README.md +0 -0
  1494. /package/node_modules/{music-metadata/node_modules/ieee754 → ieee754}/index.d.ts +0 -0
  1495. /package/node_modules/{music-metadata/node_modules/ieee754 → ieee754}/index.js +0 -0
  1496. /package/node_modules/{music-metadata/node_modules/ieee754 → ieee754}/package.json +0 -0
  1497. /package/node_modules/{matrix-js-sdk/node_modules/is-network-error → is-network-error}/index.d.ts +0 -0
  1498. /package/node_modules/{matrix-js-sdk/node_modules/is-network-error → is-network-error}/index.js +0 -0
  1499. /package/node_modules/{matrix-js-sdk/node_modules/p-retry → is-network-error}/license +0 -0
  1500. /package/node_modules/{matrix-js-sdk/node_modules/is-network-error → is-network-error}/package.json +0 -0
  1501. /package/node_modules/{matrix-js-sdk/node_modules/is-network-error → is-network-error}/readme.md +0 -0
  1502. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/LICENSE +0 -0
  1503. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/README.md +0 -0
  1504. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/build/index.cjs.js +0 -0
  1505. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/build/index.cjs.js.map +0 -0
  1506. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/build/index.d.ts +0 -0
  1507. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/build/index.mjs +0 -0
  1508. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/build/index.mjs.map +0 -0
  1509. /package/node_modules/{markdown-it/node_modules/linkify-it → linkify-it}/package.json +0 -0
  1510. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/.editorconfig +0 -0
  1511. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/CONTRIBUTING.md +0 -0
  1512. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/Gruntfile.js +0 -0
  1513. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/LICENSE-MIT +0 -0
  1514. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/README.md +0 -0
  1515. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/_config.yml +0 -0
  1516. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/bower.json +0 -0
  1517. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/demo/index.html +0 -0
  1518. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/demo/script.js +0 -0
  1519. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/demo/styles.css +0 -0
  1520. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/dist/loglevel.js +0 -0
  1521. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/dist/loglevel.min.js +0 -0
  1522. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/index.d.ts +0 -0
  1523. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/lib/loglevel.js +0 -0
  1524. /package/node_modules/{matrix-js-sdk/node_modules/loglevel → loglevel}/package.json +0 -0
  1525. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/LICENSE +0 -0
  1526. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/README.md +0 -0
  1527. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/ExtensibleEvents.d.ts +0 -0
  1528. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/ExtensibleEvents.js +0 -0
  1529. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/IPartialEvent.d.ts +0 -0
  1530. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/IPartialEvent.js +0 -0
  1531. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/InvalidEventError.d.ts +0 -0
  1532. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/InvalidEventError.js +0 -0
  1533. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/NamespacedMap.d.ts +0 -0
  1534. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/NamespacedMap.js +0 -0
  1535. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/NamespacedValue.d.ts +0 -0
  1536. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/NamespacedValue.js +0 -0
  1537. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/EmoteEvent.d.ts +0 -0
  1538. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/EmoteEvent.js +0 -0
  1539. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/ExtensibleEvent.d.ts +0 -0
  1540. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/ExtensibleEvent.js +0 -0
  1541. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/MessageEvent.d.ts +0 -0
  1542. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/MessageEvent.js +0 -0
  1543. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/NoticeEvent.d.ts +0 -0
  1544. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/NoticeEvent.js +0 -0
  1545. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/PollEndEvent.d.ts +0 -0
  1546. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/PollEndEvent.js +0 -0
  1547. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/PollResponseEvent.d.ts +0 -0
  1548. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/PollResponseEvent.js +0 -0
  1549. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/PollStartEvent.d.ts +0 -0
  1550. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/PollStartEvent.js +0 -0
  1551. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/message_types.d.ts +0 -0
  1552. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/message_types.js +0 -0
  1553. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/poll_types.d.ts +0 -0
  1554. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/poll_types.js +0 -0
  1555. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/relationship_types.d.ts +0 -0
  1556. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/events/relationship_types.js +0 -0
  1557. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/index.d.ts +0 -0
  1558. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/index.js +0 -0
  1559. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/interpreters/legacy/MRoomMessage.d.ts +0 -0
  1560. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/interpreters/legacy/MRoomMessage.js +0 -0
  1561. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/interpreters/modern/MMessage.d.ts +0 -0
  1562. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/interpreters/modern/MMessage.js +0 -0
  1563. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/interpreters/modern/MPoll.d.ts +0 -0
  1564. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/interpreters/modern/MPoll.js +0 -0
  1565. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/types.d.ts +0 -0
  1566. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/types.js +0 -0
  1567. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/utility/MessageMatchers.d.ts +0 -0
  1568. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/utility/MessageMatchers.js +0 -0
  1569. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/utility/events.d.ts +0 -0
  1570. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/lib/utility/events.js +0 -0
  1571. /package/node_modules/{matrix-js-sdk/node_modules/matrix-events-sdk → matrix-events-sdk}/package.json +0 -0
  1572. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/LICENSE +0 -0
  1573. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/README.md +0 -0
  1574. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/dist/api.js +0 -0
  1575. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/dist/api.min.js +0 -0
  1576. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/ClientWidgetApi.d.ts +0 -0
  1577. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/ClientWidgetApi.js +0 -0
  1578. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/ClientWidgetApi.js.map +0 -0
  1579. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/Symbols.d.ts +0 -0
  1580. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/Symbols.js +0 -0
  1581. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/Symbols.js.map +0 -0
  1582. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/WidgetApi.d.ts +0 -0
  1583. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/WidgetApi.js +0 -0
  1584. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/WidgetApi.js.map +0 -0
  1585. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/driver/WidgetDriver.d.ts +0 -0
  1586. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/driver/WidgetDriver.js +0 -0
  1587. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/driver/WidgetDriver.js.map +0 -0
  1588. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/index.d.ts +0 -0
  1589. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/index.js +0 -0
  1590. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/index.js.map +0 -0
  1591. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ApiVersion.d.ts +0 -0
  1592. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ApiVersion.js +0 -0
  1593. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ApiVersion.js.map +0 -0
  1594. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/Capabilities.d.ts +0 -0
  1595. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/Capabilities.js +0 -0
  1596. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/Capabilities.js.map +0 -0
  1597. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/CapabilitiesAction.d.ts +0 -0
  1598. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/CapabilitiesAction.js +0 -0
  1599. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/CapabilitiesAction.js.map +0 -0
  1600. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ContentLoadedAction.d.ts +0 -0
  1601. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ContentLoadedAction.js +0 -0
  1602. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ContentLoadedAction.js.map +0 -0
  1603. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/DownloadFileAction.d.ts +0 -0
  1604. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/DownloadFileAction.js +0 -0
  1605. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/DownloadFileAction.js.map +0 -0
  1606. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/GetMediaConfigAction.d.ts +0 -0
  1607. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/GetMediaConfigAction.js +0 -0
  1608. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/GetMediaConfigAction.js.map +0 -0
  1609. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/GetOpenIDAction.d.ts +0 -0
  1610. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/GetOpenIDAction.js +0 -0
  1611. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/GetOpenIDAction.js.map +0 -0
  1612. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ICustomWidgetData.d.ts +0 -0
  1613. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ICustomWidgetData.js +0 -0
  1614. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ICustomWidgetData.js.map +0 -0
  1615. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IJitsiWidgetData.d.ts +0 -0
  1616. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IJitsiWidgetData.js +0 -0
  1617. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IJitsiWidgetData.js.map +0 -0
  1618. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IRoomAccountData.d.ts +0 -0
  1619. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IRoomAccountData.js +0 -0
  1620. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IRoomAccountData.js.map +0 -0
  1621. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IRoomEvent.d.ts +0 -0
  1622. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IRoomEvent.js +0 -0
  1623. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IRoomEvent.js.map +0 -0
  1624. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IStickerpickerWidgetData.d.ts +0 -0
  1625. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IStickerpickerWidgetData.js +0 -0
  1626. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IStickerpickerWidgetData.js.map +0 -0
  1627. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IToDeviceMessage.d.ts +0 -0
  1628. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IToDeviceMessage.js +0 -0
  1629. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IToDeviceMessage.js.map +0 -0
  1630. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidget.d.ts +0 -0
  1631. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidget.js +0 -0
  1632. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidget.js.map +0 -0
  1633. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiErrorResponse.d.ts +0 -0
  1634. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiErrorResponse.js +0 -0
  1635. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiErrorResponse.js.map +0 -0
  1636. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiRequest.d.ts +0 -0
  1637. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiRequest.js +0 -0
  1638. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiRequest.js.map +0 -0
  1639. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiResponse.d.ts +0 -0
  1640. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiResponse.js +0 -0
  1641. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/IWidgetApiResponse.js.map +0 -0
  1642. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/LanguageChangeAction.d.ts +0 -0
  1643. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/LanguageChangeAction.js +0 -0
  1644. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/LanguageChangeAction.js.map +0 -0
  1645. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ModalButtonKind.d.ts +0 -0
  1646. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ModalButtonKind.js +0 -0
  1647. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ModalButtonKind.js.map +0 -0
  1648. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ModalWidgetActions.d.ts +0 -0
  1649. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ModalWidgetActions.js +0 -0
  1650. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ModalWidgetActions.js.map +0 -0
  1651. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/NavigateAction.d.ts +0 -0
  1652. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/NavigateAction.js +0 -0
  1653. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/NavigateAction.js.map +0 -0
  1654. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/OpenIDCredentialsAction.d.ts +0 -0
  1655. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/OpenIDCredentialsAction.js +0 -0
  1656. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/OpenIDCredentialsAction.js.map +0 -0
  1657. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadEventAction.d.ts +0 -0
  1658. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadEventAction.js +0 -0
  1659. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadEventAction.js.map +0 -0
  1660. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadRelationsAction.d.ts +0 -0
  1661. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadRelationsAction.js +0 -0
  1662. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadRelationsAction.js.map +0 -0
  1663. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadRoomAccountDataAction.d.ts +0 -0
  1664. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadRoomAccountDataAction.js +0 -0
  1665. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ReadRoomAccountDataAction.js.map +0 -0
  1666. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/RtcLivekitActions.d.ts +0 -0
  1667. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/RtcLivekitActions.js +0 -0
  1668. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/RtcLivekitActions.js.map +0 -0
  1669. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/RtcTransportsAction.d.ts +0 -0
  1670. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/RtcTransportsAction.js +0 -0
  1671. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/RtcTransportsAction.js.map +0 -0
  1672. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ScreenshotAction.d.ts +0 -0
  1673. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ScreenshotAction.js +0 -0
  1674. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ScreenshotAction.js.map +0 -0
  1675. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SendEventAction.d.ts +0 -0
  1676. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SendEventAction.js +0 -0
  1677. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SendEventAction.js.map +0 -0
  1678. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SendToDeviceAction.d.ts +0 -0
  1679. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SendToDeviceAction.js +0 -0
  1680. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SendToDeviceAction.js.map +0 -0
  1681. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SetModalButtonEnabledAction.d.ts +0 -0
  1682. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SetModalButtonEnabledAction.js +0 -0
  1683. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SetModalButtonEnabledAction.js.map +0 -0
  1684. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/StickerAction.d.ts +0 -0
  1685. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/StickerAction.js +0 -0
  1686. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/StickerAction.js.map +0 -0
  1687. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/StickyAction.d.ts +0 -0
  1688. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/StickyAction.js +0 -0
  1689. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/StickyAction.js.map +0 -0
  1690. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SupportedVersionsAction.d.ts +0 -0
  1691. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SupportedVersionsAction.js +0 -0
  1692. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/SupportedVersionsAction.js.map +0 -0
  1693. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ThemeChangeAction.d.ts +0 -0
  1694. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ThemeChangeAction.js +0 -0
  1695. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/ThemeChangeAction.js.map +0 -0
  1696. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/TurnServerActions.d.ts +0 -0
  1697. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/TurnServerActions.js +0 -0
  1698. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/TurnServerActions.js.map +0 -0
  1699. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UpdateDelayedEventAction.d.ts +0 -0
  1700. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UpdateDelayedEventAction.js +0 -0
  1701. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UpdateDelayedEventAction.js.map +0 -0
  1702. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UpdateStateAction.d.ts +0 -0
  1703. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UpdateStateAction.js +0 -0
  1704. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UpdateStateAction.js.map +0 -0
  1705. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UploadFileAction.d.ts +0 -0
  1706. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UploadFileAction.js +0 -0
  1707. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UploadFileAction.js.map +0 -0
  1708. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UserDirectorySearchAction.d.ts +0 -0
  1709. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UserDirectorySearchAction.js +0 -0
  1710. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/UserDirectorySearchAction.js.map +0 -0
  1711. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/VisibilityAction.d.ts +0 -0
  1712. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/VisibilityAction.js +0 -0
  1713. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/VisibilityAction.js.map +0 -0
  1714. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetApiAction.d.ts +0 -0
  1715. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetApiAction.js +0 -0
  1716. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetApiAction.js.map +0 -0
  1717. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetApiDirection.d.ts +0 -0
  1718. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetApiDirection.js +0 -0
  1719. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetApiDirection.js.map +0 -0
  1720. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetConfigAction.d.ts +0 -0
  1721. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetConfigAction.js +0 -0
  1722. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetConfigAction.js.map +0 -0
  1723. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetKind.d.ts +0 -0
  1724. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetKind.js +0 -0
  1725. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetKind.js.map +0 -0
  1726. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetType.d.ts +0 -0
  1727. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetType.js +0 -0
  1728. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/interfaces/WidgetType.js.map +0 -0
  1729. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/Widget.d.ts +0 -0
  1730. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/Widget.js +0 -0
  1731. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/Widget.js.map +0 -0
  1732. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/WidgetEventCapability.d.ts +0 -0
  1733. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/WidgetEventCapability.js +0 -0
  1734. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/WidgetEventCapability.js.map +0 -0
  1735. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/WidgetParser.d.ts +0 -0
  1736. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/WidgetParser.js +0 -0
  1737. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/WidgetParser.js.map +0 -0
  1738. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/validation/url.d.ts +0 -0
  1739. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/validation/url.js +0 -0
  1740. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/validation/url.js.map +0 -0
  1741. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/validation/utils.d.ts +0 -0
  1742. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/validation/utils.js +0 -0
  1743. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/models/validation/utils.js.map +0 -0
  1744. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/templating/url-template.d.ts +0 -0
  1745. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/templating/url-template.js +0 -0
  1746. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/templating/url-template.js.map +0 -0
  1747. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/transport/ITransport.d.ts +0 -0
  1748. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/transport/ITransport.js +0 -0
  1749. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/transport/ITransport.js.map +0 -0
  1750. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/transport/PostmessageTransport.d.ts +0 -0
  1751. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/transport/PostmessageTransport.js +0 -0
  1752. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/transport/PostmessageTransport.js.map +0 -0
  1753. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/util/SimpleObservable.d.ts +0 -0
  1754. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/util/SimpleObservable.js +0 -0
  1755. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/lib/util/SimpleObservable.js.map +0 -0
  1756. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/package.json +0 -0
  1757. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/ClientWidgetApi.ts +0 -0
  1758. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/Symbols.ts +0 -0
  1759. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/WidgetApi.ts +0 -0
  1760. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/driver/WidgetDriver.ts +0 -0
  1761. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/index.ts +0 -0
  1762. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ApiVersion.ts +0 -0
  1763. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/Capabilities.ts +0 -0
  1764. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/CapabilitiesAction.ts +0 -0
  1765. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ContentLoadedAction.ts +0 -0
  1766. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/DownloadFileAction.ts +0 -0
  1767. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/GetMediaConfigAction.ts +0 -0
  1768. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/GetOpenIDAction.ts +0 -0
  1769. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ICustomWidgetData.ts +0 -0
  1770. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IJitsiWidgetData.ts +0 -0
  1771. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IRoomAccountData.ts +0 -0
  1772. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IRoomEvent.ts +0 -0
  1773. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IStickerpickerWidgetData.ts +0 -0
  1774. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IToDeviceMessage.ts +0 -0
  1775. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IWidget.ts +0 -0
  1776. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IWidgetApiErrorResponse.ts +0 -0
  1777. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IWidgetApiRequest.ts +0 -0
  1778. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/IWidgetApiResponse.ts +0 -0
  1779. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/LanguageChangeAction.ts +0 -0
  1780. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ModalButtonKind.ts +0 -0
  1781. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ModalWidgetActions.ts +0 -0
  1782. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/NavigateAction.ts +0 -0
  1783. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/OpenIDCredentialsAction.ts +0 -0
  1784. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ReadEventAction.ts +0 -0
  1785. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ReadRelationsAction.ts +0 -0
  1786. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ReadRoomAccountDataAction.ts +0 -0
  1787. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/RtcLivekitActions.ts +0 -0
  1788. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/RtcTransportsAction.ts +0 -0
  1789. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ScreenshotAction.ts +0 -0
  1790. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/SendEventAction.ts +0 -0
  1791. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/SendToDeviceAction.ts +0 -0
  1792. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/SetModalButtonEnabledAction.ts +0 -0
  1793. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/StickerAction.ts +0 -0
  1794. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/StickyAction.ts +0 -0
  1795. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/SupportedVersionsAction.ts +0 -0
  1796. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/ThemeChangeAction.ts +0 -0
  1797. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/TurnServerActions.ts +0 -0
  1798. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/UpdateDelayedEventAction.ts +0 -0
  1799. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/UpdateStateAction.ts +0 -0
  1800. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/UploadFileAction.ts +0 -0
  1801. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/UserDirectorySearchAction.ts +0 -0
  1802. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/VisibilityAction.ts +0 -0
  1803. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/WidgetApiAction.ts +0 -0
  1804. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/WidgetApiDirection.ts +0 -0
  1805. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/WidgetConfigAction.ts +0 -0
  1806. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/WidgetKind.ts +0 -0
  1807. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/interfaces/WidgetType.ts +0 -0
  1808. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/models/Widget.ts +0 -0
  1809. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/models/WidgetEventCapability.ts +0 -0
  1810. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/models/WidgetParser.ts +0 -0
  1811. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/models/validation/url.ts +0 -0
  1812. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/models/validation/utils.ts +0 -0
  1813. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/templating/url-template.ts +0 -0
  1814. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/transport/ITransport.ts +0 -0
  1815. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/transport/PostmessageTransport.ts +0 -0
  1816. /package/node_modules/{matrix-js-sdk/node_modules/matrix-widget-api → matrix-widget-api}/src/util/SimpleObservable.ts +0 -0
  1817. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/LICENSE +0 -0
  1818. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/README.md +0 -0
  1819. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/build/index.cjs.js +0 -0
  1820. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/index.mjs +0 -0
  1821. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/lib/decode.mjs +0 -0
  1822. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/lib/encode.mjs +0 -0
  1823. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/lib/format.mjs +0 -0
  1824. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/lib/index.d.ts +0 -0
  1825. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/lib/parse.mjs +0 -0
  1826. /package/node_modules/{markdown-it/node_modules/mdurl → mdurl}/package.json +0 -0
  1827. /package/node_modules/{music-metadata/node_modules/media-typer → media-typer}/LICENSE +0 -0
  1828. /package/node_modules/{music-metadata/node_modules/media-typer → media-typer}/README.md +0 -0
  1829. /package/node_modules/{music-metadata/node_modules/media-typer → media-typer}/dist/index.d.ts +0 -0
  1830. /package/node_modules/{music-metadata/node_modules/media-typer → media-typer}/dist/index.js +0 -0
  1831. /package/node_modules/{music-metadata/node_modules/media-typer → media-typer}/dist/index.js.map +0 -0
  1832. /package/node_modules/{music-metadata/node_modules/media-typer → media-typer}/package.json +0 -0
  1833. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/ms → ms}/index.js +0 -0
  1834. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/ms → ms}/license.md +0 -0
  1835. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/ms → ms}/package.json +0 -0
  1836. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/ms → ms}/readme.md +0 -0
  1837. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/LICENSE +0 -0
  1838. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/README.md +0 -0
  1839. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/bin/helpers.js +0 -0
  1840. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/bin/ndh +0 -0
  1841. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/dist/index.js +0 -0
  1842. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/package.json +0 -0
  1843. /package/node_modules/{@matrix-org/matrix-sdk-crypto-nodejs/node_modules/node-downloader-helper → node-downloader-helper}/types/index.d.ts +0 -0
  1844. /package/node_modules/{matrix-js-sdk/node_modules/p-retry → p-retry}/index.d.ts +0 -0
  1845. /package/node_modules/{matrix-js-sdk/node_modules/p-retry → p-retry}/index.js +0 -0
  1846. /package/node_modules/{music-metadata/node_modules/file-type → p-retry}/license +0 -0
  1847. /package/node_modules/{matrix-js-sdk/node_modules/p-retry → p-retry}/package.json +0 -0
  1848. /package/node_modules/{matrix-js-sdk/node_modules/p-retry → p-retry}/readme.md +0 -0
  1849. /package/node_modules/{markdown-it/node_modules/punycode.js → punycode.js}/LICENSE-MIT.txt +0 -0
  1850. /package/node_modules/{markdown-it/node_modules/punycode.js → punycode.js}/README.md +0 -0
  1851. /package/node_modules/{markdown-it/node_modules/punycode.js → punycode.js}/package.json +0 -0
  1852. /package/node_modules/{markdown-it/node_modules/punycode.js → punycode.js}/punycode.es6.js +0 -0
  1853. /package/node_modules/{markdown-it/node_modules/punycode.js → punycode.js}/punycode.js +0 -0
  1854. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/.eslintrc.js +0 -0
  1855. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/.github/FUNDING.yml +0 -0
  1856. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/.github/codecov.yml +0 -0
  1857. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/.github/dependabot.yml +0 -0
  1858. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/.github/workflows/ci.yml +0 -0
  1859. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/CHANGELOG.md +0 -0
  1860. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/LICENSE +0 -0
  1861. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/README.md +0 -0
  1862. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/checker.js +0 -0
  1863. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/lib/grammar.js +0 -0
  1864. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/lib/index.js +0 -0
  1865. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/lib/parser.js +0 -0
  1866. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/lib/writer.js +0 -0
  1867. /package/node_modules/{matrix-js-sdk/node_modules/sdp-transform → sdp-transform}/package.json +0 -0
  1868. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/LICENSE.txt +0 -0
  1869. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/README.md +0 -0
  1870. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/AbstractTokenizer.d.ts +0 -0
  1871. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/AbstractTokenizer.js +0 -0
  1872. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/BlobTokenizer.d.ts +0 -0
  1873. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/BlobTokenizer.js +0 -0
  1874. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/BufferTokenizer.d.ts +0 -0
  1875. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/BufferTokenizer.js +0 -0
  1876. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/FileTokenizer.d.ts +0 -0
  1877. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/FileTokenizer.js +0 -0
  1878. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/ReadStreamTokenizer.d.ts +0 -0
  1879. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/ReadStreamTokenizer.js +0 -0
  1880. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/core.d.ts +0 -0
  1881. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/core.js +0 -0
  1882. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/index.d.ts +0 -0
  1883. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/index.js +0 -0
  1884. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/AbstractStreamReader.d.ts +0 -0
  1885. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/AbstractStreamReader.js +0 -0
  1886. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/Deferred.d.ts +0 -0
  1887. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/Deferred.js +0 -0
  1888. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/Errors.d.ts +0 -0
  1889. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/Errors.js +0 -0
  1890. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/StreamReader.d.ts +0 -0
  1891. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/StreamReader.js +0 -0
  1892. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamByobReader.d.ts +0 -0
  1893. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamByobReader.js +0 -0
  1894. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamDefaultReader.d.ts +0 -0
  1895. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamDefaultReader.js +0 -0
  1896. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamReader.d.ts +0 -0
  1897. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamReader.js +0 -0
  1898. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamReaderFactory.d.ts +0 -0
  1899. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/WebStreamReaderFactory.js +0 -0
  1900. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/index.d.ts +0 -0
  1901. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/stream/index.js +0 -0
  1902. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/lib/types.d.ts +0 -0
  1903. /package/node_modules/{music-metadata/node_modules/strtok3 → strtok3}/package.json +0 -0
  1904. /package/node_modules/{music-metadata/node_modules/token-types → token-types}/LICENSE.txt +0 -0
  1905. /package/node_modules/{music-metadata/node_modules/token-types → token-types}/README.md +0 -0
  1906. /package/node_modules/{music-metadata/node_modules/token-types → token-types}/lib/index.d.ts +0 -0
  1907. /package/node_modules/{music-metadata/node_modules/token-types → token-types}/lib/index.js +0 -0
  1908. /package/node_modules/{music-metadata/node_modules/token-types → token-types}/package.json +0 -0
  1909. /package/node_modules/typebox/build/guard/{string.d.mts → unicode/unicode_segment.d.mts} +0 -0
  1910. /package/node_modules/{markdown-it/node_modules/uc.micro → uc.micro}/LICENSE.txt +0 -0
  1911. /package/node_modules/{markdown-it/node_modules/uc.micro → uc.micro}/README.md +0 -0
  1912. /package/node_modules/{markdown-it/node_modules/uc.micro → uc.micro}/build/index.cjs.js +0 -0
  1913. /package/node_modules/{markdown-it/node_modules/uc.micro → uc.micro}/build/index.d.ts +0 -0
  1914. /package/node_modules/{markdown-it/node_modules/uc.micro → uc.micro}/build/index.mjs +0 -0
  1915. /package/node_modules/{markdown-it/node_modules/uc.micro → uc.micro}/package.json +0 -0
  1916. /package/node_modules/{music-metadata/node_modules/uint8array-extras → uint8array-extras}/index.d.ts +0 -0
  1917. /package/node_modules/{music-metadata/node_modules/uint8array-extras → uint8array-extras}/index.js +0 -0
  1918. /package/node_modules/{music-metadata/node_modules/uint8array-extras → uint8array-extras}/license +0 -0
  1919. /package/node_modules/{music-metadata/node_modules/uint8array-extras → uint8array-extras}/package.json +0 -0
  1920. /package/node_modules/{music-metadata/node_modules/uint8array-extras → uint8array-extras}/readme.md +0 -0
  1921. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/CHANGELOG.md +0 -0
  1922. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/LICENSE +0 -0
  1923. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/README.md +0 -0
  1924. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/data.json +0 -0
  1925. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/index.d.ts +0 -0
  1926. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/index.js +0 -0
  1927. /package/node_modules/{matrix-js-sdk/node_modules/unhomoglyph → unhomoglyph}/package.json +0 -0
  1928. /package/node_modules/{music-metadata/node_modules/win-guid → win-guid}/LICENSE.txt +0 -0
  1929. /package/node_modules/{music-metadata/node_modules/win-guid → win-guid}/README.md +0 -0
  1930. /package/node_modules/{music-metadata/node_modules/win-guid → win-guid}/lib/guid.d.ts +0 -0
  1931. /package/node_modules/{music-metadata/node_modules/win-guid → win-guid}/lib/guid.js +0 -0
  1932. /package/node_modules/{music-metadata/node_modules/win-guid → win-guid}/package.json +0 -0
@@ -0,0 +1,4352 @@
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-WkgrIxMt.mjs";
4
+ import { a as resolveMatrixThreadRouting, i as resolveMatrixInboundRoute, n as resolveMatrixStoredSessionMeta, o as resolveMatrixRoomConfig } from "./channel-DXenXmj0.mjs";
5
+ import { a as resolveMatrixAllowListMatch, i as normalizeMatrixUserId, r as normalizeMatrixAllowList } from "./channel.setup-DWfLaXqT.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-C2rMVVIQ.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, v as RelationType } from "./direct-management-Cn2t8n1V.mjs";
9
+ import { D as setBoundedMap, 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-GOF64QRc.mjs";
10
+ import { t as createMatrixThreadBindingManager } from "./thread-bindings-jXu_9cHE.mjs";
11
+ import { i as readMatrixMessages, u as fetchMatrixPollSnapshot } from "./messages-Buz27pi5.mjs";
12
+ import { a as isMatrixStartupAbortError, c as getMatrixMonitorTaskSignal, d as resolveMatrixAuthContext, l as backfillMatrixAuthDeviceIdAfterStartup, n as acquireSharedMatrixClient, o as throwIfMatrixStartupAborted, s as createMatrixMonitorTaskRunner, u as resolveMatrixAuth } from "./client-Ccv77kwh.mjs";
13
+ import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-C1XvVD3K.mjs";
14
+ import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-C9vBijaH.mjs";
15
+ import { t as resolveMatrixTargets } from "./resolve-targets-BFq3q4c9.mjs";
16
+ import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-B6797jNA.mjs";
17
+ import { createMatrixInboundEventDeduper } from "./inbound-dedupe-BGrMrTTu.mjs";
18
+ import { a as isMatrixAccessTokenInvalidatedError, d as isMatrixDisconnectedSyncState, f as isMatrixReadySyncState, p as isMatrixTerminalSyncState } from "./client-support-Bn9Bk0-H.mjs";
19
+ import { r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-BbTGRJcR.mjs";
20
+ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
21
+ import { createChannelProgressDraftCompositor, createLivePreviewLifecycle, createPreviewMessageReceipt, createReplyPrefixOptions, createTypingCallbacks, logTypingFailure, resolveChannelStreamingBlockEnabled, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
22
+ import { normalizeLowercaseStringOrEmpty, normalizeNullableString, normalizeOptionalString, normalizeStringifiedEntries, normalizeUniqueTrimmedStringList, 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 { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, canonicalizeAllowlistWithResolvedIds, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
26
+ import { normalizeStringEntries as normalizeStringEntries$1 } from "openclaw/plugin-sdk/string-normalization-runtime";
27
+ import { extractErrorCode, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
28
+ import { isFutureDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, resolveOptionalIntegerOption, resolvePromptHistoryLimit } from "openclaw/plugin-sdk/number-runtime";
29
+ import { resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
30
+ import { getSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
31
+ import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
32
+ import { escapeRegExp, sliceUtf16Safe, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
33
+ import { buildTtsSupplementMediaPayload, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
34
+ import { format } from "node:util";
35
+ import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
36
+ import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
37
+ import { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
38
+ import { resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAgeMsForChannel } from "openclaw/plugin-sdk/thread-bindings-runtime";
39
+ import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
40
+ import { reportChannelRoomJoin } from "openclaw/plugin-sdk/channel-join-intro-runtime";
41
+ import { defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
42
+ import { resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
43
+ import { createAcceptedChannelDeliveryResult, createChannelInboundEnvelopeBuilder, createChannelPartialDeliveryError, formatLocationText, hasFinalInboundReplyDispatch, isChannelPartialDeliveryError, logInboundDrop, resolveInboundMentionDecision, resolveInboundReplyDispatchCounts, toInboundMediaFactsWithMetadata, toLocationContext } from "openclaw/plugin-sdk/channel-inbound";
44
+ import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-local-roots";
45
+ import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
46
+ import { evaluateSupplementalContextVisibility, resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
47
+ import { resolveAckReaction } from "openclaw/plugin-sdk/channel-feedback";
48
+ import { createChannelPreflightAudio, formatAudioTranscriptForAgent } from "openclaw/plugin-sdk/media-understanding-runtime";
49
+ import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
50
+ import { buildInboundHistoryFromEntries } from "openclaw/plugin-sdk/reply-history";
51
+ import { decodeHtmlEntities } from "openclaw/plugin-sdk/html-entity-runtime";
52
+ import { channelBlockedPatch, channelReadyPatch, channelStoppedPatch, createTransportActivityStatusPatch } from "openclaw/plugin-sdk/gateway-runtime";
53
+ //#region extensions/matrix/src/matrix/monitor/auto-join.ts
54
+ function registerMatrixAutoJoin(params) {
55
+ const { client, accountConfig, runtime } = params;
56
+ const core = getMatrixRuntime();
57
+ const logVerbose = (message) => {
58
+ if (!core.logging.shouldLogVerbose()) return;
59
+ runtime.log?.(message);
60
+ };
61
+ const autoJoin = accountConfig.autoJoin ?? "off";
62
+ const rawAllowlist = normalizeStringifiedEntries(accountConfig.autoJoinAllowlist ?? []);
63
+ const autoJoinAllowlist = new Set(rawAllowlist);
64
+ const allowedRoomIds = new Set(rawAllowlist.filter((entry) => entry.startsWith("!")));
65
+ const allowedAliases = rawAllowlist.filter((entry) => entry.startsWith("#"));
66
+ const resolvedAliasRoomIds = /* @__PURE__ */ new Map();
67
+ if (autoJoin === "off") return () => {};
68
+ if (autoJoin === "always") logVerbose("matrix: auto-join enabled for all invites");
69
+ else logVerbose("matrix: auto-join enabled for allowlist invites");
70
+ const resolveAllowedAliasRoomId = async (alias) => {
71
+ if (resolvedAliasRoomIds.has(alias)) return resolvedAliasRoomIds.get(alias) ?? null;
72
+ const resolved = await params.client.resolveRoom(alias);
73
+ if (resolved) resolvedAliasRoomIds.set(alias, resolved);
74
+ return resolved;
75
+ };
76
+ const resolveAllowedAliasRoomIds = async () => {
77
+ return (await Promise.all(allowedAliases.map(async (alias) => {
78
+ try {
79
+ return await resolveAllowedAliasRoomId(alias);
80
+ } catch (err) {
81
+ runtime.error?.(`matrix: failed resolving allowlisted alias ${alias}: ${String(err)}`);
82
+ return null;
83
+ }
84
+ }))).filter((roomId) => Boolean(roomId));
85
+ };
86
+ const onInvite = (roomId, _inviteEvent) => {
87
+ params.runDetachedTask(`auto-join invite handler room=${roomId}`, async () => {
88
+ if (autoJoin === "allowlist") {
89
+ const allowedAliasRoomIds = await resolveAllowedAliasRoomIds();
90
+ if (!(autoJoinAllowlist.has("*") || allowedRoomIds.has(roomId) || allowedAliasRoomIds.some((resolvedRoomId) => resolvedRoomId === roomId))) {
91
+ logVerbose(`matrix: invite ignored (not in allowlist) room=${roomId}`);
92
+ return;
93
+ }
94
+ }
95
+ try {
96
+ await client.joinRoom(roomId);
97
+ logVerbose(`matrix: joined room ${roomId}`);
98
+ } catch (err) {
99
+ runtime.error?.(`matrix: failed to join room ${roomId}: ${String(err)}`);
100
+ }
101
+ });
102
+ };
103
+ client.on("room.invite", onInvite);
104
+ return () => {
105
+ client.off("room.invite", onInvite);
106
+ };
107
+ }
108
+ //#endregion
109
+ //#region extensions/matrix/src/matrix/monitor/config.ts
110
+ function normalizeMatrixUserLookupEntry(raw) {
111
+ return raw.replace(/^matrix:/i, "").replace(/^user:/i, "").trim();
112
+ }
113
+ function normalizeMatrixRoomLookupEntry(raw) {
114
+ return raw.replace(/^matrix:/i, "").replace(/^(room|channel):/i, "").trim();
115
+ }
116
+ function filterResolvedMatrixAllowlistEntries(entries) {
117
+ return entries.filter((entry) => {
118
+ const trimmed = entry.trim();
119
+ if (!trimmed) return false;
120
+ if (trimmed === "*") return true;
121
+ return isMatrixQualifiedUserId(normalizeMatrixUserLookupEntry(trimmed));
122
+ });
123
+ }
124
+ function filterFailClosedMatrixAllowlistEntries(entries) {
125
+ return entries.filter((entry) => entry.trim().length > 0);
126
+ }
127
+ function listResolvedMatrixAllowlistEntries(params) {
128
+ const resolvedEntries = [];
129
+ const seen = /* @__PURE__ */ new Set();
130
+ for (const entry of params.entries) {
131
+ const input = String(entry).trim();
132
+ if (!input || seen.has(input)) continue;
133
+ seen.add(input);
134
+ const resolved = params.resolvedMap.get(input);
135
+ if (!resolved?.resolved || !resolved.id) continue;
136
+ const id = normalizeMatrixUserId(resolved.id);
137
+ if (isMatrixQualifiedUserId(id)) resolvedEntries.push({
138
+ input,
139
+ id
140
+ });
141
+ }
142
+ return resolvedEntries;
143
+ }
144
+ function isMatrixDangerousNameMatchingEnabled(params) {
145
+ return isDangerousNameMatchingEnabled(resolveMatrixAccountConfig({
146
+ cfg: params.cfg,
147
+ accountId: params.accountId
148
+ }));
149
+ }
150
+ function addUniqueMatrixAllowlistEntry(params) {
151
+ const trimmed = params.entry.trim();
152
+ if (!trimmed) return;
153
+ const key = normalizeMatrixUserId(trimmed);
154
+ if (params.seen.has(key)) return;
155
+ params.seen.add(key);
156
+ params.entries.push(trimmed);
157
+ }
158
+ function logMatrixAllowlistResolution(params) {
159
+ const { label, resolution, allowNameMatching, runtime } = params;
160
+ summarizeMapping(label, allowNameMatching ? resolution.mapping : [], resolution.unresolved, runtime);
161
+ if (resolution.unresolved.length > 0) {
162
+ const nameMatchingHint = allowNameMatching ? "" : " To match Matrix display names, set channels.matrix.dangerouslyAllowNameMatching=true.";
163
+ runtime.log?.(`${label} entries must be full Matrix IDs (example: @user:server). Unresolved entries will not match any sender.${nameMatchingHint}`);
164
+ }
165
+ }
166
+ async function resolveMatrixMonitorUserEntries(params) {
167
+ const directMatches = [];
168
+ const pending = [];
169
+ for (const entry of params.entries) {
170
+ const input = String(entry).trim();
171
+ if (!input) continue;
172
+ const query = normalizeMatrixUserLookupEntry(input);
173
+ if (!query || query === "*") continue;
174
+ if (isMatrixQualifiedUserId(query)) {
175
+ directMatches.push({
176
+ input,
177
+ resolved: true,
178
+ id: normalizeMatrixUserId(query)
179
+ });
180
+ continue;
181
+ }
182
+ if (params.allowNameMatching) pending.push({
183
+ input,
184
+ query
185
+ });
186
+ else directMatches.push({
187
+ input,
188
+ resolved: false
189
+ });
190
+ }
191
+ (pending.length === 0 ? [] : await params.resolveTargets({
192
+ cfg: params.cfg,
193
+ accountId: params.accountId,
194
+ inputs: pending.map((entry) => entry.query),
195
+ kind: "user",
196
+ runtime: params.runtime
197
+ })).forEach((entry, index) => {
198
+ const source = pending[index];
199
+ if (!source) return;
200
+ directMatches.push({
201
+ input: source.input,
202
+ resolved: entry.resolved,
203
+ id: entry.id ? normalizeMatrixUserId(entry.id) : void 0
204
+ });
205
+ });
206
+ return buildAllowlistResolutionSummary(directMatches);
207
+ }
208
+ async function resolveMatrixMonitorUserAllowlist(params) {
209
+ const allowList = (params.list ?? []).map(String);
210
+ if (allowList.length === 0) return {
211
+ entries: allowList,
212
+ resolvedEntries: []
213
+ };
214
+ const allowNameMatching = isMatrixDangerousNameMatchingEnabled(params);
215
+ const resolution = await resolveMatrixMonitorUserEntries({
216
+ cfg: params.cfg,
217
+ accountId: params.accountId,
218
+ entries: allowList,
219
+ runtime: params.runtime,
220
+ resolveTargets: params.resolveTargets,
221
+ allowNameMatching
222
+ });
223
+ const canonicalized = canonicalizeAllowlistWithResolvedIds({
224
+ existing: allowList,
225
+ resolvedMap: resolution.resolvedMap,
226
+ entryKey: normalizeMatrixUserId
227
+ });
228
+ logMatrixAllowlistResolution({
229
+ label: params.label,
230
+ resolution,
231
+ allowNameMatching,
232
+ runtime: params.runtime
233
+ });
234
+ return {
235
+ entries: params.failClosedOnUnresolved ? filterFailClosedMatrixAllowlistEntries(canonicalized) : filterResolvedMatrixAllowlistEntries(canonicalized),
236
+ resolvedEntries: listResolvedMatrixAllowlistEntries({
237
+ entries: allowList,
238
+ resolvedMap: resolution.resolvedMap
239
+ })
240
+ };
241
+ }
242
+ async function resolveMatrixMonitorLiveUserAllowlist(params) {
243
+ const liveEntries = normalizeStringEntries$1(params.entries);
244
+ if (liveEntries.length === 0) return [];
245
+ const allowNameMatching = isMatrixDangerousNameMatchingEnabled({
246
+ cfg: params.cfg,
247
+ accountId: params.accountId
248
+ });
249
+ const effective = [];
250
+ const seen = /* @__PURE__ */ new Set();
251
+ const startupByInput = new Map((params.startupResolvedEntries ?? []).map((entry) => [entry.input, entry.id]));
252
+ const pending = [];
253
+ for (const entry of liveEntries) {
254
+ const query = normalizeMatrixUserLookupEntry(entry);
255
+ if (entry === "*") {
256
+ addUniqueMatrixAllowlistEntry({
257
+ entries: effective,
258
+ seen,
259
+ entry
260
+ });
261
+ continue;
262
+ }
263
+ if (isMatrixQualifiedUserId(query)) {
264
+ addUniqueMatrixAllowlistEntry({
265
+ entries: effective,
266
+ seen,
267
+ entry: normalizeMatrixUserId(query)
268
+ });
269
+ continue;
270
+ }
271
+ const startupId = startupByInput.get(entry);
272
+ if (allowNameMatching && startupId) {
273
+ addUniqueMatrixAllowlistEntry({
274
+ entries: effective,
275
+ seen,
276
+ entry: startupId
277
+ });
278
+ continue;
279
+ }
280
+ if (allowNameMatching) {
281
+ pending.push(entry);
282
+ continue;
283
+ }
284
+ if (params.failClosedOnUnresolved) addUniqueMatrixAllowlistEntry({
285
+ entries: effective,
286
+ seen,
287
+ entry
288
+ });
289
+ }
290
+ if (pending.length === 0) return effective;
291
+ const resolution = await resolveMatrixMonitorUserEntries({
292
+ cfg: params.cfg,
293
+ accountId: params.accountId,
294
+ entries: pending,
295
+ runtime: params.runtime,
296
+ resolveTargets: params.resolveTargets ?? resolveMatrixTargets,
297
+ allowNameMatching
298
+ });
299
+ const canonicalized = canonicalizeAllowlistWithResolvedIds({
300
+ existing: pending,
301
+ resolvedMap: resolution.resolvedMap,
302
+ entryKey: normalizeMatrixUserId
303
+ });
304
+ const resolvedEntries = params.failClosedOnUnresolved ? filterFailClosedMatrixAllowlistEntries(canonicalized) : filterResolvedMatrixAllowlistEntries(canonicalized);
305
+ for (const entry of resolvedEntries) addUniqueMatrixAllowlistEntry({
306
+ entries: effective,
307
+ seen,
308
+ entry
309
+ });
310
+ return effective;
311
+ }
312
+ async function resolveMatrixMonitorRoomsConfig(params) {
313
+ const roomsConfig = params.roomsConfig;
314
+ if (!roomsConfig || Object.keys(roomsConfig).length === 0) return roomsConfig;
315
+ const mapping = [];
316
+ const unresolved = [];
317
+ const nextRooms = {};
318
+ const allowNameMatching = isMatrixDangerousNameMatchingEnabled({
319
+ cfg: params.cfg,
320
+ accountId: params.accountId
321
+ });
322
+ if (roomsConfig["*"]) nextRooms["*"] = roomsConfig["*"];
323
+ const pending = [];
324
+ for (const [entry, roomConfig] of Object.entries(roomsConfig)) {
325
+ if (entry === "*") continue;
326
+ const input = entry.trim();
327
+ if (!input) continue;
328
+ const cleaned = normalizeMatrixRoomLookupEntry(input);
329
+ if (!cleaned) {
330
+ unresolved.push(entry);
331
+ continue;
332
+ }
333
+ if (isMatrixRoomId(cleaned)) {
334
+ if (!nextRooms[cleaned]) nextRooms[cleaned] = roomConfig;
335
+ if (cleaned !== input) mapping.push(`${input}→${cleaned}`);
336
+ continue;
337
+ }
338
+ if (!cleaned.startsWith("#") && !allowNameMatching) {
339
+ unresolved.push(input);
340
+ continue;
341
+ }
342
+ pending.push({
343
+ input,
344
+ query: cleaned,
345
+ config: roomConfig
346
+ });
347
+ }
348
+ if (pending.length > 0) (await params.resolveTargets({
349
+ cfg: params.cfg,
350
+ accountId: params.accountId,
351
+ inputs: pending.map((entry) => entry.query),
352
+ kind: "group",
353
+ runtime: params.runtime
354
+ })).forEach((entry, index) => {
355
+ const source = pending[index];
356
+ if (!source) return;
357
+ if (entry.resolved && entry.id) {
358
+ const roomKey = normalizeMatrixRoomLookupEntry(entry.id);
359
+ if (!nextRooms[roomKey]) nextRooms[roomKey] = source.config;
360
+ mapping.push(`${source.input}→${roomKey}`);
361
+ } else unresolved.push(source.input);
362
+ });
363
+ summarizeMapping("matrix rooms", mapping, unresolved, params.runtime);
364
+ 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.");
365
+ const roomUsers = /* @__PURE__ */ new Set();
366
+ for (const roomConfig of Object.values(nextRooms)) addAllowlistUserEntriesFromConfigEntry(roomUsers, roomConfig);
367
+ if (roomUsers.size === 0) return nextRooms;
368
+ const resolution = await resolveMatrixMonitorUserEntries({
369
+ cfg: params.cfg,
370
+ accountId: params.accountId,
371
+ entries: Array.from(roomUsers),
372
+ runtime: params.runtime,
373
+ resolveTargets: params.resolveTargets,
374
+ allowNameMatching
375
+ });
376
+ logMatrixAllowlistResolution({
377
+ label: "matrix room users",
378
+ resolution,
379
+ allowNameMatching,
380
+ runtime: params.runtime
381
+ });
382
+ return patchAllowlistUsersInConfigEntries({
383
+ entries: nextRooms,
384
+ resolvedMap: resolution.resolvedMap,
385
+ strategy: "canonicalize",
386
+ entryKey: normalizeMatrixUserId
387
+ });
388
+ }
389
+ async function resolveMatrixMonitorConfig(params) {
390
+ const resolveTargets = params.resolveTargets ?? resolveMatrixTargets;
391
+ const [allowFrom, groupAllowFrom, roomsConfig] = await Promise.all([
392
+ resolveMatrixMonitorUserAllowlist({
393
+ cfg: params.cfg,
394
+ accountId: params.accountId,
395
+ label: "matrix dm allowlist",
396
+ list: params.allowFrom,
397
+ runtime: params.runtime,
398
+ resolveTargets
399
+ }),
400
+ resolveMatrixMonitorUserAllowlist({
401
+ cfg: params.cfg,
402
+ accountId: params.accountId,
403
+ label: "matrix group allowlist",
404
+ list: params.groupAllowFrom,
405
+ failClosedOnUnresolved: true,
406
+ runtime: params.runtime,
407
+ resolveTargets
408
+ }),
409
+ resolveMatrixMonitorRoomsConfig({
410
+ cfg: params.cfg,
411
+ accountId: params.accountId,
412
+ roomsConfig: params.roomsConfig,
413
+ runtime: params.runtime,
414
+ resolveTargets
415
+ })
416
+ ]);
417
+ return {
418
+ allowFrom: allowFrom.entries,
419
+ allowFromResolvedEntries: allowFrom.resolvedEntries,
420
+ groupAllowFrom: groupAllowFrom.entries,
421
+ groupAllowFromResolvedEntries: groupAllowFrom.resolvedEntries,
422
+ roomsConfig
423
+ };
424
+ }
425
+ //#endregion
426
+ //#region extensions/matrix/src/matrix/monitor/direct.ts
427
+ const DM_CACHE_TTL_MS = 3e4;
428
+ const RECENT_INVITE_TTL_MS = 3e4;
429
+ const MAX_DM_ROOMS = 1024;
430
+ const MAX_DM_MEMBER_FLAGS = 2048;
431
+ function createDirectRoomTracker(client, opts = {}) {
432
+ const log = opts.log ?? (() => {});
433
+ let lastDmUpdateMs = 0;
434
+ let hasSeededDmCache = false;
435
+ let cachedSelfUserId = null;
436
+ const joinedMembersCache = /* @__PURE__ */ new Map();
437
+ const directMemberFlagCache = /* @__PURE__ */ new Map();
438
+ const recentInviteCandidates = /* @__PURE__ */ new Map();
439
+ const locallyPromotedDirectRooms = /* @__PURE__ */ new Map();
440
+ const ensureSelfUserId = async () => {
441
+ if (cachedSelfUserId) return cachedSelfUserId;
442
+ try {
443
+ cachedSelfUserId = await client.getUserId();
444
+ } catch {
445
+ cachedSelfUserId = null;
446
+ }
447
+ return cachedSelfUserId;
448
+ };
449
+ const refreshDmCache = async () => {
450
+ const now = Date.now();
451
+ if (now - lastDmUpdateMs < DM_CACHE_TTL_MS) return;
452
+ lastDmUpdateMs = now;
453
+ hasSeededDmCache = await client.dms.update() || hasSeededDmCache;
454
+ };
455
+ const resolveJoinedMembers = async (roomId) => {
456
+ const cached = joinedMembersCache.get(roomId);
457
+ const now = Date.now();
458
+ if (cached && now - cached.ts < DM_CACHE_TTL_MS) return cached.members;
459
+ try {
460
+ const normalized = await readJoinedMatrixMembers(client, roomId);
461
+ if (!normalized) throw new Error("membership unavailable");
462
+ setBoundedMap(joinedMembersCache, roomId, {
463
+ members: normalized,
464
+ ts: now
465
+ }, MAX_DM_ROOMS);
466
+ return normalized;
467
+ } catch (err) {
468
+ log(`matrix: dm member lookup failed room=${roomId} (${String(err)})`);
469
+ return null;
470
+ }
471
+ };
472
+ const resolveDirectMemberFlag = async (roomId, userId) => {
473
+ const normalizedUserId = userId?.trim();
474
+ if (!normalizedUserId) return null;
475
+ const cacheKey = `${roomId}\n${normalizedUserId}`;
476
+ const cached = directMemberFlagCache.get(cacheKey);
477
+ const now = Date.now();
478
+ if (cached && now - cached.ts < DM_CACHE_TTL_MS) return cached.isDirect;
479
+ const isDirect = await hasDirectMatrixMemberFlag(client, roomId, normalizedUserId);
480
+ setBoundedMap(directMemberFlagCache, cacheKey, {
481
+ isDirect,
482
+ ts: now
483
+ }, MAX_DM_MEMBER_FLAGS);
484
+ return isDirect;
485
+ };
486
+ const hasRecentInviteCandidate = (roomId, remoteUserId) => {
487
+ const normalizedRemoteUserId = remoteUserId?.trim();
488
+ if (!normalizedRemoteUserId) return false;
489
+ const cached = recentInviteCandidates.get(roomId);
490
+ if (!cached) return false;
491
+ if (Date.now() - cached.ts >= RECENT_INVITE_TTL_MS) {
492
+ recentInviteCandidates.delete(roomId);
493
+ return false;
494
+ }
495
+ return cached.remoteUserId === normalizedRemoteUserId;
496
+ };
497
+ const canPromoteRecentInvite = async (roomId) => {
498
+ try {
499
+ return await opts.canPromoteRecentInvite?.(roomId) ?? true;
500
+ } catch (err) {
501
+ log(`matrix: recent invite promotion veto failed room=${roomId} (${String(err)})`);
502
+ return false;
503
+ }
504
+ };
505
+ const canPromoteUnmappedStrictRoom = async (roomId) => {
506
+ try {
507
+ return await opts.canPromoteUnmappedStrictRoom?.(roomId) ?? false;
508
+ } catch (err) {
509
+ log(`matrix: unmapped strict room promotion veto failed room=${roomId} (${String(err)})`);
510
+ return false;
511
+ }
512
+ };
513
+ const shouldKeepLocallyPromotedDirectRoom = async (roomId) => {
514
+ try {
515
+ return await opts.shouldKeepLocallyPromotedDirectRoom?.(roomId);
516
+ } catch (err) {
517
+ log(`matrix: local promotion keep-check failed room=${roomId} (${String(err)})`);
518
+ return;
519
+ }
520
+ };
521
+ const isExplicitlyConfiguredRoom = async (roomId) => {
522
+ try {
523
+ return await opts.isExplicitlyConfiguredRoom?.(roomId) ?? false;
524
+ } catch (err) {
525
+ log(`matrix: configured room check failed room=${roomId} (${String(err)})`);
526
+ return true;
527
+ }
528
+ };
529
+ const hasLocallyPromotedDirectRoom = (roomId, remoteUserId) => {
530
+ const normalizedRemoteUserId = remoteUserId?.trim();
531
+ if (!normalizedRemoteUserId) return false;
532
+ return locallyPromotedDirectRooms.get(roomId)?.remoteUserId === normalizedRemoteUserId;
533
+ };
534
+ const rememberLocallyPromotedDirectRoom = (roomId, remoteUserId) => {
535
+ const normalizedRemoteUserId = remoteUserId.trim();
536
+ if (!normalizedRemoteUserId) return;
537
+ setBoundedMap(locallyPromotedDirectRooms, roomId, { remoteUserId: normalizedRemoteUserId }, MAX_DM_ROOMS);
538
+ };
539
+ return {
540
+ invalidateRoom: (roomId) => {
541
+ joinedMembersCache.delete(roomId);
542
+ for (const key of directMemberFlagCache.keys()) if (key.startsWith(`${roomId}\n`)) directMemberFlagCache.delete(key);
543
+ lastDmUpdateMs = 0;
544
+ log(`matrix: invalidated dm cache room=${roomId}`);
545
+ },
546
+ rememberInvite: (roomId, remoteUserId) => {
547
+ const normalizedRemoteUserId = remoteUserId.trim();
548
+ if (!normalizedRemoteUserId) return;
549
+ setBoundedMap(recentInviteCandidates, roomId, {
550
+ remoteUserId: normalizedRemoteUserId,
551
+ ts: Date.now()
552
+ }, MAX_DM_ROOMS);
553
+ log(`matrix: remembered invite candidate room=${roomId} sender=${normalizedRemoteUserId}`);
554
+ },
555
+ isDirectMessage: async (params) => {
556
+ const { roomId, senderId } = params;
557
+ if (await isExplicitlyConfiguredRoom(roomId)) {
558
+ log(`matrix: dm rejected via explicit room config room=${roomId}`);
559
+ return false;
560
+ }
561
+ const selfUserId = params.selfUserId ?? await ensureSelfUserId();
562
+ const joinedMembers = params.joinedMembers ?? await resolveJoinedMembers(roomId);
563
+ const strictDirectMembership = isStrictDirectMembership({
564
+ selfUserId,
565
+ remoteUserId: senderId,
566
+ joinedMembers
567
+ });
568
+ try {
569
+ await refreshDmCache();
570
+ } catch (err) {
571
+ log(`matrix: dm cache refresh failed (${String(err)})`);
572
+ }
573
+ if (client.dms.isDm(roomId)) {
574
+ if (strictDirectMembership) {
575
+ log(`matrix: dm detected via m.direct room=${roomId}`);
576
+ return true;
577
+ }
578
+ log(`matrix: ignoring stale m.direct classification room=${roomId}`);
579
+ }
580
+ if (strictDirectMembership) {
581
+ const directViaSelf = await resolveDirectMemberFlag(roomId, selfUserId);
582
+ if (directViaSelf === true) {
583
+ log(`matrix: dm detected via member state room=${roomId}`);
584
+ return true;
585
+ }
586
+ if (directViaSelf === false) {
587
+ log(`matrix: dm rejected via member state room=${roomId}`);
588
+ return false;
589
+ }
590
+ if (!hasSeededDmCache) {
591
+ log(`matrix: dm detected via exact 2-member fallback before dm cache seed room=${roomId}`);
592
+ return true;
593
+ }
594
+ if (hasLocallyPromotedDirectRoom(roomId, senderId)) {
595
+ if (await shouldKeepLocallyPromotedDirectRoom(roomId) !== false) {
596
+ log(`matrix: dm detected via local promotion room=${roomId}`);
597
+ return true;
598
+ }
599
+ locallyPromotedDirectRooms.delete(roomId);
600
+ log(`matrix: local promotion cleared room=${roomId}`);
601
+ }
602
+ const promoteDirectRoom = async (source) => {
603
+ const promotion = await promoteMatrixDirectRoomCandidate({
604
+ client,
605
+ remoteUserId: senderId ?? "",
606
+ roomId,
607
+ selfUserId
608
+ });
609
+ if (promotion.classifyAsDirect) {
610
+ rememberLocallyPromotedDirectRoom(roomId, senderId ?? "");
611
+ log(`matrix: dm detected via ${source} room=${roomId} reason=${promotion.reason} repaired=${String(promotion.repaired)}`);
612
+ }
613
+ return promotion.classifyAsDirect;
614
+ };
615
+ if (hasRecentInviteCandidate(roomId, senderId) && await canPromoteRecentInvite(roomId) && await promoteDirectRoom("recent invite")) return true;
616
+ if (await canPromoteUnmappedStrictRoom(roomId) && await promoteDirectRoom("per-room strict fallback")) return true;
617
+ }
618
+ log(`matrix: dm check room=${roomId} result=group members=${joinedMembers?.length ?? "unknown"}`);
619
+ return false;
620
+ }
621
+ };
622
+ }
623
+ //#endregion
624
+ //#region extensions/matrix/src/matrix/monitor/types.ts
625
+ const EventType = {
626
+ RoomMessage: "m.room.message",
627
+ RoomMessageEncrypted: "m.room.encrypted",
628
+ RoomMember: "m.room.member",
629
+ Location: "m.location",
630
+ Reaction: MATRIX_REACTION_EVENT_TYPE
631
+ };
632
+ //#endregion
633
+ //#region extensions/matrix/src/matrix/monitor/access-state.ts
634
+ function normalizeMatrixEntry(raw) {
635
+ return normalizeMatrixAllowList([raw ?? ""])[0] ?? null;
636
+ }
637
+ const matrixIngressIdentity = defineStableChannelIngressIdentity({
638
+ key: "sender-id",
639
+ normalize: normalizeMatrixEntry,
640
+ matchEntry({ subject, entry }) {
641
+ const senderId = subject.identifiers[0]?.value;
642
+ return entry.value === "*" || resolveMatrixAllowListMatch({
643
+ allowList: [entry.value],
644
+ userId: senderId ?? ""
645
+ }).allowed;
646
+ }
647
+ });
648
+ function resolveMatrixGroupIngress(params) {
649
+ if (params.groupPolicy === "disabled") return {
650
+ groupPolicy: "disabled",
651
+ groupAllowFrom: []
652
+ };
653
+ if (params.effectiveRoomUsers.length > 0) return {
654
+ groupPolicy: "allowlist",
655
+ groupAllowFrom: params.effectiveRoomUsers
656
+ };
657
+ if (params.groupPolicy === "allowlist" && params.effectiveGroupAllowFrom.length > 0) return {
658
+ groupPolicy: "allowlist",
659
+ groupAllowFrom: params.effectiveGroupAllowFrom
660
+ };
661
+ return {
662
+ groupPolicy: "open",
663
+ groupAllowFrom: []
664
+ };
665
+ }
666
+ async function resolveMatrixMonitorAccessState(params) {
667
+ const dmPolicy = params.dmPolicy ?? "pairing";
668
+ const groupPolicy = params.groupPolicy ?? "open";
669
+ const effectiveGroupAllowFrom = normalizeMatrixAllowList(params.groupAllowFrom);
670
+ const effectiveRoomUsers = normalizeMatrixAllowList(params.roomUsers);
671
+ const groupIngress = resolveMatrixGroupIngress({
672
+ groupPolicy,
673
+ effectiveGroupAllowFrom,
674
+ effectiveRoomUsers
675
+ });
676
+ const accountId = params.accountId ?? "default";
677
+ const eventKind = params.eventKind ?? "message";
678
+ const ingress = getMatrixRuntime().channel.inbound.ingress.createResolver({
679
+ channelId: "matrix",
680
+ accountId,
681
+ identity: matrixIngressIdentity,
682
+ readStoreAllowFrom: async () => params.storeAllowFrom
683
+ });
684
+ const resolveMessageIngress = async (contextBinding, conversation) => await ingress.message({
685
+ subject: { stableId: params.senderId },
686
+ conversation: conversation ?? {
687
+ kind: params.isRoom ? "channel" : "direct",
688
+ id: params.conversationId ?? (params.isRoom ? "matrix-room" : "matrix-dm")
689
+ },
690
+ ...contextBinding ? { contextBinding } : {},
691
+ event: {
692
+ kind: eventKind,
693
+ authMode: "inbound",
694
+ mayPair: params.isRoom ? false : eventKind === "message"
695
+ },
696
+ dmPolicy,
697
+ groupPolicy: params.isRoom ? groupIngress.groupPolicy : "disabled",
698
+ policy: { groupAllowFromFallbackToAllowFrom: false },
699
+ allowFrom: params.allowFrom,
700
+ ...params.isRoom ? { groupAllowFrom: groupIngress.groupAllowFrom } : {}
701
+ });
702
+ return {
703
+ effectiveGroupAllowFrom,
704
+ effectiveRoomUsers,
705
+ messageIngress: await resolveMessageIngress(),
706
+ accountId,
707
+ senderId: params.senderId,
708
+ isRoom: params.isRoom,
709
+ resolveMessageIngress
710
+ };
711
+ }
712
+ async function resolveMatrixMonitorCommandAccess(state, params) {
713
+ const commandAllowFrom = state.isRoom ? [] : state.messageIngress.senderAccess.effectiveAllowFrom;
714
+ const commandGroupAllowFrom = state.effectiveRoomUsers.length > 0 ? state.effectiveRoomUsers : state.effectiveGroupAllowFrom;
715
+ return (await getMatrixRuntime().channel.inbound.ingress.createResolver({
716
+ channelId: "matrix",
717
+ accountId: state.accountId,
718
+ identity: matrixIngressIdentity
719
+ }).command({
720
+ subject: { stableId: state.senderId },
721
+ conversation: {
722
+ kind: state.isRoom ? "group" : "direct",
723
+ id: state.isRoom ? "matrix-room" : "matrix-dm"
724
+ },
725
+ dmPolicy: "allowlist",
726
+ groupPolicy: "allowlist",
727
+ policy: { groupAllowFromFallbackToAllowFrom: false },
728
+ allowFrom: commandAllowFrom,
729
+ groupAllowFrom: commandGroupAllowFrom,
730
+ command: {
731
+ useAccessGroups: params.useAccessGroups,
732
+ allowTextCommands: params.allowTextCommands,
733
+ hasControlCommand: params.hasControlCommand,
734
+ groupOwnerAllowFrom: "none",
735
+ commandGroupAllowFromFallbackToAllowFrom: false
736
+ }
737
+ })).commandAccess;
738
+ }
739
+ //#endregion
740
+ //#region extensions/matrix/src/matrix/monitor/verification-utils.ts
741
+ const VERIFICATION_EVENT_PREFIX = "m.key.verification.";
742
+ const VERIFICATION_REQUEST_MSGTYPE = "m.key.verification.request";
743
+ const VERIFICATION_NOTICE_PREFIXES = [
744
+ "Matrix verification request received from ",
745
+ "Matrix verification is ready with ",
746
+ "Matrix verification started with ",
747
+ "Matrix verification completed with ",
748
+ "Matrix verification cancelled by ",
749
+ "Matrix verification SAS with "
750
+ ];
751
+ function trimMaybeString(input) {
752
+ return normalizeOptionalString(input) ?? "";
753
+ }
754
+ function isMatrixVerificationEventType(type) {
755
+ return trimMaybeString(type).startsWith(VERIFICATION_EVENT_PREFIX);
756
+ }
757
+ function isMatrixVerificationRequestMsgType(msgtype) {
758
+ return trimMaybeString(msgtype) === VERIFICATION_REQUEST_MSGTYPE;
759
+ }
760
+ function isMatrixVerificationNoticeBody(body) {
761
+ const text = trimMaybeString(body);
762
+ return VERIFICATION_NOTICE_PREFIXES.some((prefix) => text.startsWith(prefix));
763
+ }
764
+ function isMatrixVerificationRoomMessage(content) {
765
+ return isMatrixVerificationRequestMsgType(content.msgtype) || trimMaybeString(content.msgtype) === "m.notice" && isMatrixVerificationNoticeBody(content.body);
766
+ }
767
+ const matrixVerificationConstants = {
768
+ eventPrefix: VERIFICATION_EVENT_PREFIX,
769
+ requestMsgtype: VERIFICATION_REQUEST_MSGTYPE
770
+ };
771
+ //#endregion
772
+ //#region extensions/matrix/src/matrix/monitor/verification-events.ts
773
+ const MAX_TRACKED_VERIFICATION_EVENTS = 1024;
774
+ const SAS_NOTICE_RETRY_DELAY_MS = 750;
775
+ const VERIFICATION_EVENT_STARTUP_GRACE_MS = 3e4;
776
+ const loadMatrixDirectRoomDeps = createLazyRuntimeModule(() => Promise.all([import("./direct-management-Cn2t8n1V.mjs").then((n) => n.t), import("./direct-management-Cn2t8n1V.mjs").then((n) => n.o)]).then(([directManagementModule, directRoomModule]) => ({
777
+ inspectMatrixDirectRooms: directManagementModule.inspectMatrixDirectRooms,
778
+ isStrictDirectRoom: directRoomModule.isStrictDirectRoom
779
+ })));
780
+ function readVerificationSignal(event) {
781
+ const type = normalizeNullableString(event?.type) ?? "";
782
+ const content = event?.content ?? {};
783
+ const msgtype = normalizeNullableString(content.msgtype) ?? "";
784
+ const relatedEventId = normalizeNullableString(content["m.relates_to"]?.event_id);
785
+ const transactionId = normalizeNullableString(content.transaction_id);
786
+ if (type === EventType.RoomMessage && isMatrixVerificationRequestMsgType(msgtype)) return {
787
+ stage: "request",
788
+ flowId: normalizeNullableString(event.event_id) ?? transactionId ?? relatedEventId
789
+ };
790
+ if (!isMatrixVerificationEventType(type)) return null;
791
+ const flowId = transactionId ?? relatedEventId ?? normalizeNullableString(event.event_id);
792
+ if (type === `${matrixVerificationConstants.eventPrefix}request`) return {
793
+ stage: "request",
794
+ flowId
795
+ };
796
+ if (type === `${matrixVerificationConstants.eventPrefix}ready`) return {
797
+ stage: "ready",
798
+ flowId
799
+ };
800
+ if (type === "m.key.verification.start") return {
801
+ stage: "start",
802
+ flowId
803
+ };
804
+ if (type === "m.key.verification.cancel") return {
805
+ stage: "cancel",
806
+ flowId
807
+ };
808
+ if (type === "m.key.verification.done") return {
809
+ stage: "done",
810
+ flowId
811
+ };
812
+ return {
813
+ stage: "other",
814
+ flowId
815
+ };
816
+ }
817
+ function formatVerificationStageNotice(params) {
818
+ const { stage, senderId, event } = params;
819
+ const content = event.content;
820
+ switch (stage) {
821
+ case "request": return `Matrix verification request received from ${senderId}. Open "Verify by emoji" in your Matrix client to continue.`;
822
+ case "ready": return `Matrix verification is ready with ${senderId}. Choose "Verify by emoji" to reveal the emoji sequence.`;
823
+ case "start": return `Matrix verification started with ${senderId}.`;
824
+ case "done": return `Matrix verification completed with ${senderId}.`;
825
+ case "cancel": {
826
+ const code = normalizeNullableString(content.code);
827
+ const reason = normalizeNullableString(content.reason);
828
+ if (code && reason) return `Matrix verification cancelled by ${senderId} (${code}: ${reason}).`;
829
+ if (reason) return `Matrix verification cancelled by ${senderId} (${reason}).`;
830
+ return `Matrix verification cancelled by ${senderId}.`;
831
+ }
832
+ default: return null;
833
+ }
834
+ }
835
+ function formatVerificationSasNotice(summary) {
836
+ const sas = summary.sas;
837
+ if (!sas) return null;
838
+ const emojiLine = Array.isArray(sas.emoji) && sas.emoji.length > 0 ? `SAS emoji: ${sas.emoji.map(([emoji, name]) => `${normalizeNullableString(emoji) ?? "?"} ${normalizeNullableString(name) ?? "?"}`).join(" | ")}` : null;
839
+ const decimalLine = Array.isArray(sas.decimal) && sas.decimal.length === 3 ? `SAS decimal: ${sas.decimal.join(" ")}` : null;
840
+ if (!emojiLine && !decimalLine) return null;
841
+ const lines = [`Matrix verification SAS with ${summary.otherUserId}:`];
842
+ if (emojiLine) lines.push(emojiLine);
843
+ if (decimalLine) lines.push(decimalLine);
844
+ lines.push("If both sides match, choose 'They match' in your Matrix app.");
845
+ return lines.join("\n");
846
+ }
847
+ function resolveVerificationFlowCandidates(params) {
848
+ const { event, flowId } = params;
849
+ const content = event.content;
850
+ return normalizeUniqueTrimmedStringList([
851
+ flowId,
852
+ event.event_id,
853
+ content.transaction_id,
854
+ content["m.relates_to"]?.event_id
855
+ ]);
856
+ }
857
+ function resolveSummaryRecency(summary) {
858
+ const ts = Date.parse(summary.updatedAt ?? "");
859
+ return Number.isFinite(ts) ? ts : 0;
860
+ }
861
+ function isActiveVerificationSummary(summary) {
862
+ if (summary.completed) return false;
863
+ if (summary.phaseName === "cancelled" || summary.phaseName === "done") return false;
864
+ if (typeof summary.phase === "number" && summary.phase >= 4) return false;
865
+ return true;
866
+ }
867
+ async function resolveVerificationSummaryForSignal(client, params) {
868
+ if (!client.crypto) return null;
869
+ await client.crypto.ensureVerificationDmTracked({
870
+ roomId: params.roomId,
871
+ userId: params.senderId
872
+ }).catch(() => null);
873
+ const list = await client.crypto.listVerifications();
874
+ if (list.length === 0) return null;
875
+ const candidates = resolveVerificationFlowCandidates({
876
+ event: params.event,
877
+ flowId: params.flowId
878
+ });
879
+ const byTransactionId = list.find((entry) => candidates.some((candidate) => entry.transactionId === candidate));
880
+ if (byTransactionId) return byTransactionId;
881
+ const { inspectMatrixDirectRooms, isStrictDirectRoom } = await loadMatrixDirectRoomDeps();
882
+ const inspection = await inspectMatrixDirectRooms({
883
+ client,
884
+ remoteUserId: params.senderId
885
+ }).catch(() => null);
886
+ const activeRoomId = normalizeNullableString(inspection?.activeRoomId);
887
+ if (activeRoomId) {
888
+ if (activeRoomId !== params.roomId) return null;
889
+ } else if (!await isStrictDirectRoom({
890
+ client,
891
+ roomId: params.roomId,
892
+ remoteUserId: params.senderId
893
+ })) return null;
894
+ const activeByUser = list.filter((entry) => entry.otherUserId === params.senderId && isActiveVerificationSummary(entry)).toSorted((a, b) => resolveSummaryRecency(b) - resolveSummaryRecency(a));
895
+ const activeInRoom = activeByUser.filter((entry) => {
896
+ return normalizeNullableString(entry.roomId) === params.roomId;
897
+ });
898
+ if (activeInRoom.length > 0) return activeInRoom[0] ?? null;
899
+ return activeByUser[0] ?? null;
900
+ }
901
+ async function resolveVerificationSasNoticeForSignal(client, params) {
902
+ const summary = await resolveVerificationSummaryForSignal(client, params);
903
+ const immediateNotice = summary && isActiveVerificationSummary(summary) ? formatVerificationSasNotice(summary) : null;
904
+ if (immediateNotice || params.stage !== "ready" && params.stage !== "start") return {
905
+ summary,
906
+ sasNotice: immediateNotice
907
+ };
908
+ await new Promise((resolve) => {
909
+ setTimeout(resolve, params.sasNoticeRetryDelayMs ?? SAS_NOTICE_RETRY_DELAY_MS);
910
+ });
911
+ const retriedSummary = await resolveVerificationSummaryForSignal(client, params);
912
+ return {
913
+ summary: retriedSummary,
914
+ sasNotice: retriedSummary && isActiveVerificationSummary(retriedSummary) ? formatVerificationSasNotice(retriedSummary) : null
915
+ };
916
+ }
917
+ function trackBounded(set, value) {
918
+ if (!value || set.has(value)) return false;
919
+ set.add(value);
920
+ if (set.size > MAX_TRACKED_VERIFICATION_EVENTS) {
921
+ const oldest = set.values().next().value;
922
+ if (typeof oldest === "string") set.delete(oldest);
923
+ }
924
+ return true;
925
+ }
926
+ async function sendVerificationNotice(params) {
927
+ const roomId = normalizeNullableString(params.roomId);
928
+ if (!roomId) return;
929
+ try {
930
+ await params.client.sendMessage(roomId, {
931
+ msgtype: "m.notice",
932
+ body: params.body
933
+ });
934
+ } catch (err) {
935
+ params.logVerboseMessage(`matrix: failed sending verification notice room=${roomId}: ${String(err)}`);
936
+ }
937
+ }
938
+ async function isVerificationNoticeAuthorized(params) {
939
+ if (!params.dmEnabled || params.dmPolicy === "disabled") {
940
+ params.logVerboseMessage(`matrix: blocked verification sender ${params.senderId} (dmPolicy=${params.dmPolicy}, dmEnabled=${String(params.dmEnabled)})`);
941
+ return false;
942
+ }
943
+ const storeAllowFrom = params.dmPolicy !== "allowlist" && params.dmPolicy !== "open" ? await params.readStoreAllowFrom() : [];
944
+ if ((await resolveMatrixMonitorAccessState({
945
+ allowFrom: params.allowFrom,
946
+ storeAllowFrom,
947
+ dmPolicy: params.dmPolicy,
948
+ groupPolicy: "open",
949
+ groupAllowFrom: [],
950
+ roomUsers: [],
951
+ senderId: params.senderId,
952
+ isRoom: false
953
+ })).messageIngress.senderAccess.decision === "allow") return true;
954
+ params.logVerboseMessage(`matrix: blocked verification sender ${params.senderId} (dmPolicy=${params.dmPolicy})`);
955
+ return false;
956
+ }
957
+ function createMatrixVerificationEventRouter(params) {
958
+ const routerStartedAtMs = Date.now();
959
+ const routedVerificationEvents = /* @__PURE__ */ new Set();
960
+ const routedVerificationSasFingerprints = /* @__PURE__ */ new Set();
961
+ const routedVerificationStageNotices = /* @__PURE__ */ new Set();
962
+ const verificationFlowRooms = /* @__PURE__ */ new Map();
963
+ const verificationUserRooms = /* @__PURE__ */ new Map();
964
+ async function resolveActiveDirectRoomId(remoteUserId) {
965
+ const { inspectMatrixDirectRooms } = await loadMatrixDirectRoomDeps();
966
+ const inspection = await inspectMatrixDirectRooms({
967
+ client: params.client,
968
+ remoteUserId
969
+ }).catch(() => null);
970
+ return normalizeNullableString(inspection?.activeRoomId);
971
+ }
972
+ function shouldEmitVerificationEventNotice(event) {
973
+ const eventTs = typeof event.origin_server_ts === "number" && Number.isFinite(event.origin_server_ts) ? event.origin_server_ts : null;
974
+ if (eventTs === null) return true;
975
+ return eventTs >= routerStartedAtMs - VERIFICATION_EVENT_STARTUP_GRACE_MS;
976
+ }
977
+ function rememberVerificationRoom(roomId, event, flowId) {
978
+ for (const candidate of resolveVerificationFlowCandidates({
979
+ event,
980
+ flowId
981
+ })) setBoundedMap(verificationFlowRooms, candidate, roomId, MAX_TRACKED_VERIFICATION_EVENTS);
982
+ }
983
+ function rememberVerificationUserRoom(remoteUserId, roomId) {
984
+ const normalizedUserId = normalizeNullableString(remoteUserId);
985
+ const normalizedRoomId = normalizeNullableString(roomId);
986
+ if (!normalizedUserId || !normalizedRoomId) return;
987
+ verificationUserRooms.delete(normalizedUserId);
988
+ setBoundedMap(verificationUserRooms, normalizedUserId, normalizedRoomId, MAX_TRACKED_VERIFICATION_EVENTS);
989
+ }
990
+ async function resolveSummaryRoomId(summary) {
991
+ const mappedRoomId = normalizeNullableString(summary.roomId) ?? normalizeNullableString(summary.transactionId ? verificationFlowRooms.get(summary.transactionId) : null) ?? normalizeNullableString(verificationFlowRooms.get(summary.id));
992
+ if (mappedRoomId) return mappedRoomId;
993
+ const remoteUserId = normalizeNullableString(summary.otherUserId);
994
+ if (!remoteUserId) return null;
995
+ const recentRoomId = normalizeNullableString(verificationUserRooms.get(remoteUserId));
996
+ const activeRoomId = await resolveActiveDirectRoomId(remoteUserId);
997
+ if (recentRoomId && activeRoomId && recentRoomId === activeRoomId) return recentRoomId;
998
+ if (activeRoomId) return activeRoomId;
999
+ if (recentRoomId && await (await loadMatrixDirectRoomDeps()).isStrictDirectRoom({
1000
+ client: params.client,
1001
+ roomId: recentRoomId,
1002
+ remoteUserId
1003
+ })) return recentRoomId;
1004
+ return null;
1005
+ }
1006
+ async function routeVerificationSummary(summary) {
1007
+ const roomId = await resolveSummaryRoomId(summary);
1008
+ if (!roomId || !isActiveVerificationSummary(summary)) return;
1009
+ if (!await (await loadMatrixDirectRoomDeps()).isStrictDirectRoom({
1010
+ client: params.client,
1011
+ roomId,
1012
+ remoteUserId: summary.otherUserId
1013
+ })) {
1014
+ params.logVerboseMessage(`matrix: ignoring verification summary outside strict DM room=${roomId} sender=${summary.otherUserId}`);
1015
+ return;
1016
+ }
1017
+ if (!await isVerificationNoticeAuthorized({
1018
+ senderId: summary.otherUserId,
1019
+ allowFrom: params.allowFrom,
1020
+ dmEnabled: params.dmEnabled,
1021
+ dmPolicy: params.dmPolicy,
1022
+ readStoreAllowFrom: params.readStoreAllowFrom,
1023
+ logVerboseMessage: params.logVerboseMessage
1024
+ })) return;
1025
+ const sasNotice = formatVerificationSasNotice(summary);
1026
+ if (!sasNotice) return;
1027
+ const sasFingerprint = `${summary.id}:${JSON.stringify(summary.sas)}`;
1028
+ if (!trackBounded(routedVerificationSasFingerprints, sasFingerprint)) return;
1029
+ await sendVerificationNotice({
1030
+ client: params.client,
1031
+ roomId,
1032
+ body: sasNotice,
1033
+ logVerboseMessage: params.logVerboseMessage
1034
+ });
1035
+ }
1036
+ function routeVerificationEvent(roomId, event) {
1037
+ const senderId = normalizeNullableString(event?.sender);
1038
+ if (!senderId) return false;
1039
+ const signal = readVerificationSignal(event);
1040
+ if (!signal) return false;
1041
+ rememberVerificationRoom(roomId, event, signal.flowId);
1042
+ const routeTask = async () => {
1043
+ if (!shouldEmitVerificationEventNotice(event)) {
1044
+ params.logVerboseMessage(`matrix: ignoring historical verification event room=${roomId} id=${event.event_id ?? "unknown"} type=${event.type ?? "unknown"}`);
1045
+ return;
1046
+ }
1047
+ const flowId = signal.flowId;
1048
+ const sourceFingerprint = normalizeNullableString(event?.event_id) ?? `${senderId}:${event.type}:${flowId ?? "none"}`;
1049
+ if (!await (await loadMatrixDirectRoomDeps()).isStrictDirectRoom({
1050
+ client: params.client,
1051
+ roomId,
1052
+ remoteUserId: senderId
1053
+ })) {
1054
+ params.logVerboseMessage(`matrix: ignoring verification event outside strict DM room=${roomId} sender=${senderId}`);
1055
+ return;
1056
+ }
1057
+ if (!await isVerificationNoticeAuthorized({
1058
+ senderId,
1059
+ allowFrom: params.allowFrom,
1060
+ dmEnabled: params.dmEnabled,
1061
+ dmPolicy: params.dmPolicy,
1062
+ readStoreAllowFrom: params.readStoreAllowFrom,
1063
+ logVerboseMessage: params.logVerboseMessage
1064
+ })) return;
1065
+ rememberVerificationUserRoom(senderId, roomId);
1066
+ if (!trackBounded(routedVerificationEvents, sourceFingerprint)) return;
1067
+ const stageNotice = formatVerificationStageNotice({
1068
+ stage: signal.stage,
1069
+ senderId,
1070
+ event
1071
+ });
1072
+ const { summary, sasNotice } = await resolveVerificationSasNoticeForSignal(params.client, {
1073
+ roomId,
1074
+ event,
1075
+ senderId,
1076
+ flowId,
1077
+ stage: signal.stage,
1078
+ sasNoticeRetryDelayMs: params.sasNoticeRetryDelayMs
1079
+ }).catch(() => ({
1080
+ summary: null,
1081
+ sasNotice: null
1082
+ }));
1083
+ const notices = [];
1084
+ if (stageNotice) {
1085
+ const stageKey = `${roomId}:${senderId}:${flowId ?? sourceFingerprint}:${signal.stage}`;
1086
+ if (trackBounded(routedVerificationStageNotices, stageKey)) notices.push(stageNotice);
1087
+ }
1088
+ if (summary && sasNotice) {
1089
+ const sasFingerprint = `${summary.id}:${JSON.stringify(summary.sas)}`;
1090
+ if (trackBounded(routedVerificationSasFingerprints, sasFingerprint)) notices.push(sasNotice);
1091
+ }
1092
+ if (notices.length === 0) return;
1093
+ for (const body of notices) await sendVerificationNotice({
1094
+ client: params.client,
1095
+ roomId,
1096
+ body,
1097
+ logVerboseMessage: params.logVerboseMessage
1098
+ });
1099
+ };
1100
+ if (params.runDetachedTask) params.runDetachedTask(`verification event handler room=${roomId} id=${event.event_id ?? "unknown"}`, routeTask);
1101
+ else routeTask().catch((err) => {
1102
+ params.logVerboseMessage(`matrix: failed routing verification event: ${String(err)}`);
1103
+ });
1104
+ return true;
1105
+ }
1106
+ return {
1107
+ routeVerificationEvent,
1108
+ routeVerificationSummary
1109
+ };
1110
+ }
1111
+ //#endregion
1112
+ //#region extensions/matrix/src/matrix/monitor/events.ts
1113
+ const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_WINDOW_MS = 12e4;
1114
+ const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_THRESHOLD = 3;
1115
+ const MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_SAMPLE_LIMIT = 3;
1116
+ function formatMatrixPostHealthySyncDecryptionHint(accountId) {
1117
+ 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}'.`;
1118
+ }
1119
+ function isFreshPostHealthySyncDecryptFailure(params) {
1120
+ const { event, healthySyncSinceMs, graceMs = 0, nowMs } = params;
1121
+ if (typeof healthySyncSinceMs !== "number" || !Number.isFinite(healthySyncSinceMs)) return false;
1122
+ const eventTs = event.origin_server_ts;
1123
+ if (!Number.isFinite(eventTs) || eventTs <= 0) return false;
1124
+ if (eventTs < healthySyncSinceMs + graceMs) return false;
1125
+ if (eventTs > nowMs + 6e4) return false;
1126
+ return true;
1127
+ }
1128
+ function createMatrixPostHealthySyncDecryptFailureTracker(params) {
1129
+ let observations = [];
1130
+ let warningEmitted = false;
1131
+ let trackedHealthySyncSinceMs;
1132
+ const resetObservations = () => {
1133
+ observations = [];
1134
+ warningEmitted = false;
1135
+ };
1136
+ const pruneObservations = (nowMs) => {
1137
+ observations = observations.filter((entry) => nowMs - entry.eventTs <= MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_WINDOW_MS);
1138
+ if (observations.length === 0) warningEmitted = false;
1139
+ };
1140
+ return { recordFailure(roomId, event, error) {
1141
+ const nowMs = Date.now();
1142
+ const healthySyncSinceMs = params.getHealthySyncSinceMs?.();
1143
+ if (healthySyncSinceMs !== trackedHealthySyncSinceMs) {
1144
+ trackedHealthySyncSinceMs = healthySyncSinceMs;
1145
+ resetObservations();
1146
+ }
1147
+ if (!isFreshPostHealthySyncDecryptFailure({
1148
+ event,
1149
+ healthySyncSinceMs,
1150
+ graceMs: params.startupGraceMs,
1151
+ nowMs
1152
+ })) return {
1153
+ freshAfterHealthySync: false,
1154
+ failureCount: 0
1155
+ };
1156
+ pruneObservations(nowMs);
1157
+ const key = `${roomId}|${event.event_id}`;
1158
+ if (!observations.some((entry) => entry.key === key)) observations.push({
1159
+ key,
1160
+ roomId,
1161
+ eventId: event.event_id,
1162
+ sender: typeof event.sender === "string" ? event.sender : null,
1163
+ eventTs: event.origin_server_ts,
1164
+ error: error.message
1165
+ });
1166
+ const failureCount = observations.length;
1167
+ if (warningEmitted || failureCount < MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_THRESHOLD) return {
1168
+ freshAfterHealthySync: true,
1169
+ failureCount
1170
+ };
1171
+ warningEmitted = true;
1172
+ const rooms = uniqueStrings(observations.map((entry) => entry.roomId)).slice(0, MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_SAMPLE_LIMIT);
1173
+ const senders = uniqueStrings(observations.map((entry) => entry.sender).filter((sender) => Boolean(sender))).slice(0, MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_SAMPLE_LIMIT);
1174
+ const eventIds = observations.slice(-3).map((entry) => entry.eventId);
1175
+ const latestError = observations.at(-1)?.error ?? error.message;
1176
+ return {
1177
+ freshAfterHealthySync: true,
1178
+ failureCount,
1179
+ warning: {
1180
+ rooms,
1181
+ roomCount: new Set(observations.map((entry) => entry.roomId)).size,
1182
+ senders,
1183
+ senderCount: new Set(observations.map((entry) => entry.sender).filter(Boolean)).size,
1184
+ eventIds,
1185
+ latestError,
1186
+ windowMs: MATRIX_POST_HEALTHY_SYNC_DECRYPT_FAILURE_WINDOW_MS
1187
+ }
1188
+ };
1189
+ } };
1190
+ }
1191
+ function formatMatrixSelfDecryptionHint(accountId) {
1192
+ 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}'.`;
1193
+ }
1194
+ async function resolveMatrixSelfUserId(client, logVerboseMessage) {
1195
+ if (typeof client.getUserId !== "function") return null;
1196
+ try {
1197
+ return await client.getUserId() ?? null;
1198
+ } catch (err) {
1199
+ logVerboseMessage(`matrix: failed resolving self user id for decrypt warning: ${String(err)}`);
1200
+ return null;
1201
+ }
1202
+ }
1203
+ function registerMatrixMonitorEvents(params) {
1204
+ const { cfg, client, auth, allowFrom, dmEnabled, dmPolicy, readStoreAllowFrom, directTracker, invalidateMemberDisplayName, logVerboseMessage, warnedEncryptedRooms, warnedCryptoMissingRooms, logger, startupGraceMs, getHealthySyncSinceMs, formatNativeDependencyHint, onRoomMessage, runDetachedTask, sasNoticeRetryDelayMs } = params;
1205
+ const postHealthySyncDecryptFailureTracker = createMatrixPostHealthySyncDecryptFailureTracker({
1206
+ getHealthySyncSinceMs,
1207
+ startupGraceMs
1208
+ });
1209
+ const { routeVerificationEvent, routeVerificationSummary } = createMatrixVerificationEventRouter({
1210
+ client,
1211
+ allowFrom,
1212
+ dmEnabled,
1213
+ dmPolicy,
1214
+ readStoreAllowFrom,
1215
+ logVerboseMessage,
1216
+ runDetachedTask,
1217
+ sasNoticeRetryDelayMs
1218
+ });
1219
+ const runMonitorTask = (label, task) => {
1220
+ if (runDetachedTask) return runDetachedTask(label, task);
1221
+ return Promise.resolve().then(task).catch((error) => {
1222
+ logVerboseMessage(`matrix: ${label} failed (${String(error)})`);
1223
+ });
1224
+ };
1225
+ const onRoomMessageEvent = (roomId, event) => {
1226
+ if (routeVerificationEvent(roomId, event)) return;
1227
+ runMonitorTask(`room message handler room=${roomId} id=${event.event_id ?? "unknown"}`, async () => {
1228
+ await onRoomMessage(roomId, event);
1229
+ });
1230
+ };
1231
+ const onEncryptedEvent = (roomId, event) => {
1232
+ const eventId = event?.event_id ?? "unknown";
1233
+ const eventType = event?.type ?? "unknown";
1234
+ logVerboseMessage(`matrix: encrypted event room=${roomId} type=${eventType} id=${eventId}`);
1235
+ };
1236
+ const onDecryptedEvent = (roomId, event) => {
1237
+ const eventId = event?.event_id ?? "unknown";
1238
+ const eventType = event?.type ?? "unknown";
1239
+ logVerboseMessage(`matrix: decrypted event room=${roomId} type=${eventType} id=${eventId}`);
1240
+ if (routeVerificationEvent(roomId, event)) return;
1241
+ if (eventType !== EventType.RoomMessage) return;
1242
+ runMonitorTask(`decrypted room message handler room=${roomId} id=${event.event_id ?? "unknown"}`, async () => {
1243
+ await onRoomMessage(roomId, event);
1244
+ });
1245
+ };
1246
+ const onFailedDecryption = (roomId, event, error) => {
1247
+ runMonitorTask(`failed decryption handler room=${roomId} id=${event.event_id ?? "unknown"}`, async () => {
1248
+ const failureState = postHealthySyncDecryptFailureTracker.recordFailure(roomId, event, error);
1249
+ const selfUserId = await resolveMatrixSelfUserId(client, logVerboseMessage);
1250
+ const sender = typeof event.sender === "string" ? event.sender : null;
1251
+ const senderMatchesOwnUser = Boolean(selfUserId && sender && selfUserId === sender);
1252
+ logger.warn(failureState.freshAfterHealthySync ? "Failed to decrypt fresh post-healthy-sync message" : "Failed to decrypt message", {
1253
+ roomId,
1254
+ eventId: event.event_id,
1255
+ sender,
1256
+ senderMatchesOwnUser,
1257
+ error: error.message,
1258
+ freshAfterHealthySync: failureState.freshAfterHealthySync,
1259
+ ...failureState.freshAfterHealthySync ? { postHealthySyncFailureCount: failureState.failureCount } : {}
1260
+ });
1261
+ if (failureState.warning) logger.warn(formatMatrixPostHealthySyncDecryptionHint(auth.accountId), {
1262
+ roomId,
1263
+ eventId: event.event_id,
1264
+ failureCount: failureState.failureCount,
1265
+ roomCount: failureState.warning.roomCount,
1266
+ rooms: failureState.warning.rooms,
1267
+ senderCount: failureState.warning.senderCount,
1268
+ senders: failureState.warning.senders,
1269
+ sampleEventIds: failureState.warning.eventIds,
1270
+ latestError: failureState.warning.latestError,
1271
+ windowMs: failureState.warning.windowMs
1272
+ });
1273
+ if (senderMatchesOwnUser) logger.warn(formatMatrixSelfDecryptionHint(auth.accountId), {
1274
+ roomId,
1275
+ eventId: event.event_id,
1276
+ sender
1277
+ });
1278
+ logVerboseMessage(`matrix: failed decrypt room=${roomId} id=${event.event_id ?? "unknown"} freshAfterHealthySync=${String(failureState.freshAfterHealthySync)} error=${error.message}`);
1279
+ });
1280
+ };
1281
+ const onVerificationSummary = (summary) => {
1282
+ runMonitorTask("verification summary handler", async () => {
1283
+ await routeVerificationSummary(summary);
1284
+ });
1285
+ };
1286
+ const onInvite = (roomId, event) => {
1287
+ directTracker?.invalidateRoom(roomId);
1288
+ const eventId = event?.event_id ?? "unknown";
1289
+ const sender = event?.sender ?? "unknown";
1290
+ const invitee = normalizeOptionalString(event?.state_key) ?? "";
1291
+ const senderIsInvitee = Boolean(invitee) && (normalizeOptionalString(event?.sender) ?? "") === invitee;
1292
+ const isDirect = (event?.content)?.is_direct === true;
1293
+ const rememberedSender = normalizeOptionalString(event?.sender);
1294
+ if (rememberedSender && !senderIsInvitee) directTracker?.rememberInvite?.(roomId, rememberedSender);
1295
+ logVerboseMessage(`matrix: invite room=${roomId} sender=${sender} direct=${String(isDirect)} id=${eventId}`);
1296
+ };
1297
+ const onJoin = (roomId, event) => {
1298
+ directTracker?.invalidateRoom(roomId);
1299
+ const eventId = event?.event_id ?? "unknown";
1300
+ logVerboseMessage(`matrix: join room=${roomId} id=${eventId}`);
1301
+ if (event.membershipProvenance !== "transition" || event.state_key !== auth.userId) return;
1302
+ runMonitorTask(`join introduction room=${roomId}`, async () => {
1303
+ const members = await readJoinedMatrixMembers(client, roomId);
1304
+ const remoteUserId = members?.find((member) => member !== auth.userId);
1305
+ if (!members?.includes(auth.userId) || !remoteUserId || await directTracker.isDirectMessage({
1306
+ roomId,
1307
+ senderId: remoteUserId,
1308
+ selfUserId: auth.userId,
1309
+ joinedMembers: members
1310
+ })) return;
1311
+ const roomInfo = await params.getRoomInfo(roomId, { includeAliases: params.needsRoomAliasesForConfig });
1312
+ const roomConfig = resolveMatrixRoomConfig({
1313
+ rooms: params.roomsConfig,
1314
+ roomId,
1315
+ aliases: [roomInfo.canonicalAlias ?? "", ...roomInfo.altAliases].filter(Boolean)
1316
+ });
1317
+ const roomAllowed = (!params.needsRoomAliasesForConfig || roomInfo.aliasesResolved) && params.groupPolicy !== "disabled" && (roomConfig.config ? roomConfig.allowed : params.groupPolicy === "open");
1318
+ const options = {
1319
+ cfg,
1320
+ accountId: auth.accountId,
1321
+ client
1322
+ };
1323
+ await reportChannelRoomJoin({
1324
+ cfg,
1325
+ channel: "matrix",
1326
+ accountId: auth.accountId,
1327
+ conversationId: roomId,
1328
+ deliverTo: `room:${roomId}`,
1329
+ route: resolveMatrixInboundRoute({
1330
+ cfg,
1331
+ accountId: auth.accountId,
1332
+ roomId,
1333
+ senderId: auth.userId,
1334
+ isDirectMessage: false,
1335
+ resolveAgentRoute
1336
+ }).route,
1337
+ roomAllowed,
1338
+ resolveRoomContext: async ({ messageLimit }) => {
1339
+ const info = await getMatrixRoomInfo(roomId, options);
1340
+ const context = {
1341
+ title: info.name ?? void 0,
1342
+ purpose: info.topic ?? void 0
1343
+ };
1344
+ try {
1345
+ const { messages } = await readMatrixMessages(roomId, {
1346
+ ...options,
1347
+ limit: messageLimit
1348
+ });
1349
+ return {
1350
+ ...context,
1351
+ recentMessages: messages.toReversed().flatMap(({ sender, body }) => body?.trim() ? [{
1352
+ sender,
1353
+ text: body
1354
+ }] : [])
1355
+ };
1356
+ } catch {
1357
+ return context;
1358
+ }
1359
+ }
1360
+ });
1361
+ });
1362
+ };
1363
+ const onRoomEvent = (roomId, event) => {
1364
+ const eventType = event?.type ?? "unknown";
1365
+ if (eventType === EventType.RoomMessageEncrypted) {
1366
+ logVerboseMessage(`matrix: encrypted raw event room=${roomId} id=${event?.event_id ?? "unknown"}`);
1367
+ if (auth.encryption !== true && !warnedEncryptedRooms.has(roomId)) {
1368
+ warnedEncryptedRooms.add(roomId);
1369
+ const warning = formatMatrixEncryptedEventDisabledWarning(cfg, auth.accountId);
1370
+ logger.warn(warning, { roomId });
1371
+ }
1372
+ if (auth.encryption === true && !client.crypto && !warnedCryptoMissingRooms.has(roomId)) {
1373
+ warnedCryptoMissingRooms.add(roomId);
1374
+ const warning = `matrix: encryption enabled but crypto is unavailable; ${formatNativeDependencyHint({
1375
+ packageName: "@matrix-org/matrix-sdk-crypto-nodejs",
1376
+ manager: "pnpm",
1377
+ downloadCommand: "node node_modules/@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js"
1378
+ })}`;
1379
+ logger.warn(warning, { roomId });
1380
+ }
1381
+ return;
1382
+ }
1383
+ if (eventType === EventType.RoomMember) {
1384
+ directTracker?.invalidateRoom(roomId);
1385
+ const membership = (event?.content)?.membership;
1386
+ const stateKey = event.state_key ?? "";
1387
+ if (stateKey) invalidateMemberDisplayName?.(roomId, stateKey);
1388
+ logVerboseMessage(`matrix: member event room=${roomId} stateKey=${stateKey} membership=${membership ?? "unknown"}`);
1389
+ }
1390
+ if (eventType === EventType.Reaction) {
1391
+ runMonitorTask(`reaction handler room=${roomId} id=${event.event_id ?? "unknown"}`, async () => {
1392
+ await onRoomMessage(roomId, event);
1393
+ });
1394
+ return;
1395
+ }
1396
+ routeVerificationEvent(roomId, event);
1397
+ };
1398
+ client.on("room.message", onRoomMessageEvent);
1399
+ client.on("room.encrypted_event", onEncryptedEvent);
1400
+ client.on("room.decrypted_event", onDecryptedEvent);
1401
+ client.on("room.failed_decryption", onFailedDecryption);
1402
+ client.on("verification.summary", onVerificationSummary);
1403
+ client.on("room.invite", onInvite);
1404
+ client.on("room.join", onJoin);
1405
+ client.on("room.event", onRoomEvent);
1406
+ return () => {
1407
+ client.off("room.message", onRoomMessageEvent);
1408
+ client.off("room.encrypted_event", onEncryptedEvent);
1409
+ client.off("room.decrypted_event", onDecryptedEvent);
1410
+ client.off("room.failed_decryption", onFailedDecryption);
1411
+ client.off("verification.summary", onVerificationSummary);
1412
+ client.off("room.invite", onInvite);
1413
+ client.off("room.join", onJoin);
1414
+ client.off("room.event", onRoomEvent);
1415
+ };
1416
+ }
1417
+ //#endregion
1418
+ //#region extensions/matrix/src/matrix/monitor/context-summary.ts
1419
+ const MAX_CONTEXT_BODY_LENGTH = 500;
1420
+ function truncateMatrixContextBody(value) {
1421
+ if (value.length <= MAX_CONTEXT_BODY_LENGTH) return value;
1422
+ return `${sliceUtf16Safe(value, 0, 497)}...`;
1423
+ }
1424
+ function summarizeMatrixMessageContextEvent(event) {
1425
+ if (isPollStartType(event.type)) {
1426
+ const pollSummary = parsePollStartContent(event.content);
1427
+ if (pollSummary) return formatPollAsText(pollSummary);
1428
+ }
1429
+ const content = resolveMatrixReplacementContent(event) ?? event.content;
1430
+ return formatMatrixMessageText({
1431
+ body: readStringValue(content.body),
1432
+ filename: readStringValue(content.filename),
1433
+ msgtype: normalizeOptionalString(content.msgtype)
1434
+ });
1435
+ }
1436
+ //#endregion
1437
+ //#region extensions/matrix/src/matrix/monitor/event-context.ts
1438
+ function createMatrixEventContextResolver(params) {
1439
+ const cache = /* @__PURE__ */ new Map();
1440
+ const isThread = params.kind === "thread";
1441
+ return async (input) => {
1442
+ const cacheKey = `${input.roomId}:${input.eventId}`;
1443
+ const cached = cache.get(cacheKey);
1444
+ if (cached) {
1445
+ if (!isThread) {
1446
+ cache.delete(cacheKey);
1447
+ cache.set(cacheKey, cached);
1448
+ }
1449
+ return cached;
1450
+ }
1451
+ const event = await params.client.getEvent(input.roomId, input.eventId).catch((err) => {
1452
+ params.logVerboseMessage(`matrix: failed resolving ${isThread ? "thread root" : "reply context"} room=${input.roomId} id=${input.eventId}: ${String(err)}`);
1453
+ return null;
1454
+ });
1455
+ if (!event || isThread && (event.event_id !== input.eventId || event.room_id && event.room_id !== input.roomId)) return isThread ? { threadStarterBody: `Matrix thread root ${input.eventId}` } : {};
1456
+ const context = {};
1457
+ if (isThread || !event.unsigned?.redacted_because) {
1458
+ const body = summarizeMatrixMessageContextEvent(event);
1459
+ let summary = body ? truncateMatrixContextBody(body) : void 0;
1460
+ if (isThread && !summary) {
1461
+ const msgtype = normalizeOptionalString(event.content.msgtype);
1462
+ const eventType = normalizeOptionalString(event.type);
1463
+ summary = msgtype ? `Matrix ${msgtype} message` : eventType ? `Matrix ${eventType} event` : void 0;
1464
+ }
1465
+ if (isThread || summary) {
1466
+ const senderId = normalizeOptionalString(event.sender);
1467
+ const senderName = senderId && await params.getMemberDisplayName(input.roomId, senderId).catch(() => void 0);
1468
+ Object.assign(context, {
1469
+ summary,
1470
+ senderId,
1471
+ senderLabel: senderName ?? senderId
1472
+ });
1473
+ if (isThread) {
1474
+ const lines = [`Matrix thread root ${input.eventId} from ${senderName ?? senderId ?? "unknown sender"}:`];
1475
+ if (summary) lines.push(summary);
1476
+ context.threadStarterBody = lines.join("\n");
1477
+ }
1478
+ }
1479
+ }
1480
+ setBoundedMap(cache, cacheKey, context, 256);
1481
+ return context;
1482
+ };
1483
+ }
1484
+ //#endregion
1485
+ //#region extensions/matrix/src/matrix/monitor/ack-config.ts
1486
+ function resolveMatrixAckReactionConfig(params) {
1487
+ const matrixConfig = params.cfg.channels?.matrix;
1488
+ const accountConfig = resolveMatrixAccountConfig({
1489
+ cfg: params.cfg,
1490
+ accountId: params.accountId
1491
+ });
1492
+ return {
1493
+ ackReaction: resolveAckReaction(params.cfg, params.agentId, {
1494
+ channel: "matrix",
1495
+ accountId: params.accountId ?? void 0
1496
+ }).trim(),
1497
+ ackReactionScope: accountConfig.ackReactionScope ?? matrixConfig?.ackReactionScope ?? params.cfg.messages?.ackReactionScope ?? "group-mentions"
1498
+ };
1499
+ }
1500
+ //#endregion
1501
+ //#region extensions/matrix/src/matrix/monitor/preflight-audio.ts
1502
+ function isMatrixAudioContent(params) {
1503
+ if (params.msgtype === "m.audio") return true;
1504
+ if (params.msgtype === "m.file" && typeof params.mimetype === "string") return params.mimetype.toLowerCase().startsWith("audio/");
1505
+ return false;
1506
+ }
1507
+ const matrixPreflightAudio = createChannelPreflightAudio({
1508
+ channel: "matrix",
1509
+ isAudio: isMatrixAudioContent
1510
+ });
1511
+ async function resolveMatrixPreflightAudioTranscript(params) {
1512
+ return await matrixPreflightAudio.resolve({
1513
+ request: {
1514
+ ctx: {
1515
+ media: [{
1516
+ path: params.mediaPath,
1517
+ contentType: params.mediaContentType
1518
+ }],
1519
+ Provider: "matrix",
1520
+ Surface: "matrix",
1521
+ OriginatingChannel: "matrix",
1522
+ OriginatingTo: params.originatingTo,
1523
+ AccountId: params.accountId,
1524
+ MessageThreadId: params.messageThreadId,
1525
+ ChatType: params.chatType,
1526
+ SessionKey: params.sessionKey
1527
+ },
1528
+ cfg: params.cfg
1529
+ },
1530
+ abortSignal: params.abortSignal
1531
+ });
1532
+ }
1533
+ //#endregion
1534
+ //#region extensions/matrix/src/matrix/monitor/handler-helpers.ts
1535
+ const MATRIX_TOOL_PROGRESS_MAX_CHARS = 300;
1536
+ const MAX_TRACKED_SHARED_DM_CONTEXT_NOTICES = 512;
1537
+ function resolveMatrixMentionPrecheckText(params) {
1538
+ if (params.locationText?.trim()) return params.locationText.trim();
1539
+ if (typeof params.content.body === "string" && params.content.body.trim()) return params.content.body.trim();
1540
+ if (isPollStartType(params.eventType)) {
1541
+ const parsed = parsePollStartContent(params.content);
1542
+ if (parsed) return formatPollAsText(parsed);
1543
+ }
1544
+ return "";
1545
+ }
1546
+ function hasBundledMatrixReplacementRelation(event) {
1547
+ const relations = event.unsigned?.["m.relations"];
1548
+ if (!relations || typeof relations !== "object") return false;
1549
+ return relations[RelationType.Replace] !== void 0;
1550
+ }
1551
+ function resolveMatrixInboundBodyText(params) {
1552
+ if (params.mediaPlaceholder) return params.rawBody || params.mediaPlaceholder;
1553
+ if (!params.mediaDownloadFailed || !params.hadMediaUrl) return params.rawBody;
1554
+ if (params.mediaSizeLimitExceeded) return formatMatrixMediaTooLargeText({
1555
+ body: params.rawBody,
1556
+ filename: params.filename,
1557
+ msgtype: params.msgtype
1558
+ });
1559
+ return formatMatrixMediaUnavailableText({
1560
+ body: params.rawBody,
1561
+ filename: params.filename,
1562
+ msgtype: params.msgtype
1563
+ });
1564
+ }
1565
+ function markTrackedRoomIfFirst(set, roomId) {
1566
+ if (set.has(roomId)) return false;
1567
+ set.add(roomId);
1568
+ if (set.size > MAX_TRACKED_SHARED_DM_CONTEXT_NOTICES) {
1569
+ const oldest = set.keys().next().value;
1570
+ if (typeof oldest === "string") set.delete(oldest);
1571
+ }
1572
+ return true;
1573
+ }
1574
+ function resolveMatrixSharedDmContextNotice(params) {
1575
+ if ((params.dmSessionScope ?? "per-user") === "per-room") return null;
1576
+ if (params.sentRooms.has(params.roomId)) return null;
1577
+ try {
1578
+ const currentSession = resolveMatrixStoredSessionMeta(getSessionEntry({
1579
+ storePath: params.storePath,
1580
+ sessionKey: params.sessionKey
1581
+ }));
1582
+ if (!currentSession) return null;
1583
+ if (currentSession.channel && currentSession.channel !== "matrix") return null;
1584
+ if (currentSession.accountId && currentSession.accountId !== params.accountId) return null;
1585
+ if (!currentSession.directUserId) return null;
1586
+ if (!currentSession.roomId || currentSession.roomId === params.roomId) return null;
1587
+ 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(" ");
1588
+ } catch (err) {
1589
+ params.logVerboseMessage(`matrix: failed checking shared DM session notice room=${params.roomId} (${String(err)})`);
1590
+ return null;
1591
+ }
1592
+ }
1593
+ function resolveMatrixPendingHistoryText(params) {
1594
+ if (!params.mediaUrl) return params.mentionPrecheckText;
1595
+ const body = typeof params.content.body === "string" ? params.content.body : void 0;
1596
+ const filename = typeof params.content.filename === "string" ? params.content.filename : void 0;
1597
+ const msgtype = typeof params.content.msgtype === "string" ? params.content.msgtype : void 0;
1598
+ return formatMatrixMessageText({
1599
+ body,
1600
+ filename,
1601
+ msgtype
1602
+ }) ?? params.mentionPrecheckText;
1603
+ }
1604
+ function resolveMatrixInboundMediaContent(content) {
1605
+ const file = content.file && typeof content.file === "object" ? content.file : void 0;
1606
+ const info = content.info && typeof content.info === "object" ? content.info : void 0;
1607
+ const body = normalizeOptionalString(content.body);
1608
+ return {
1609
+ url: normalizeOptionalString(content.url) ?? normalizeOptionalString(file?.url),
1610
+ file,
1611
+ body: body ?? "",
1612
+ contentType: info?.mimetype,
1613
+ sizeBytes: typeof info?.size === "number" ? info.size : void 0,
1614
+ originalFilename: normalizeOptionalString(content.filename) ?? body
1615
+ };
1616
+ }
1617
+ function isMatrixAudioMediaEnabled(cfg) {
1618
+ return cfg.tools?.media?.audio?.enabled !== false;
1619
+ }
1620
+ function shouldDeferMatrixAudioPreflightForRoomIngress(params) {
1621
+ if (!isMatrixAudioMediaEnabled(params.cfg)) return false;
1622
+ const mediaContent = resolveMatrixInboundMediaContent(params.content);
1623
+ return mediaContent.url?.startsWith("mxc://") === true && isMatrixAudioContent({
1624
+ msgtype: typeof params.content.msgtype === "string" ? params.content.msgtype : void 0,
1625
+ mimetype: mediaContent.contentType
1626
+ });
1627
+ }
1628
+ function resolveMatrixAllowBotsMode(value) {
1629
+ if (value === true) return "all";
1630
+ if (value === "mentions") return "mentions";
1631
+ return "off";
1632
+ }
1633
+ function formatMatrixToolProgressMarkdownCode(text) {
1634
+ return `\`${(text.length <= MATRIX_TOOL_PROGRESS_MAX_CHARS ? text : `${truncateUtf16Safe(text, 299).trimEnd()}...`).replaceAll("`", "'")}\``;
1635
+ }
1636
+ //#endregion
1637
+ //#region extensions/matrix/src/matrix/monitor/handler-runtime.ts
1638
+ const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-GOF64QRc.mjs").then((n) => n.s));
1639
+ const loadAcpBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/acp-binding-runtime"));
1640
+ const loadSessionBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/session-binding-runtime"));
1641
+ const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-mnzc_JvP.mjs"));
1642
+ const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-CdVMstpR.mjs"));
1643
+ async function matrixTextWouldActivateMentions(client, text) {
1644
+ const { resolveMatrixMentionsForBody } = await loadMatrixSendModule();
1645
+ const mentions = await resolveMatrixMentionsForBody({
1646
+ client,
1647
+ body: text
1648
+ });
1649
+ return mentions.room === true || (mentions.user_ids?.length ?? 0) > 0;
1650
+ }
1651
+ //#endregion
1652
+ //#region extensions/matrix/src/matrix/monitor/handler-context.ts
1653
+ async function resolveMatrixInboundContext(config) {
1654
+ const { handler, ingress, roomId, event, eventTs, resolveThreadContext, resolveReplyContext, senderId, sharedDmContextNoticeRooms } = config;
1655
+ const { client, core, accountId, runtime, logVerboseMessage, groupPolicy, getRoomInfo, historyLimit, dmSessionScope, resolveStorePath: resolveStorePathImpl, createChannelInboundEnvelopeBuilder: createChannelInboundEnvelopeBuilderImpl, finalizeInboundContext } = handler;
1656
+ 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;
1657
+ const contextVisibilityMode = resolveChannelContextVisibilityMode({
1658
+ cfg,
1659
+ channel: "matrix",
1660
+ accountId
1661
+ });
1662
+ const replyToEventId = resolveMatrixReplyToEventId(event.content);
1663
+ const threadTarget = thread.threadId;
1664
+ const isRoomContextSenderAllowed = (contextSenderId) => {
1665
+ if (!isRoom || !contextSenderId) return true;
1666
+ if (effectiveRoomUsers.length > 0) return resolveMatrixAllowListMatch({
1667
+ allowList: effectiveRoomUsers,
1668
+ userId: contextSenderId
1669
+ }).allowed;
1670
+ if (groupPolicy === "allowlist" && effectiveGroupAllowFrom.length > 0) return resolveMatrixAllowListMatch({
1671
+ allowList: effectiveGroupAllowFrom,
1672
+ userId: contextSenderId
1673
+ }).allowed;
1674
+ return true;
1675
+ };
1676
+ const shouldIncludeRoomContextSender = (kind, contextSenderId) => evaluateSupplementalContextVisibility({
1677
+ mode: contextVisibilityMode,
1678
+ kind,
1679
+ senderAllowed: isRoomContextSenderAllowed(contextSenderId)
1680
+ }).include;
1681
+ let threadContext = ingress.threadContext ?? (threadRootId ? await resolveThreadContext({
1682
+ roomId,
1683
+ eventId: threadRootId
1684
+ }) : void 0);
1685
+ if (threadContext?.senderId && !shouldIncludeRoomContextSender("thread", threadContext.senderId)) {
1686
+ logVerboseMessage(`matrix: drop thread root context (mode=${contextVisibilityMode})`);
1687
+ threadContext = void 0;
1688
+ }
1689
+ let replyContext;
1690
+ if (replyToEventId && replyToEventId === threadRootId && threadContext?.summary) replyContext = {
1691
+ summary: threadContext.summary,
1692
+ senderLabel: threadContext.senderLabel,
1693
+ senderId: threadContext.senderId
1694
+ };
1695
+ else replyContext = replyToEventId ? await resolveReplyContext({
1696
+ roomId,
1697
+ eventId: replyToEventId
1698
+ }) : void 0;
1699
+ const replySenderAllowed = !replyContext?.senderId || isRoomContextSenderAllowed(replyContext.senderId);
1700
+ const roomName = (isRoom ? await getRoomInfo(roomId) : void 0)?.name;
1701
+ const envelopeFrom = isDirectMessage ? senderName : roomName ?? roomId;
1702
+ const textWithId = `${bodyText}\n[matrix event id: ${messageId} room: ${roomId}]`;
1703
+ const storePath = resolveStorePathImpl(cfg.session?.store, { agentId: _route.agentId });
1704
+ const buildEnvelope = createChannelInboundEnvelopeBuilderImpl({
1705
+ cfg,
1706
+ route: _route
1707
+ });
1708
+ const sharedDmNoticeSessionKey = threadTarget ? _route.mainSessionKey || _route.sessionKey : _route.sessionKey;
1709
+ const sharedDmContextNotice = isDirectMessage ? hasExplicitSessionBinding ? null : resolveMatrixSharedDmContextNotice({
1710
+ storePath,
1711
+ sessionKey: sharedDmNoticeSessionKey,
1712
+ roomId,
1713
+ accountId: _route.accountId,
1714
+ dmSessionScope,
1715
+ sentRooms: sharedDmContextNoticeRooms,
1716
+ logVerboseMessage
1717
+ }) : null;
1718
+ const body = buildEnvelope({
1719
+ channel: "Matrix",
1720
+ from: envelopeFrom,
1721
+ timestamp: eventTs ?? void 0,
1722
+ body: textWithId
1723
+ });
1724
+ const groupSystemPrompt = normalizeOptionalString(roomConfig?.systemPrompt);
1725
+ const quoteHidden = Boolean(replyContext && !evaluateSupplementalContextVisibility({
1726
+ mode: contextVisibilityMode,
1727
+ kind: "quote",
1728
+ senderAllowed: replySenderAllowed
1729
+ }).include);
1730
+ const channelIngress = await resolveMessageIngress({
1731
+ agentId: _route.agentId,
1732
+ sessionKey: _route.sessionKey,
1733
+ nativeChannelId: roomId,
1734
+ messageId,
1735
+ inboundEventKind: "user_request"
1736
+ }, {
1737
+ kind: isDirectMessage ? "direct" : "channel",
1738
+ id: roomId,
1739
+ threadId: threadTarget
1740
+ });
1741
+ const ctxPayload = core.channel.inbound.buildContext({
1742
+ channelIngress,
1743
+ channel: "matrix",
1744
+ contextVisibility: contextVisibilityMode,
1745
+ finalize: finalizeInboundContext,
1746
+ supplemental: {
1747
+ quote: replyContext ? {
1748
+ id: threadTarget ? void 0 : replyToEventId ?? void 0,
1749
+ body: replyContext.summary,
1750
+ sender: replyContext.senderLabel,
1751
+ senderAllowed: replySenderAllowed
1752
+ } : void 0,
1753
+ thread: {
1754
+ starterBody: threadContext?.threadStarterBody,
1755
+ senderAllowed: threadContext ? true : void 0
1756
+ },
1757
+ groupSystemPrompt: isRoom ? groupSystemPrompt : void 0
1758
+ },
1759
+ media: await toInboundMediaFactsWithMetadata(media ? [{
1760
+ path: media.path,
1761
+ url: media.path,
1762
+ contentType: media.contentType,
1763
+ transcribed: preflightAudioTranscript !== void 0
1764
+ }] : void 0),
1765
+ messageId,
1766
+ timestamp: eventTs ?? void 0,
1767
+ from: isDirectMessage ? `matrix:${senderId}` : `matrix:channel:${roomId}`,
1768
+ sender: {
1769
+ id: senderId,
1770
+ name: senderName,
1771
+ username: senderId.split(":")[0]?.replace(/^@/, "")
1772
+ },
1773
+ conversation: {
1774
+ kind: isDirectMessage ? "direct" : "channel",
1775
+ id: roomId,
1776
+ label: envelopeFrom,
1777
+ nativeChannelId: roomId,
1778
+ threadId: threadTarget
1779
+ },
1780
+ route: {
1781
+ ..._route,
1782
+ routeSessionKey: _route.sessionKey,
1783
+ parentSessionKey: threadTarget && _route.matchedBy !== "binding.channel" ? _route.mainSessionKey : void 0
1784
+ },
1785
+ reply: {
1786
+ to: `room:${roomId}`,
1787
+ replyToId: threadTarget ? void 0 : replyToEventId ?? void 0,
1788
+ messageThreadId: threadTarget,
1789
+ nativeChannelId: roomId
1790
+ },
1791
+ message: {
1792
+ body,
1793
+ rawBody: bodyText,
1794
+ commandBody: commandBodyText,
1795
+ bodyForAgent: bodyText,
1796
+ inboundHistory: inboundHistory && inboundHistory.length > 0 ? inboundHistory : void 0
1797
+ },
1798
+ sessionTranscript: { historyLimit: isRoom ? historyLimit : 0 },
1799
+ access: {
1800
+ ...isRoom ? { mentions: {
1801
+ canDetectMention: true,
1802
+ wasMentioned,
1803
+ requireMention: shouldRequireMention
1804
+ } } : {},
1805
+ commands: { authorized: commandAuthorized }
1806
+ },
1807
+ extra: {
1808
+ GroupSubject: isRoom ? roomName ?? roomId : void 0,
1809
+ GroupId: isRoom ? roomId : void 0,
1810
+ ...locationPayload?.context,
1811
+ CommandSource: "text",
1812
+ NativeDirectUserId: isDirectMessage ? senderId : void 0
1813
+ }
1814
+ });
1815
+ if (quoteHidden) logVerboseMessage(`matrix: drop reply context (mode=${contextVisibilityMode})`);
1816
+ logVerboseMessage(`matrix inbound: room=${roomId} from=${senderId} preview="${truncateUtf16Safe(bodyText, 200).replace(/\n/g, "\\n")}"`);
1817
+ const replyTarget = ctxPayload.To;
1818
+ if (!replyTarget) {
1819
+ runtime.error?.("matrix: missing reply target");
1820
+ return null;
1821
+ }
1822
+ const { ackReaction, ackReactionScope: ackScope } = resolveMatrixAckReactionConfig({
1823
+ cfg,
1824
+ agentId: _route.agentId,
1825
+ accountId
1826
+ });
1827
+ if (Boolean(ackReaction && core.channel.reactions.shouldAckReaction({
1828
+ scope: ackScope,
1829
+ isDirect: isDirectMessage,
1830
+ isGroup: isRoom,
1831
+ isMentionableGroup: isRoom,
1832
+ canDetectMention,
1833
+ effectiveWasMentioned,
1834
+ shouldBypassMention
1835
+ })) && messageId) loadMatrixSendModule().then(({ reactMatrixMessage }) => reactMatrixMessage(roomId, messageId, ackReaction, { client })).catch((err) => {
1836
+ logVerboseMessage(`matrix react failed for room ${roomId}: ${String(err)}`);
1837
+ });
1838
+ if (messageId) loadMatrixSendModule().then(({ sendReadReceiptMatrix }) => sendReadReceiptMatrix(roomId, messageId, client)).catch((err) => {
1839
+ logVerboseMessage(`matrix: read receipt failed room=${roomId} id=${messageId}: ${String(err)}`);
1840
+ });
1841
+ return {
1842
+ replyToEventId,
1843
+ threadTarget,
1844
+ storePath,
1845
+ ctxPayload,
1846
+ replyTarget,
1847
+ sharedDmContextNotice
1848
+ };
1849
+ }
1850
+ //#endregion
1851
+ //#region extensions/matrix/src/matrix/monitor/handler-draft-controller.ts
1852
+ async function createMatrixDraftController(params) {
1853
+ const { streaming, previewToolProgressEnabled, replyToMode, messageId, threadTarget, accountConfig, cfg, accountId, roomId, client, logVerboseMessage } = params;
1854
+ const draftStreamingEnabled = streaming !== "off";
1855
+ const quietDraftStreaming = streaming === "quiet" || streaming === "progress";
1856
+ const progressDraftStreaming = streaming === "progress";
1857
+ const draftReplyToId = replyToMode !== "off" && !threadTarget ? messageId : void 0;
1858
+ const draftStream = draftStreamingEnabled ? await loadMatrixDraftStream().then(({ createMatrixDraftStream }) => createMatrixDraftStream({
1859
+ roomId,
1860
+ client,
1861
+ cfg,
1862
+ mode: quietDraftStreaming ? "quiet" : "partial",
1863
+ threadId: threadTarget,
1864
+ replyToId: draftReplyToId,
1865
+ preserveReplyId: replyToMode === "all",
1866
+ accountId,
1867
+ log: logVerboseMessage
1868
+ })) : void 0;
1869
+ const shouldSuppressDefaultToolProgressMessages = Boolean(draftStream) && (previewToolProgressEnabled || progressDraftStreaming);
1870
+ let currentDraftMessageGeneration = 0;
1871
+ let currentDraftBlockOffset = 0;
1872
+ let latestDraftFullText = "";
1873
+ const pendingDraftBoundaries = [];
1874
+ const latestQueuedDraftBoundaryOffsets = /* @__PURE__ */ new Map();
1875
+ let currentDraftReplyToId = draftReplyToId;
1876
+ const progressConfigEntry = accountConfig ?? cfg.channels?.matrix;
1877
+ const progressSeed = `${accountId}:${roomId}`;
1878
+ const progressDraft = createChannelProgressDraftCompositor({
1879
+ preparedItems: true,
1880
+ entry: progressConfigEntry,
1881
+ mode: streaming === "quiet" ? "partial" : streaming,
1882
+ active: Boolean(draftStream),
1883
+ seed: progressSeed,
1884
+ formatLine: formatMatrixToolProgressMarkdownCode,
1885
+ update: async (text, options) => {
1886
+ const previewText = text.replace(/^• /gmu, "- ");
1887
+ if (!draftStream) return false;
1888
+ draftStream.update(previewText);
1889
+ if (options?.flush) await draftStream.flush();
1890
+ return Boolean(draftStream.eventId());
1891
+ },
1892
+ deleteCurrent: () => draftStream?.deleteCurrentMessage()
1893
+ });
1894
+ const previewLifecycle = createLivePreviewLifecycle({
1895
+ draft: draftStream ? {
1896
+ flush: draftStream.flush,
1897
+ id: draftStream.eventId,
1898
+ seal: draftStream.seal,
1899
+ discardPending: draftStream.discardPending,
1900
+ clear: draftStream.clear
1901
+ } : void 0,
1902
+ cleanupUndelivered: true,
1903
+ onFinalStarted: () => progressDraft.markFinalReplyStarted(),
1904
+ onFinalDelivered: () => progressDraft.markFinalReplyDelivered(),
1905
+ onCleanupFailure: (err) => logVerboseMessage(`matrix draft preview cleanup failed: ${String(err)}`)
1906
+ });
1907
+ const buildPreviewToolProgressReplyOptions = () => {
1908
+ if (!shouldSuppressDefaultToolProgressMessages) return {};
1909
+ return {
1910
+ suppressDefaultToolProgressMessages: true,
1911
+ progressPreambleEnabled: true,
1912
+ commentaryProgressEnabled: progressDraft.commentaryProgressEnabled,
1913
+ onToolStart: progressDraft.pushToolEvent,
1914
+ onItemEvent: progressDraft.pushItemEvent,
1915
+ onPlanUpdate: async (payload) => {
1916
+ if (payload.phase !== "update") return false;
1917
+ return await progressDraft.pushPlanProgress(payload.steps, {
1918
+ explanation: payload.explanation,
1919
+ explanationFormat: payload.explanationFormat
1920
+ });
1921
+ },
1922
+ onApprovalEvent: (payload) => progressDraft.pushApprovalEvent(payload)
1923
+ };
1924
+ };
1925
+ const updateDraftFromLatestFullText = () => {
1926
+ const nextDraftBoundaryOffset = pendingDraftBoundaries.find((boundary) => boundary.messageGeneration === currentDraftMessageGeneration)?.endOffset;
1927
+ const blockText = latestDraftFullText.slice(currentDraftBlockOffset, nextDraftBoundaryOffset);
1928
+ if (blockText) draftStream?.update(blockText);
1929
+ };
1930
+ const queueDraftBlockBoundary = (payload, context) => {
1931
+ const payloadTextLength = payload.text?.length ?? 0;
1932
+ const messageGeneration = context?.assistantMessageIndex ?? currentDraftMessageGeneration;
1933
+ const nextDraftBoundaryOffset = (latestQueuedDraftBoundaryOffsets.get(messageGeneration) ?? 0) + payloadTextLength;
1934
+ latestQueuedDraftBoundaryOffsets.set(messageGeneration, nextDraftBoundaryOffset);
1935
+ pendingDraftBoundaries.push({
1936
+ messageGeneration,
1937
+ endOffset: nextDraftBoundaryOffset
1938
+ });
1939
+ };
1940
+ const advanceDraftBlockBoundary = (options) => {
1941
+ const completedBoundary = pendingDraftBoundaries.shift();
1942
+ if (completedBoundary) {
1943
+ if (!pendingDraftBoundaries.some((entry) => entry.messageGeneration === completedBoundary.messageGeneration)) latestQueuedDraftBoundaryOffsets.delete(completedBoundary.messageGeneration);
1944
+ if (completedBoundary.messageGeneration === currentDraftMessageGeneration) currentDraftBlockOffset = completedBoundary.endOffset;
1945
+ return;
1946
+ }
1947
+ if (options?.fallbackToLatestEnd) currentDraftBlockOffset = latestDraftFullText.length;
1948
+ };
1949
+ const resetDraftBlockOffsets = () => {
1950
+ currentDraftMessageGeneration += 1;
1951
+ currentDraftBlockOffset = 0;
1952
+ latestDraftFullText = "";
1953
+ };
1954
+ const resetDraftDeliveryState = async () => {
1955
+ await draftStream?.discardPending();
1956
+ draftStream?.reset();
1957
+ previewLifecycle.reset();
1958
+ currentDraftMessageGeneration = 0;
1959
+ currentDraftBlockOffset = 0;
1960
+ latestDraftFullText = "";
1961
+ pendingDraftBoundaries.length = 0;
1962
+ latestQueuedDraftBoundaryOffsets.clear();
1963
+ currentDraftReplyToId = draftReplyToId;
1964
+ progressDraft.beginNewTurn({ force: true });
1965
+ };
1966
+ return {
1967
+ draftStream,
1968
+ previewLifecycle,
1969
+ cancelProgressDraft: () => progressDraft.cancel(),
1970
+ buildPreviewToolProgressReplyOptions,
1971
+ queueDraftBlockBoundary,
1972
+ advanceDraftBlockBoundary,
1973
+ resetDraftBlockOffsets,
1974
+ beginAssistantMessage: () => progressDraft.beginAssistantMessage(),
1975
+ resetDraftDeliveryState,
1976
+ updateDraftFromLatestFullText,
1977
+ beginDraftGeneration: () => {
1978
+ previewLifecycle.reset();
1979
+ progressDraft.beginNewTurn({ force: true });
1980
+ },
1981
+ currentReplyToId: () => currentDraftReplyToId,
1982
+ resetReplyToIdForNextBlock: () => {
1983
+ currentDraftReplyToId = replyToMode === "all" ? draftReplyToId : void 0;
1984
+ },
1985
+ onPartialReply: (text) => {
1986
+ if (progressDraftStreaming) return false;
1987
+ latestDraftFullText = text;
1988
+ if (text.trim()) progressDraft.resetActivity({ suppressed: true });
1989
+ updateDraftFromLatestFullText();
1990
+ return false;
1991
+ }
1992
+ };
1993
+ }
1994
+ //#endregion
1995
+ //#region extensions/matrix/src/matrix/monitor/room-history.ts
1996
+ /** Maximum entries retained per room (hard cap to bound memory). */
1997
+ const DEFAULT_MAX_QUEUE_SIZE = 200;
1998
+ /** Maximum number of rooms to retain queues for (FIFO eviction beyond this). */
1999
+ const DEFAULT_MAX_ROOM_QUEUES = 1e3;
2000
+ /** Maximum number of (agentId, roomId) watermark entries to retain. */
2001
+ const MAX_WATERMARK_ENTRIES = 5e3;
2002
+ /** Maximum prepared trigger snapshots retained per room for retry reuse. */
2003
+ const MAX_PREPARED_TRIGGER_ENTRIES = 500;
2004
+ /** Maximum thread queues retained per room (FIFO eviction beyond this). */
2005
+ const MAX_THREAD_QUEUES_PER_ROOM = 200;
2006
+ function createRoomHistoryTracker(maxQueueSize = DEFAULT_MAX_QUEUE_SIZE, maxRoomQueues = DEFAULT_MAX_ROOM_QUEUES, maxWatermarkEntries = MAX_WATERMARK_ENTRIES, maxPreparedTriggerEntries = MAX_PREPARED_TRIGGER_ENTRIES) {
2007
+ const roomQueues = /* @__PURE__ */ new Map();
2008
+ /** Maps `{agentId, roomId, scope}` → absolute consumed-up-to index */
2009
+ const agentWatermarks = /* @__PURE__ */ new Map();
2010
+ let nextQueueGeneration = 1;
2011
+ function clearWatermarks(roomId, threadRootId) {
2012
+ for (const key of agentWatermarks.keys()) {
2013
+ const parsed = JSON.parse(key);
2014
+ if (parsed?.roomId === roomId && (threadRootId === void 0 || parsed.scope === threadRootId)) agentWatermarks.delete(key);
2015
+ }
2016
+ }
2017
+ function createHistoryQueue() {
2018
+ return {
2019
+ entries: [],
2020
+ baseIndex: 0,
2021
+ generation: nextQueueGeneration++,
2022
+ preparedTriggers: /* @__PURE__ */ new Map()
2023
+ };
2024
+ }
2025
+ function getOrCreateQueue(roomId) {
2026
+ let queue = roomQueues.get(roomId);
2027
+ if (!queue) {
2028
+ queue = {
2029
+ ...createHistoryQueue(),
2030
+ threadQueues: /* @__PURE__ */ new Map()
2031
+ };
2032
+ roomQueues.set(roomId, queue);
2033
+ if (roomQueues.size > maxRoomQueues) {
2034
+ const oldest = roomQueues.keys().next().value;
2035
+ if (oldest !== void 0) {
2036
+ roomQueues.delete(oldest);
2037
+ clearWatermarks(oldest);
2038
+ }
2039
+ }
2040
+ }
2041
+ return queue;
2042
+ }
2043
+ function getOrCreateThreadQueue(roomId, roomQueue, threadRootId) {
2044
+ let queue = roomQueue.threadQueues.get(threadRootId);
2045
+ if (!queue) {
2046
+ queue = createHistoryQueue();
2047
+ roomQueue.threadQueues.set(threadRootId, queue);
2048
+ if (roomQueue.threadQueues.size > MAX_THREAD_QUEUES_PER_ROOM) {
2049
+ const oldest = roomQueue.threadQueues.keys().next().value;
2050
+ if (oldest !== void 0) {
2051
+ roomQueue.threadQueues.delete(oldest);
2052
+ clearWatermarks(roomId, oldest);
2053
+ }
2054
+ }
2055
+ }
2056
+ return queue;
2057
+ }
2058
+ function getScopedQueue(roomId, threadRootId) {
2059
+ const roomQueue = getOrCreateQueue(roomId);
2060
+ return threadRootId ? getOrCreateThreadQueue(roomId, roomQueue, threadRootId) : roomQueue;
2061
+ }
2062
+ function findScopedQueue(roomId, threadRootId) {
2063
+ const roomQueue = roomQueues.get(roomId);
2064
+ if (!roomQueue) return;
2065
+ return threadRootId ? roomQueue.threadQueues.get(threadRootId) : roomQueue;
2066
+ }
2067
+ function appendToQueue(queue, entry) {
2068
+ queue.entries.push(entry);
2069
+ if (queue.entries.length > maxQueueSize) {
2070
+ const overflow = queue.entries.length - maxQueueSize;
2071
+ queue.entries.splice(0, overflow);
2072
+ queue.baseIndex += overflow;
2073
+ }
2074
+ return {
2075
+ snapshotIdx: queue.baseIndex + queue.entries.length,
2076
+ queueGeneration: queue.generation
2077
+ };
2078
+ }
2079
+ function wmKey(agentId, roomId, threadRootId) {
2080
+ return JSON.stringify({
2081
+ agentId,
2082
+ roomId,
2083
+ scope: threadRootId ?? "main"
2084
+ });
2085
+ }
2086
+ function preparedTriggerKey(agentId, messageId) {
2087
+ if (!messageId?.trim()) return null;
2088
+ return `${agentId}:${messageId.trim()}`;
2089
+ }
2090
+ function rememberWatermark(key, snapshotIdx) {
2091
+ const nextSnapshotIdx = Math.max(agentWatermarks.get(key) ?? 0, snapshotIdx);
2092
+ if (agentWatermarks.has(key)) agentWatermarks.delete(key);
2093
+ setBoundedMap(agentWatermarks, key, nextSnapshotIdx, maxWatermarkEntries);
2094
+ }
2095
+ function markConsumedAfterReservedGap(queue, key, firstReservedRel, snapshotIdx) {
2096
+ const endRel = Math.min(snapshotIdx - queue.baseIndex, queue.entries.length);
2097
+ for (let rel = firstReservedRel + 1; rel < endRel; rel += 1) {
2098
+ const entry = queue.entries[rel];
2099
+ if (!entry || entry.reserved || entry.discarded) continue;
2100
+ entry.consumedBy ??= /* @__PURE__ */ new Set();
2101
+ entry.consumedBy.add(key);
2102
+ }
2103
+ }
2104
+ function rememberPreparedTrigger(queue, retryKey, prepared) {
2105
+ if (queue.preparedTriggers.has(retryKey)) queue.preparedTriggers.delete(retryKey);
2106
+ setBoundedMap(queue.preparedTriggers, retryKey, prepared, maxPreparedTriggerEntries);
2107
+ return prepared;
2108
+ }
2109
+ function computePendingHistory(queue, agentId, roomId, limit, endAbsExclusive = queue.baseIndex + queue.entries.length, startAbsOverride, threadRootId) {
2110
+ if (limit <= 0 || queue.entries.length === 0) return [];
2111
+ const key = wmKey(agentId, roomId, threadRootId);
2112
+ const wm = startAbsOverride ?? agentWatermarks.get(key) ?? 0;
2113
+ const startRel = Math.max(wm, queue.baseIndex) - queue.baseIndex;
2114
+ const endRel = Math.max(startRel, Math.min(endAbsExclusive - queue.baseIndex, queue.entries.length));
2115
+ const available = queue.entries.slice(startRel, endRel).filter((entry) => !entry.discarded && !entry.reserved && !entry.consumedBy?.has(key));
2116
+ return available.length > limit ? available.slice(-limit) : available;
2117
+ }
2118
+ function prepareTrigger(agentId, roomId, limit, entry, threadRootId, reservedSlot) {
2119
+ let slot = reservedSlot;
2120
+ const queue = getScopedQueue(roomId, threadRootId);
2121
+ if (slot) {
2122
+ const rel = slot.slotIdx - queue.baseIndex;
2123
+ if (queue.generation !== slot.queueGeneration || rel < 0 || rel >= queue.entries.length) slot = void 0;
2124
+ }
2125
+ const retryKey = preparedTriggerKey(agentId, entry.messageId);
2126
+ if (retryKey) {
2127
+ const prepared = queue.preparedTriggers.get(retryKey);
2128
+ if (prepared) {
2129
+ if (slot) discardPending(roomId, slot, threadRootId);
2130
+ return rememberPreparedTrigger(queue, retryKey, prepared);
2131
+ }
2132
+ }
2133
+ if (slot) queue.entries[slot.slotIdx - queue.baseIndex] = entry;
2134
+ const prepared = {
2135
+ history: computePendingHistory(queue, agentId, roomId, limit, slot?.slotIdx, slot?.watermarkIdx, threadRootId),
2136
+ ...slot ? {
2137
+ snapshotIdx: slot.slotIdx + 1,
2138
+ queueGeneration: queue.generation
2139
+ } : appendToQueue(queue, entry)
2140
+ };
2141
+ if (retryKey) return rememberPreparedTrigger(queue, retryKey, prepared);
2142
+ return prepared;
2143
+ }
2144
+ function finalizePending(roomId, slot, entry, threadRootId) {
2145
+ const queue = findScopedQueue(roomId, threadRootId);
2146
+ if (!queue || queue.generation !== slot.queueGeneration) return;
2147
+ const rel = slot.slotIdx - queue.baseIndex;
2148
+ if (rel < 0 || rel >= queue.entries.length) return;
2149
+ queue.entries[rel] = entry;
2150
+ }
2151
+ function discardPending(roomId, slot, threadRootId) {
2152
+ finalizePending(roomId, slot, {
2153
+ sender: "",
2154
+ body: "",
2155
+ messageId: void 0,
2156
+ discarded: true
2157
+ }, threadRootId);
2158
+ }
2159
+ return {
2160
+ recordPending(roomId, entry, threadRootId) {
2161
+ appendToQueue(getScopedQueue(roomId, threadRootId), entry);
2162
+ },
2163
+ reservePending(agentId, roomId, entry, threadRootId) {
2164
+ const snapshot = appendToQueue(getScopedQueue(roomId, threadRootId), {
2165
+ ...entry,
2166
+ reserved: true
2167
+ });
2168
+ return {
2169
+ ...snapshot,
2170
+ slotIdx: snapshot.snapshotIdx - 1,
2171
+ watermarkIdx: agentWatermarks.get(wmKey(agentId, roomId, threadRootId)) ?? 0
2172
+ };
2173
+ },
2174
+ finalizePending,
2175
+ discardPending,
2176
+ prepareTrigger,
2177
+ consumeHistory(agentId, roomId, snapshot, messageId, threadRootId) {
2178
+ const key = wmKey(agentId, roomId, threadRootId);
2179
+ const queue = findScopedQueue(roomId, threadRootId);
2180
+ if (!queue) {
2181
+ agentWatermarks.delete(key);
2182
+ return;
2183
+ }
2184
+ if (queue.generation !== snapshot.queueGeneration) return;
2185
+ const firstReservedRel = queue.entries.findIndex((entry, index) => entry.reserved === true && queue.baseIndex + index < snapshot.snapshotIdx);
2186
+ if (firstReservedRel >= 0) markConsumedAfterReservedGap(queue, key, firstReservedRel, snapshot.snapshotIdx);
2187
+ rememberWatermark(key, firstReservedRel >= 0 ? queue.baseIndex + firstReservedRel : snapshot.snapshotIdx);
2188
+ const retryKey = preparedTriggerKey(agentId, messageId);
2189
+ if (retryKey) queue.preparedTriggers.delete(retryKey);
2190
+ }
2191
+ };
2192
+ }
2193
+ //#endregion
2194
+ //#region extensions/matrix/src/matrix/monitor/handler-ingress-access.ts
2195
+ async function resolveMatrixIngressAccess(config) {
2196
+ const { handler, params: paramsLocal, roomId, event, eventTs, senderId, isReactionEvent, readStoreAllowFrom, shouldSendPairingReply, resolveLiveAccountAllowlists, roomHistoryTracker, commitInboundEventIfClaimed } = config;
2197
+ const { core, cfg, accountId, accountConfig, client, logVerboseMessage, groupPolicy, dmEnabled, dmPolicy, dmThreadReplies, threadReplies, roomsConfig, accountAllowBots, configuredBotUserIds, needsRoomAliasesForConfig, getRoomInfo, getMemberDisplayName } = handler;
2198
+ const content = paramsLocal.content;
2199
+ const isDirectMessage = paramsLocal.isDirectMessage;
2200
+ const isRoom = !isDirectMessage;
2201
+ const { audioPreflightMode, locationPayload, reservedHistorySlot, selfUserId } = paramsLocal;
2202
+ const messageId = event.event_id ?? "";
2203
+ const threadRootId = resolveMatrixThreadRootId(content);
2204
+ const thread = resolveMatrixThreadRouting({
2205
+ isDirectMessage,
2206
+ threadReplies,
2207
+ dmThreadReplies,
2208
+ messageId,
2209
+ threadRootId
2210
+ });
2211
+ const historyThreadId = threadRootId ? thread.threadId : void 0;
2212
+ let reservedHistorySlotConsumed = false;
2213
+ const discardReservedHistorySlot = () => {
2214
+ if (reservedHistorySlot && !reservedHistorySlotConsumed) {
2215
+ roomHistoryTracker.discardPending(roomId, reservedHistorySlot, historyThreadId);
2216
+ reservedHistorySlotConsumed = true;
2217
+ }
2218
+ };
2219
+ const markReservedHistorySlotConsumed = () => {
2220
+ reservedHistorySlotConsumed = true;
2221
+ };
2222
+ const commitInboundEventIfClaimedAndDiscardReserved = async () => {
2223
+ discardReservedHistorySlot();
2224
+ await commitInboundEventIfClaimed();
2225
+ };
2226
+ if (isRoom && groupPolicy === "disabled") {
2227
+ await commitInboundEventIfClaimedAndDiscardReserved();
2228
+ return;
2229
+ }
2230
+ const roomInfoForConfig = isRoom && needsRoomAliasesForConfig ? await getRoomInfo(roomId, { includeAliases: true }) : void 0;
2231
+ const roomAliasesForConfig = roomInfoForConfig ? [roomInfoForConfig.canonicalAlias ?? "", ...roomInfoForConfig.altAliases].filter(Boolean) : [];
2232
+ const roomConfigInfo = isRoom ? resolveMatrixRoomConfig({
2233
+ rooms: roomsConfig,
2234
+ roomId,
2235
+ aliases: roomAliasesForConfig
2236
+ }) : void 0;
2237
+ const roomConfig = roomConfigInfo?.config;
2238
+ const allowBotsMode = resolveMatrixAllowBotsMode(roomConfig?.allowBots ?? accountAllowBots);
2239
+ const isConfiguredBotSender = configuredBotUserIds.has(senderId);
2240
+ const roomMatchMeta = roomConfigInfo ? `matchKey=${roomConfigInfo.matchKey ?? "none"} matchSource=${roomConfigInfo.matchSource ?? "none"}` : "matchKey=none matchSource=none";
2241
+ if (isConfiguredBotSender && allowBotsMode === "off") {
2242
+ logVerboseMessage(`matrix: drop configured bot sender=${senderId} (allowBots=false${isDirectMessage ? "" : `, ${roomMatchMeta}`})`);
2243
+ await commitInboundEventIfClaimedAndDiscardReserved();
2244
+ return;
2245
+ }
2246
+ const botLoopProtection = isConfiguredBotSender && senderId !== selfUserId ? {
2247
+ scopeId: accountId,
2248
+ conversationId: roomId,
2249
+ senderId,
2250
+ receiverId: selfUserId,
2251
+ config: mergePairLoopGuardConfig(accountConfig?.botLoopProtection, roomConfig?.botLoopProtection),
2252
+ defaultsConfig: cfg.channels?.defaults?.botLoopProtection,
2253
+ defaultEnabled: true,
2254
+ nowMs: eventTs ?? void 0
2255
+ } : void 0;
2256
+ if (isRoom && roomConfig && !roomConfigInfo?.allowed) {
2257
+ logVerboseMessage(`matrix: room disabled room=${roomId} (${roomMatchMeta})`);
2258
+ await commitInboundEventIfClaimedAndDiscardReserved();
2259
+ return;
2260
+ }
2261
+ if (isRoom && groupPolicy === "allowlist") {
2262
+ if (!roomConfigInfo?.allowlistConfigured) {
2263
+ logVerboseMessage(`matrix: drop room message (no allowlist, ${roomMatchMeta})`);
2264
+ await commitInboundEventIfClaimedAndDiscardReserved();
2265
+ return;
2266
+ }
2267
+ if (!roomConfig) {
2268
+ logVerboseMessage(`matrix: drop room message (not in allowlist, ${roomMatchMeta})`);
2269
+ await commitInboundEventIfClaimedAndDiscardReserved();
2270
+ return;
2271
+ }
2272
+ }
2273
+ let senderNamePromise = null;
2274
+ const getSenderName = async () => {
2275
+ senderNamePromise ??= getMemberDisplayName(roomId, senderId).catch(() => senderId);
2276
+ return await senderNamePromise;
2277
+ };
2278
+ const storeAllowFrom = isDirectMessage && dmPolicy !== "allowlist" && dmPolicy !== "open" ? await readStoreAllowFrom() : [];
2279
+ const roomUsers = roomConfig?.users ?? [];
2280
+ const { liveCfg, liveDmAllowFrom, liveGroupAllowFrom } = await resolveLiveAccountAllowlists();
2281
+ const accessState = await resolveMatrixMonitorAccessState({
2282
+ allowFrom: liveDmAllowFrom,
2283
+ storeAllowFrom,
2284
+ dmPolicy,
2285
+ groupPolicy,
2286
+ groupAllowFrom: liveGroupAllowFrom,
2287
+ roomUsers,
2288
+ senderId,
2289
+ isRoom,
2290
+ conversationId: roomId,
2291
+ accountId,
2292
+ eventKind: isReactionEvent ? "reaction" : "message"
2293
+ });
2294
+ const { effectiveGroupAllowFrom, effectiveRoomUsers, messageIngress } = accessState;
2295
+ const ingressDecision = messageIngress.ingress;
2296
+ if (isDirectMessage) {
2297
+ if (!dmEnabled || dmPolicy === "disabled") {
2298
+ await commitInboundEventIfClaimedAndDiscardReserved();
2299
+ return;
2300
+ }
2301
+ const senderReason = messageIngress.senderAccess.reasonCode;
2302
+ if (ingressDecision.decision !== "allow") {
2303
+ if (ingressDecision.admission === "pairing-required") {
2304
+ const senderName = await getSenderName();
2305
+ const { code, created } = await core.channel.pairing.upsertPairingRequest({
2306
+ channel: "matrix",
2307
+ id: senderId,
2308
+ accountId,
2309
+ meta: { name: senderName }
2310
+ });
2311
+ if (shouldSendPairingReply(senderId, created)) {
2312
+ const pairingReply = core.channel.pairing.buildPairingReply({
2313
+ channel: "matrix",
2314
+ idLine: `Your Matrix user id: ${senderId}`,
2315
+ code
2316
+ });
2317
+ logVerboseMessage(created ? `matrix pairing request sender=${senderId} name=${senderName ?? "unknown"} (reason=${senderReason})` : `matrix pairing reminder sender=${senderId} name=${senderName ?? "unknown"} (reason=${senderReason})`);
2318
+ try {
2319
+ const { sendMessageMatrix } = await loadMatrixSendModule();
2320
+ await sendMessageMatrix(`room:${roomId}`, created ? pairingReply : `${pairingReply}\n\nPairing request is still pending approval. Reusing existing code.`, {
2321
+ client,
2322
+ cfg,
2323
+ accountId
2324
+ });
2325
+ await commitInboundEventIfClaimed();
2326
+ } catch (err) {
2327
+ logVerboseMessage(`matrix pairing reply failed for ${senderId}: ${String(err)}`);
2328
+ discardReservedHistorySlot();
2329
+ return;
2330
+ }
2331
+ } else {
2332
+ logVerboseMessage(`matrix pairing reminder suppressed sender=${senderId} (cooldown)`);
2333
+ await commitInboundEventIfClaimedAndDiscardReserved();
2334
+ }
2335
+ }
2336
+ if (isReactionEvent || dmPolicy !== "pairing") {
2337
+ logVerboseMessage(`matrix: blocked ${isReactionEvent ? "reaction" : "dm"} sender ${senderId} (dmPolicy=${dmPolicy}, reason=${senderReason})`);
2338
+ await commitInboundEventIfClaimedAndDiscardReserved();
2339
+ }
2340
+ return;
2341
+ }
2342
+ }
2343
+ if (isRoom && ingressDecision.decision !== "allow") {
2344
+ logVerboseMessage(`matrix: blocked sender ${senderId} (ingress=${ingressDecision.reasonCode}, ${roomMatchMeta})`);
2345
+ await commitInboundEventIfClaimedAndDiscardReserved();
2346
+ return;
2347
+ }
2348
+ if (isRoom) logVerboseMessage(`matrix: allow room ${roomId} (${roomMatchMeta})`);
2349
+ if (isReactionEvent) {
2350
+ const senderName = await getSenderName();
2351
+ const { handleInboundMatrixReaction } = await loadMatrixReactionEvents();
2352
+ await handleInboundMatrixReaction({
2353
+ client,
2354
+ core,
2355
+ cfg,
2356
+ accountId,
2357
+ roomId,
2358
+ event,
2359
+ senderId,
2360
+ senderLabel: senderName,
2361
+ selfUserId,
2362
+ isDirectMessage,
2363
+ logVerboseMessage
2364
+ });
2365
+ await commitInboundEventIfClaimedAndDiscardReserved();
2366
+ return;
2367
+ }
2368
+ return {
2369
+ cfg: liveCfg,
2370
+ liveDmAllowFrom,
2371
+ content,
2372
+ messageId,
2373
+ audioPreflightMode,
2374
+ isDirectMessage,
2375
+ isRoom,
2376
+ locationPayload,
2377
+ reservedHistorySlot,
2378
+ threadRootId,
2379
+ thread,
2380
+ historyThreadId,
2381
+ discardReservedHistorySlot,
2382
+ markReservedHistorySlotConsumed,
2383
+ commitInboundEventIfClaimedAndDiscardReserved,
2384
+ roomConfig,
2385
+ allowBotsMode,
2386
+ isConfiguredBotSender,
2387
+ selfUserId,
2388
+ botLoopProtection,
2389
+ roomMatchMeta,
2390
+ getSenderName,
2391
+ accessState,
2392
+ effectiveGroupAllowFrom,
2393
+ effectiveRoomUsers
2394
+ };
2395
+ }
2396
+ //#endregion
2397
+ //#region src/channels/mention-gating.ts
2398
+ function resolveBotThreadMentionPolicy(params) {
2399
+ if (!params.isBotOwnedThread || params.requireMentionInBotThreads === void 0) return {
2400
+ requireMention: params.requireMention,
2401
+ implicitMentionKinds: params.implicitMentionKinds
2402
+ };
2403
+ return {
2404
+ requireMention: params.requireMentionInBotThreads,
2405
+ implicitMentionKinds: params.requireMentionInBotThreads ? params.implicitMentionKinds?.filter((kind) => kind === "native") : params.implicitMentionKinds
2406
+ };
2407
+ }
2408
+ //#endregion
2409
+ //#region extensions/matrix/src/matrix/monitor/media.ts
2410
+ const MATRIX_MEDIA_DOWNLOAD_IDLE_TIMEOUT_MS = 3e4;
2411
+ async function downloadMatrixMedia(params) {
2412
+ if (typeof params.sizeBytes === "number" && params.sizeBytes > params.maxBytes) throw new MatrixMediaSizeLimitError();
2413
+ const options = {
2414
+ maxBytes: params.maxBytes,
2415
+ readIdleTimeoutMs: MATRIX_MEDIA_DOWNLOAD_IDLE_TIMEOUT_MS
2416
+ };
2417
+ let buffer;
2418
+ if (params.file) {
2419
+ if (!params.client.crypto) throw new Error("Cannot decrypt media: crypto not enabled");
2420
+ buffer = await params.client.crypto.decryptMedia(params.file, options);
2421
+ if (buffer.byteLength > params.maxBytes) throw new MatrixMediaSizeLimitError();
2422
+ } else try {
2423
+ buffer = await params.client.downloadContent(params.mxcUrl, options);
2424
+ } catch (err) {
2425
+ if (isMatrixMediaSizeLimitError(err)) throw err;
2426
+ throw new Error(`Matrix media download failed: ${String(err)}`, { cause: err });
2427
+ }
2428
+ const saved = await getMatrixRuntime().channel.media.saveMediaBuffer(buffer, params.contentType, "inbound", params.maxBytes, params.originalFilename);
2429
+ return {
2430
+ path: saved.path,
2431
+ contentType: saved.contentType,
2432
+ placeholder: "[matrix media]"
2433
+ };
2434
+ }
2435
+ //#endregion
2436
+ //#region extensions/matrix/src/matrix/monitor/mentions.ts
2437
+ const MATRIX_HTML_ENTITY_RE = /&(?:#x?[0-9a-f]+|amp|apos|gt|lt|nbsp|quot);/gi;
2438
+ function decodeVisibleHtmlEntities(value) {
2439
+ return value.replace(MATRIX_HTML_ENTITY_RE, (entity) => {
2440
+ const decoded = decodeHtmlEntities(entity.startsWith("&#") ? entity : entity.toLowerCase());
2441
+ return decoded === "\xA0" ? " " : decoded;
2442
+ });
2443
+ }
2444
+ function normalizeVisibleMentionText(value) {
2445
+ return normalizeLowercaseStringOrEmpty(decodeVisibleHtmlEntities(value.replace(/<[^>]+>/g, " ").replace(/[\u200b-\u200f\u202a-\u202e\u2060-\u206f]/g, "")).replace(/\s+/g, " "));
2446
+ }
2447
+ function extractVisibleMentionText(value) {
2448
+ return normalizeVisibleMentionText(value ?? "");
2449
+ }
2450
+ function resolveMatrixUserLocalpart(userId) {
2451
+ const trimmed = userId.trim();
2452
+ if (!trimmed.startsWith("@")) return null;
2453
+ const colonIndex = trimmed.indexOf(":");
2454
+ if (colonIndex <= 1) return null;
2455
+ return trimmed.slice(1, colonIndex).trim() || null;
2456
+ }
2457
+ function hasVisibleNativeMatrixUserMention(text, userId) {
2458
+ const localpart = resolveMatrixUserLocalpart(userId);
2459
+ if (!text || !localpart) return false;
2460
+ 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);
2461
+ }
2462
+ function resolveMatrixMentionPrefixCandidates(params) {
2463
+ const candidates = [];
2464
+ const seen = /* @__PURE__ */ new Set();
2465
+ const append = (candidate) => {
2466
+ const trimmed = candidate?.trim();
2467
+ if (!trimmed) return;
2468
+ const normalized = normalizeLowercaseStringOrEmpty(trimmed);
2469
+ if (seen.has(normalized)) return;
2470
+ seen.add(normalized);
2471
+ candidates.push(trimmed);
2472
+ };
2473
+ append(params.userId);
2474
+ const localpart = params.userId ? resolveMatrixUserLocalpart(params.userId) : null;
2475
+ append(localpart ? `@${localpart}` : null);
2476
+ append(params.displayName);
2477
+ append(params.displayName ? `@${params.displayName}` : null);
2478
+ append(params.displayName ? `@[${params.displayName}]` : null);
2479
+ return candidates;
2480
+ }
2481
+ function stripMatchedMatrixMentionPrefix(text, pattern) {
2482
+ const match = text.match(pattern);
2483
+ if (!match) return null;
2484
+ return text.slice(match[0].length).trimStart();
2485
+ }
2486
+ function stripNativeMatrixMentionPrefix(text, candidate) {
2487
+ return stripMatchedMatrixMentionPrefix(text, new RegExp(`^\\s*${escapeRegExp(candidate)}(?:\\s*[:,])?(?:\\s+|$)`, "i"));
2488
+ }
2489
+ function stripRegexMatrixMentionPrefix(text, pattern) {
2490
+ const flags = pattern.flags.replace(/[gy]/g, "");
2491
+ return stripMatchedMatrixMentionPrefix(text, new RegExp(`^\\s*(?:${pattern.source})(?:\\s*[:,])?(?:\\s+|$)`, flags));
2492
+ }
2493
+ function stripMatrixMentionPrefix(params) {
2494
+ const text = params.text;
2495
+ if (!text) return text;
2496
+ for (const candidate of resolveMatrixMentionPrefixCandidates(params)) {
2497
+ const stripped = stripNativeMatrixMentionPrefix(text, candidate);
2498
+ if (stripped !== null) return stripped;
2499
+ }
2500
+ for (const pattern of params.mentionRegexes ?? []) {
2501
+ const stripped = stripRegexMatrixMentionPrefix(text, pattern);
2502
+ if (stripped !== null) return stripped;
2503
+ }
2504
+ return text;
2505
+ }
2506
+ function isVisibleMentionLabel(params) {
2507
+ const cleaned = extractVisibleMentionText(params.text);
2508
+ if (!cleaned) return false;
2509
+ if (params.mentionRegexes.some((pattern) => pattern.test(cleaned))) return true;
2510
+ const localpart = resolveMatrixUserLocalpart(params.userId);
2511
+ return [
2512
+ extractVisibleMentionText(params.userId),
2513
+ localpart ? extractVisibleMentionText(localpart) : null,
2514
+ localpart ? extractVisibleMentionText(`@${localpart}`) : null,
2515
+ params.displayName ? extractVisibleMentionText(params.displayName) : null,
2516
+ params.displayName ? extractVisibleMentionText(`@${params.displayName}`) : null,
2517
+ params.displayName ? extractVisibleMentionText(`@[${params.displayName}]`) : null
2518
+ ].filter((value) => Boolean(value)).includes(cleaned);
2519
+ }
2520
+ function hasVisibleRoomMention(value) {
2521
+ const cleaned = extractVisibleMentionText(value);
2522
+ return /(^|[^a-z0-9_])@room\b/i.test(cleaned);
2523
+ }
2524
+ /**
2525
+ * Check if formatted_body contains a matrix.to link whose visible label still
2526
+ * looks like a real mention for the given user. Do not trust href alone, since
2527
+ * senders can hide arbitrary matrix.to links behind unrelated link text.
2528
+ * Many Matrix clients (including Element) use HTML links in formatted_body instead of
2529
+ * or in addition to the m.mentions field.
2530
+ */
2531
+ function checkFormattedBodyMention(params) {
2532
+ if (!params.formattedBody || !params.userId) return false;
2533
+ for (const match of params.formattedBody.matchAll(/<a\b[^>]*href=(["'])(https:\/\/matrix\.to\/#[^"']+)\1[^>]*>(.*?)<\/a>/gis)) {
2534
+ const href = match[2];
2535
+ const visibleLabel = match[3] ?? "";
2536
+ if (!href) continue;
2537
+ try {
2538
+ const parsed = new URL(href);
2539
+ if (decodeURIComponent(parsed.hash.replace(/^#\/?/, "").trim()) !== params.userId.trim()) continue;
2540
+ if (isVisibleMentionLabel({
2541
+ text: visibleLabel,
2542
+ userId: params.userId,
2543
+ mentionRegexes: params.mentionRegexes,
2544
+ displayName: params.displayName
2545
+ })) return true;
2546
+ } catch {
2547
+ continue;
2548
+ }
2549
+ }
2550
+ return false;
2551
+ }
2552
+ function resolveMentions(params) {
2553
+ const mentions = params.content["m.mentions"];
2554
+ const mentionedUsers = Array.isArray(mentions?.user_ids) ? new Set(mentions.user_ids) : /* @__PURE__ */ new Set();
2555
+ const textMentioned = getMatrixRuntime().channel.mentions.matchesMentionPatterns(params.text ?? "", params.mentionRegexes);
2556
+ const visibleRoomMention = hasVisibleRoomMention(params.text) || hasVisibleRoomMention(params.content.formatted_body);
2557
+ const mentionedInFormattedBody = params.userId ? checkFormattedBodyMention({
2558
+ formattedBody: params.content.formatted_body,
2559
+ userId: params.userId,
2560
+ displayName: params.displayName,
2561
+ mentionRegexes: params.mentionRegexes
2562
+ }) : false;
2563
+ const metadataBackedUserMention = Boolean(params.userId && mentionedUsers.has(params.userId) && (mentionedInFormattedBody || textMentioned || hasVisibleNativeMatrixUserMention(params.text, params.userId)));
2564
+ const metadataBackedRoomMention = Boolean(mentions?.room) && visibleRoomMention;
2565
+ const explicitMention = mentionedInFormattedBody || metadataBackedUserMention || metadataBackedRoomMention;
2566
+ return {
2567
+ wasMentioned: explicitMention || textMentioned || visibleRoomMention,
2568
+ hasExplicitMention: explicitMention
2569
+ };
2570
+ }
2571
+ //#endregion
2572
+ //#region extensions/matrix/src/matrix/monitor/handler-ingress-content.ts
2573
+ async function resolveMatrixIngressContent(config) {
2574
+ const { handler, params: paramsLocal, access, roomId, event, eventType, isPollEvent, eventTs, senderId, roomHistoryTracker, resolveThreadContext, commitInboundEventIfClaimed } = config;
2575
+ const { client, core, accountId, accountConfig, logger, logVerboseMessage, historyLimit, mediaMaxBytes, dmSessionScope, getMemberDisplayName } = handler;
2576
+ 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;
2577
+ const { resolveMessageIngress } = accessState;
2578
+ let content = accessContent;
2579
+ let pollSnapshotPromise = null;
2580
+ const getPollSnapshot = async () => {
2581
+ if (!isPollEvent) return null;
2582
+ pollSnapshotPromise ??= fetchMatrixPollSnapshot(client, roomId, event).catch((err) => {
2583
+ logVerboseMessage(`matrix: failed resolving poll snapshot room=${roomId} id=${event.event_id ?? "unknown"}: ${String(err)}`);
2584
+ return null;
2585
+ });
2586
+ return await pollSnapshotPromise;
2587
+ };
2588
+ const mentionPrecheckText = resolveMatrixMentionPrecheckText({
2589
+ eventType,
2590
+ content,
2591
+ locationText: locationPayload?.text
2592
+ });
2593
+ let mediaContent = resolveMatrixInboundMediaContent(content);
2594
+ const mediaUrl = mediaContent.url;
2595
+ const pendingHistoryText = resolveMatrixPendingHistoryText({
2596
+ mentionPrecheckText,
2597
+ content,
2598
+ mediaUrl
2599
+ });
2600
+ const pendingHistoryPollText = !pendingHistoryText && isPollEvent && historyLimit > 0 ? (await getPollSnapshot())?.text : "";
2601
+ if (!mentionPrecheckText && !mediaUrl && !isPollEvent) {
2602
+ await commitInboundEventIfClaimedAndDiscardReserved();
2603
+ return;
2604
+ }
2605
+ let preflightMedia = null;
2606
+ let mediaDownloadFailed = false;
2607
+ let mediaSizeLimitExceeded = false;
2608
+ let preflightAudioTranscript;
2609
+ const downloadMedia = async (mxcUrl) => {
2610
+ try {
2611
+ return await downloadMatrixMedia({
2612
+ client,
2613
+ mxcUrl,
2614
+ contentType: mediaContent.contentType,
2615
+ sizeBytes: mediaContent.sizeBytes,
2616
+ maxBytes: mediaMaxBytes,
2617
+ file: mediaContent.file,
2618
+ originalFilename: mediaContent.originalFilename
2619
+ });
2620
+ } catch (err) {
2621
+ mediaDownloadFailed = true;
2622
+ mediaSizeLimitExceeded = isMatrixMediaSizeLimitError(err);
2623
+ const errorText = formatErrorMessage(err);
2624
+ logVerboseMessage(`matrix: media download failed room=${roomId} id=${event.event_id ?? "unknown"} type=${content.msgtype} error=${errorText}`);
2625
+ logger.warn("matrix media download failed", {
2626
+ roomId,
2627
+ eventId: event.event_id,
2628
+ msgtype: content.msgtype,
2629
+ encrypted: Boolean(mediaContent.file),
2630
+ error: errorText
2631
+ });
2632
+ return null;
2633
+ }
2634
+ };
2635
+ const { route: _route, configuredBinding: _configuredBinding, runtimeBindingId: _runtimeBindingId } = resolveMatrixInboundRoute({
2636
+ cfg,
2637
+ accountId,
2638
+ roomId,
2639
+ senderId,
2640
+ isDirectMessage,
2641
+ dmSessionScope,
2642
+ threadId: thread.threadId,
2643
+ resolveAgentRoute: core.channel.routing.resolveAgentRoute
2644
+ });
2645
+ const hasExplicitSessionBinding = _configuredBinding !== null || _runtimeBindingId !== null;
2646
+ const preflightAudioMediaUrl = mediaUrl?.startsWith("mxc://") ? mediaUrl : void 0;
2647
+ const shouldRunMatrixAudioPreflight = isMatrixAudioContent({
2648
+ msgtype: typeof content.msgtype === "string" ? content.msgtype : void 0,
2649
+ mimetype: mediaContent.contentType
2650
+ }) && isMatrixAudioMediaEnabled(cfg) && preflightAudioMediaUrl !== void 0;
2651
+ if (shouldRunMatrixAudioPreflight && audioPreflightMode === "defer" && isRoom && historyLimit > 0 && !reservedHistorySlot) {
2652
+ const reserved = roomHistoryTracker.reservePending(_route.agentId, roomId, {
2653
+ sender: senderId,
2654
+ body: pendingHistoryText,
2655
+ timestamp: eventTs ?? void 0,
2656
+ messageId
2657
+ }, historyThreadId);
2658
+ return { deferredPrefix: {
2659
+ ...paramsLocal,
2660
+ audioPreflightMode: "run",
2661
+ reservedHistorySlot: reserved
2662
+ } };
2663
+ }
2664
+ if (shouldRunMatrixAudioPreflight) {
2665
+ preflightMedia = await downloadMedia(preflightAudioMediaUrl);
2666
+ if (preflightMedia) preflightAudioTranscript = await resolveMatrixPreflightAudioTranscript({
2667
+ mediaPath: preflightMedia.path,
2668
+ mediaContentType: preflightMedia.contentType,
2669
+ cfg,
2670
+ accountId,
2671
+ chatType: isDirectMessage ? "direct" : "channel",
2672
+ originatingTo: `room:${roomId}`,
2673
+ messageThreadId: thread.threadId,
2674
+ sessionKey: _route.sessionKey
2675
+ });
2676
+ }
2677
+ const agentMentionRegexes = core.channel.mentions.buildMentionRegexes(cfg, _route.agentId, {
2678
+ provider: "matrix",
2679
+ conversationId: roomId,
2680
+ providerPolicy: accountConfig?.mentionPatterns
2681
+ });
2682
+ const selfDisplayName = content.formatted_body ? await getMemberDisplayName(roomId, selfUserId).catch(() => void 0) : void 0;
2683
+ const mentionPrecheckTextWithTranscript = preflightAudioTranscript ? [mentionPrecheckText, preflightAudioTranscript].filter(Boolean).join("\n").trim() : mentionPrecheckText;
2684
+ const { wasMentioned, hasExplicitMention } = resolveMentions({
2685
+ content,
2686
+ userId: selfUserId,
2687
+ displayName: selfDisplayName,
2688
+ text: mentionPrecheckTextWithTranscript,
2689
+ mentionRegexes: agentMentionRegexes
2690
+ });
2691
+ if (isConfiguredBotSender && allowBotsMode === "mentions" && !isDirectMessage && !wasMentioned) {
2692
+ logVerboseMessage(`matrix: drop configured bot sender=${senderId} (allowBots=mentions, missing mention, ${roomMatchMeta})`);
2693
+ await commitInboundEventIfClaimedAndDiscardReserved();
2694
+ return;
2695
+ }
2696
+ const allowTextCommands = core.channel.commands.shouldHandleTextCommands({
2697
+ cfg,
2698
+ surface: "matrix"
2699
+ });
2700
+ const commandCheckText = stripMatrixMentionPrefix({
2701
+ text: mentionPrecheckText,
2702
+ userId: selfUserId,
2703
+ displayName: selfDisplayName,
2704
+ mentionRegexes: agentMentionRegexes
2705
+ });
2706
+ const hasControlCommandInMessage = core.channel.text.hasControlCommand(commandCheckText, cfg);
2707
+ const commandAccess = await resolveMatrixMonitorCommandAccess(accessState, {
2708
+ useAccessGroups: true,
2709
+ allowTextCommands,
2710
+ hasControlCommand: hasControlCommandInMessage
2711
+ });
2712
+ const commandAuthorized = commandAccess.authorized;
2713
+ if (isRoom && commandAccess.shouldBlockControlCommand) {
2714
+ logInboundDrop({
2715
+ log: logVerboseMessage,
2716
+ channel: "matrix",
2717
+ reason: "control command (unauthorized)",
2718
+ target: senderId
2719
+ });
2720
+ await commitInboundEventIfClaimedAndDiscardReserved();
2721
+ return;
2722
+ }
2723
+ const configuredRequireMention = isRoom ? roomConfig?.autoReply === true ? false : roomConfig?.autoReply === false ? true : typeof roomConfig?.requireMention === "boolean" ? roomConfig?.requireMention : true : false;
2724
+ const requireMentionInBotThreads = roomConfig?.requireMentionInBotThreads ?? accountConfig?.requireMentionInBotThreads;
2725
+ const threadContext = isRoom && threadRootId && requireMentionInBotThreads !== void 0 ? await resolveThreadContext({
2726
+ roomId,
2727
+ eventId: threadRootId
2728
+ }) : void 0;
2729
+ const { requireMention: shouldRequireMention } = resolveBotThreadMentionPolicy({
2730
+ isBotOwnedThread: threadContext?.senderId === selfUserId,
2731
+ requireMentionInBotThreads,
2732
+ requireMention: configuredRequireMention
2733
+ });
2734
+ const mentionDecision = resolveInboundMentionDecision({
2735
+ facts: {
2736
+ canDetectMention: true,
2737
+ wasMentioned,
2738
+ hasAnyMention: hasExplicitMention
2739
+ },
2740
+ policy: {
2741
+ isGroup: isRoom,
2742
+ requireMention: shouldRequireMention,
2743
+ allowTextCommands,
2744
+ hasControlCommand: hasControlCommandInMessage,
2745
+ commandAuthorized
2746
+ }
2747
+ });
2748
+ const { effectiveWasMentioned, shouldBypassMention } = mentionDecision;
2749
+ const canDetectMention = agentMentionRegexes.length > 0 || hasExplicitMention;
2750
+ if (mentionDecision.shouldSkip) {
2751
+ const pendingHistoryBody = preflightAudioTranscript ? formatAudioTranscriptForAgent(preflightAudioTranscript) : pendingHistoryText || pendingHistoryPollText;
2752
+ if (historyLimit > 0 && pendingHistoryBody) {
2753
+ const pendingEntry = {
2754
+ sender: senderId,
2755
+ body: pendingHistoryBody,
2756
+ timestamp: eventTs ?? void 0,
2757
+ messageId
2758
+ };
2759
+ if (reservedHistorySlot) {
2760
+ roomHistoryTracker.finalizePending(roomId, reservedHistorySlot, pendingEntry, historyThreadId);
2761
+ markReservedHistorySlotConsumed();
2762
+ } else roomHistoryTracker.recordPending(roomId, pendingEntry, historyThreadId);
2763
+ }
2764
+ logger.info("skipping room message", {
2765
+ roomId,
2766
+ reason: "no-mention"
2767
+ });
2768
+ await commitInboundEventIfClaimed();
2769
+ return;
2770
+ }
2771
+ if (preflightAudioTranscript) await matrixPreflightAudio.send({
2772
+ transcript: preflightAudioTranscript,
2773
+ cfg,
2774
+ accountId,
2775
+ originatingTo: `room:${roomId}`,
2776
+ messageThreadId: thread.threadId
2777
+ });
2778
+ if (isPollEvent) {
2779
+ const pollSnapshot = await getPollSnapshot();
2780
+ if (!pollSnapshot) {
2781
+ discardReservedHistorySlot();
2782
+ return;
2783
+ }
2784
+ content = {
2785
+ msgtype: "m.text",
2786
+ body: pollSnapshot.text
2787
+ };
2788
+ mediaContent = resolveMatrixInboundMediaContent(content);
2789
+ }
2790
+ let media = preflightMedia;
2791
+ const finalMediaUrl = mediaContent.url;
2792
+ if (!media && !mediaDownloadFailed && finalMediaUrl?.startsWith("mxc://")) media = await downloadMedia(finalMediaUrl);
2793
+ let bodyText = resolveMatrixInboundBodyText({
2794
+ rawBody: locationPayload?.text ?? mediaContent.body,
2795
+ filename: typeof content.filename === "string" ? content.filename : void 0,
2796
+ mediaPlaceholder: media?.placeholder,
2797
+ msgtype: content.msgtype,
2798
+ hadMediaUrl: Boolean(finalMediaUrl),
2799
+ mediaDownloadFailed,
2800
+ mediaSizeLimitExceeded
2801
+ });
2802
+ if (preflightMedia && bodyText && bodyText !== preflightMedia.placeholder && isLikelyBareFilename(bodyText)) bodyText = preflightMedia.placeholder;
2803
+ if (preflightAudioTranscript) {
2804
+ const transcriptBody = formatAudioTranscriptForAgent(preflightAudioTranscript);
2805
+ bodyText = !bodyText || bodyText === media?.placeholder ? transcriptBody : `${bodyText}\n${transcriptBody}`;
2806
+ }
2807
+ if (!bodyText) {
2808
+ await commitInboundEventIfClaimedAndDiscardReserved();
2809
+ return;
2810
+ }
2811
+ const commandBodyText = hasControlCommandInMessage ? commandCheckText : bodyText;
2812
+ const senderName = await getSenderName();
2813
+ if (_configuredBinding) {
2814
+ const { ensureConfiguredAcpBindingReady } = await loadAcpBindingRuntime();
2815
+ if (!(await ensureConfiguredAcpBindingReady({
2816
+ cfg,
2817
+ configuredBinding: _configuredBinding
2818
+ })).ok) {
2819
+ logInboundDrop({
2820
+ log: logVerboseMessage,
2821
+ channel: "matrix",
2822
+ reason: "configured ACP binding unavailable",
2823
+ target: _configuredBinding.spec.conversationId
2824
+ });
2825
+ discardReservedHistorySlot();
2826
+ return;
2827
+ }
2828
+ }
2829
+ if (_runtimeBindingId) {
2830
+ const { getSessionBindingService } = await loadSessionBindingRuntime();
2831
+ getSessionBindingService().touch(_runtimeBindingId, eventTs ?? void 0, {
2832
+ channel: "matrix",
2833
+ accountId
2834
+ });
2835
+ }
2836
+ const preparedTrigger = isRoom && historyLimit > 0 ? roomHistoryTracker.prepareTrigger(_route.agentId, roomId, historyLimit, {
2837
+ sender: senderName,
2838
+ body: bodyText,
2839
+ timestamp: eventTs ?? void 0,
2840
+ messageId
2841
+ }, historyThreadId, reservedHistorySlot) : void 0;
2842
+ if (reservedHistorySlot && preparedTrigger) markReservedHistorySlotConsumed();
2843
+ return {
2844
+ cfg,
2845
+ liveDmAllowFrom,
2846
+ resolveMessageIngress,
2847
+ route: _route,
2848
+ hasExplicitSessionBinding,
2849
+ roomConfig,
2850
+ isDirectMessage,
2851
+ isRoom,
2852
+ shouldRequireMention,
2853
+ wasMentioned,
2854
+ effectiveWasMentioned,
2855
+ shouldBypassMention,
2856
+ canDetectMention,
2857
+ commandAuthorized,
2858
+ inboundHistory: preparedTrigger ? buildInboundHistoryFromEntries({
2859
+ entries: preparedTrigger.history,
2860
+ limit: historyLimit
2861
+ }) : void 0,
2862
+ senderName,
2863
+ bodyText,
2864
+ commandBodyText,
2865
+ media,
2866
+ preflightAudioTranscript,
2867
+ locationPayload,
2868
+ messageId,
2869
+ triggerSnapshot: preparedTrigger,
2870
+ threadRootId,
2871
+ threadContext,
2872
+ thread,
2873
+ botLoopProtection,
2874
+ effectiveGroupAllowFrom,
2875
+ effectiveRoomUsers
2876
+ };
2877
+ }
2878
+ //#endregion
2879
+ //#region extensions/matrix/src/matrix/monitor/location.ts
2880
+ function decodeGeoUriParamValue(value) {
2881
+ try {
2882
+ return decodeURIComponent(value);
2883
+ } catch {
2884
+ return value;
2885
+ }
2886
+ }
2887
+ function parseGeoUri(value) {
2888
+ const trimmed = value.trim();
2889
+ if (!trimmed) return null;
2890
+ if (!normalizeLowercaseStringOrEmpty(trimmed).startsWith("geo:")) return null;
2891
+ const [coordsPart, ...paramParts] = trimmed.slice(4).split(";");
2892
+ if (!coordsPart) return null;
2893
+ const coords = coordsPart.split(",");
2894
+ if (coords.length < 2) return null;
2895
+ const latitude = parseStrictFiniteNumber(coords[0] ?? "");
2896
+ const longitude = parseStrictFiniteNumber(coords[1] ?? "");
2897
+ if (latitude === void 0 || longitude === void 0) return null;
2898
+ const params = /* @__PURE__ */ new Map();
2899
+ for (const part of paramParts) {
2900
+ const segment = part.trim();
2901
+ if (!segment) continue;
2902
+ const eqIndex = segment.indexOf("=");
2903
+ const rawKey = eqIndex === -1 ? segment : segment.slice(0, eqIndex);
2904
+ const rawValue = eqIndex === -1 ? "" : segment.slice(eqIndex + 1);
2905
+ const key = normalizeLowercaseStringOrEmpty(rawKey);
2906
+ if (!key) continue;
2907
+ const valuePart = rawValue.trim();
2908
+ params.set(key, valuePart ? decodeGeoUriParamValue(valuePart) : "");
2909
+ }
2910
+ const accuracyRaw = params.get("u");
2911
+ return {
2912
+ latitude,
2913
+ longitude,
2914
+ accuracy: accuracyRaw ? parseStrictFiniteNumber(accuracyRaw) : void 0
2915
+ };
2916
+ }
2917
+ function resolveMatrixLocation(params) {
2918
+ const { eventType, content } = params;
2919
+ if (!(eventType === EventType.Location || eventType === EventType.RoomMessage && content.msgtype === EventType.Location)) return null;
2920
+ const geoUri = normalizeOptionalString(content.geo_uri) ?? "";
2921
+ if (!geoUri) return null;
2922
+ const parsed = parseGeoUri(geoUri);
2923
+ if (!parsed) return null;
2924
+ const caption = normalizeOptionalString(content.body) ?? "";
2925
+ const location = {
2926
+ latitude: parsed.latitude,
2927
+ longitude: parsed.longitude,
2928
+ accuracy: parsed.accuracy,
2929
+ caption: caption || void 0,
2930
+ source: "pin",
2931
+ isLive: false
2932
+ };
2933
+ return {
2934
+ text: formatLocationText(location),
2935
+ context: toLocationContext(location)
2936
+ };
2937
+ }
2938
+ //#endregion
2939
+ //#region extensions/matrix/src/matrix/monitor/handler-ingress-prefix.ts
2940
+ async function readMatrixIngressPrefix(config) {
2941
+ const { client, senderId, dropPreStartupMessages, eventTs, eventAge, startupMs, startupGraceMs, event, eventType, eventId, inboundDeduper, roomId, logVerboseMessage, directTracker, claimInboundReplay } = config;
2942
+ const selfUserId = await client.getUserId();
2943
+ if (senderId === selfUserId) return;
2944
+ if (dropPreStartupMessages) {
2945
+ if (typeof eventTs === "number" && eventTs < startupMs - startupGraceMs) return;
2946
+ if (typeof eventTs !== "number" && typeof eventAge === "number" && eventAge > startupGraceMs) return;
2947
+ }
2948
+ const content = event.content;
2949
+ if (eventType === EventType.RoomMessage && isMatrixVerificationRoomMessage({
2950
+ msgtype: content.msgtype,
2951
+ body: content.body
2952
+ })) {
2953
+ logVerboseMessage(`matrix: skip verification/system room message room=${roomId}`);
2954
+ return;
2955
+ }
2956
+ const locationPayload = resolveMatrixLocation({
2957
+ eventType,
2958
+ content
2959
+ });
2960
+ const relates = content["m.relates_to"];
2961
+ if (relates && "rel_type" in relates && relates.rel_type === RelationType.Replace) return;
2962
+ if (hasBundledMatrixReplacementRelation(event)) return;
2963
+ if (eventId && inboundDeduper) {
2964
+ const claim = await inboundDeduper.claim({
2965
+ roomId,
2966
+ eventId
2967
+ });
2968
+ if (claim.kind === "claimed") claimInboundReplay(claim.handle);
2969
+ else if (claim.kind !== "invalid") {
2970
+ logVerboseMessage(`matrix: skip duplicate inbound event room=${roomId} id=${eventId}`);
2971
+ return;
2972
+ }
2973
+ }
2974
+ return {
2975
+ content,
2976
+ isDirectMessage: await directTracker.isDirectMessage({
2977
+ roomId,
2978
+ senderId,
2979
+ selfUserId
2980
+ }),
2981
+ locationPayload,
2982
+ selfUserId
2983
+ };
2984
+ }
2985
+ //#endregion
2986
+ //#region extensions/matrix/src/matrix/monitor/replies.ts
2987
+ function joinMatrixVisibleContent(contents) {
2988
+ return contents.filter((content) => Boolean(content)).join("\n");
2989
+ }
2990
+ function mergeMatrixReplyDeliveryResults(results) {
2991
+ const single = results.length === 1 ? results[0] : void 0;
2992
+ if (single?.visibleReplySent) return single;
2993
+ const visibleResults = results.filter((result) => result.visibleReplySent);
2994
+ if (visibleResults.length === 0) return {
2995
+ visibleReplySent: false,
2996
+ suppression: { reason: "no_visible_result" }
2997
+ };
2998
+ const content = joinMatrixVisibleContent(visibleResults.map((result) => result.content));
2999
+ if (visibleResults.some((result) => result.receipt || result.messageIds?.length)) return createAcceptedChannelDeliveryResult({
3000
+ deliveryResults: visibleResults,
3001
+ content
3002
+ });
3003
+ return {
3004
+ visibleReplySent: true,
3005
+ content
3006
+ };
3007
+ }
3008
+ function toMatrixPartialDeliveryError(error, settled) {
3009
+ const failedPartial = isChannelPartialDeliveryError(error) ? error.deliveryResult : void 0;
3010
+ const merged = mergeMatrixReplyDeliveryResults([...settled, ...failedPartial ? [failedPartial] : []]);
3011
+ return merged.visibleReplySent ? createChannelPartialDeliveryError(error, {
3012
+ ...merged,
3013
+ visibleReplySent: true
3014
+ }) : error;
3015
+ }
3016
+ function createMatrixReplyDeliveryResult(results) {
3017
+ if (results.length === 0) return mergeMatrixReplyDeliveryResults([]);
3018
+ return createAcceptedChannelDeliveryResult({
3019
+ results: results.map((result) => ({ receipt: result.receipt })),
3020
+ content: joinMatrixVisibleContent(results.map((result) => result.content))
3021
+ });
3022
+ }
3023
+ function resolveVisibleMatrixReplyText(text) {
3024
+ if (typeof text !== "string") return;
3025
+ const trimmedStart = text.trimStart();
3026
+ if (!trimmedStart) return text;
3027
+ if (normalizeLowercaseStringOrEmpty(trimmedStart).startsWith("reasoning:")) return;
3028
+ const visibleText = stripReasoningTagsFromText(text, {
3029
+ mode: "strict",
3030
+ trim: "none"
3031
+ });
3032
+ return visibleText.trim() ? visibleText : void 0;
3033
+ }
3034
+ async function deliverMatrixReplies(params) {
3035
+ const core = getMatrixRuntime();
3036
+ const logVerbose = (message) => {
3037
+ if (core.logging.shouldLogVerbose()) params.runtime.log?.(message);
3038
+ };
3039
+ const hasRepliedRef = params.hasRepliedRef ?? { value: false };
3040
+ const acceptedResults = [];
3041
+ try {
3042
+ for (const reply of params.replies) {
3043
+ const visibleText = resolveVisibleMatrixReplyText(reply.text);
3044
+ const { hasMedia, hasText, mediaUrls } = resolveSendableOutboundReplyParts(reply);
3045
+ if (reply.isReasoning === true || !hasMedia && reply.text && visibleText === void 0) {
3046
+ logVerbose("matrix reply suppressed as reasoning-only");
3047
+ continue;
3048
+ }
3049
+ if (!hasText && !hasMedia) {
3050
+ if (reply?.audioAsVoice) {
3051
+ logVerbose("matrix reply has audioAsVoice without media/text; skipping");
3052
+ continue;
3053
+ }
3054
+ params.runtime.error?.("matrix reply missing text/media");
3055
+ continue;
3056
+ }
3057
+ const explicitReplyToId = reply.replyToTag || reply.replyToCurrent ? reply.replyToId?.trim() : void 0;
3058
+ const rawText = visibleText ?? "";
3059
+ const replyToIdForReply = explicitReplyToId || (!params.threadId && params.replyToMode !== "off" && (params.replyToMode === "all" || !hasRepliedRef.value) ? (reply.replyToId ?? params.replyToId)?.trim() : void 0);
3060
+ const fallbackReplyToId = params.threadId ? (reply.replyToId ?? params.replyToId)?.trim() : void 0;
3061
+ const onDeliveryResult = (result) => {
3062
+ acceptedResults.push(result);
3063
+ if (replyToIdForReply) hasRepliedRef.value = true;
3064
+ };
3065
+ const extraContent = resolveMatrixExtraContent(reply);
3066
+ const targets = mediaUrls.length > 0 ? mediaUrls : [void 0];
3067
+ for (const [index, mediaUrl] of targets.entries()) await sendMessageMatrix(params.roomId, index === 0 ? rawText : "", {
3068
+ client: params.client,
3069
+ cfg: params.cfg,
3070
+ ...mediaUrl !== void 0 ? {
3071
+ mediaUrl,
3072
+ mediaLocalRoots: params.mediaLocalRoots,
3073
+ audioAsVoice: reply.audioAsVoice
3074
+ } : {},
3075
+ replyToId: replyToIdForReply,
3076
+ fallbackReplyToId,
3077
+ threadId: params.threadId,
3078
+ accountId: params.accountId,
3079
+ extraContent: index === 0 ? extraContent : void 0,
3080
+ onDeliveryResult
3081
+ });
3082
+ }
3083
+ } catch (error) {
3084
+ throw toMatrixPartialDeliveryError(error, [createMatrixReplyDeliveryResult(acceptedResults)]);
3085
+ }
3086
+ return createMatrixReplyDeliveryResult(acceptedResults);
3087
+ }
3088
+ //#endregion
3089
+ //#region extensions/matrix/src/matrix/monitor/handler-reply-dispatcher.ts
3090
+ function createMatrixReplyDispatcher(config) {
3091
+ const { cfg, prefixOptions, humanDelay, typingCallbacks, streaming, draftStream, draftController, client, roomId, runtime, replyToMode, threadTarget, replyToEventId, accountId, mediaLocalRoots, logVerboseMessage } = config;
3092
+ const quietDraftStreaming = streaming === "quiet" || streaming === "progress";
3093
+ const hasRepliedRef = { value: false };
3094
+ const deliverPayload = (reply) => deliverMatrixReplies({
3095
+ cfg,
3096
+ replies: [reply],
3097
+ roomId,
3098
+ client,
3099
+ runtime,
3100
+ replyToMode,
3101
+ hasRepliedRef,
3102
+ threadId: threadTarget,
3103
+ replyToId: threadTarget ?? replyToEventId ?? void 0,
3104
+ accountId,
3105
+ mediaLocalRoots
3106
+ });
3107
+ const { previewLifecycle } = draftController;
3108
+ let nonFinalReplyDeliveryFailed = false;
3109
+ const beginNextBlockDraft = () => {
3110
+ draftController.beginDraftGeneration();
3111
+ draftController.advanceDraftBlockBoundary({ fallbackToLatestEnd: true });
3112
+ draftStream?.reset();
3113
+ draftController.resetReplyToIdForNextBlock();
3114
+ draftController.updateDraftFromLatestFullText();
3115
+ };
3116
+ return {
3117
+ turnDispatcherOptions: {
3118
+ ...prefixOptions,
3119
+ humanDelay,
3120
+ onReplyStart: typingCallbacks.onReplyStart,
3121
+ onIdle: typingCallbacks.onIdle
3122
+ },
3123
+ deliverReply: async (payload, info) => {
3124
+ const createDraftReceipt = (id) => createPreviewMessageReceipt({
3125
+ id,
3126
+ ...threadTarget ? { threadId: threadTarget } : {},
3127
+ ...draftController.currentReplyToId() ? { replyToId: draftController.currentReplyToId() } : {}
3128
+ });
3129
+ const createDraftDeliveryResult = (id, content) => {
3130
+ const receipt = createDraftReceipt(id);
3131
+ return {
3132
+ messageIds: receipt.platformMessageIds,
3133
+ receipt,
3134
+ visibleReplySent: true,
3135
+ content
3136
+ };
3137
+ };
3138
+ const settlesPreview = Boolean(draftStream) && info.kind !== "tool" && !payload.isCompactionNotice;
3139
+ const ttsSupplement = getReplyPayloadTtsSupplement(payload);
3140
+ const fallbackPayload = settlesPreview && ttsSupplement && ttsSupplement.visibleTextAlreadyDelivered !== true && !payload.text?.trim() ? {
3141
+ ...payload,
3142
+ text: ttsSupplement.spokenText
3143
+ } : payload;
3144
+ const { hasMedia } = resolveSendableOutboundReplyParts(payload);
3145
+ const payloadText = payload.text ?? ttsSupplement?.spokenText;
3146
+ const payloadReplyMismatch = (!threadTarget && replyToMode !== "off" || payload.replyToTag || payload.replyToCurrent) && normalizeOptionalString(payload.replyToId) !== draftController.currentReplyToId();
3147
+ let retainedDraftDelivery;
3148
+ let deliveryResult;
3149
+ try {
3150
+ deliveryResult = (await previewLifecycle.deliver({
3151
+ kind: payload.isCompactionNotice ? "tool" : info.kind === "block" ? "final" : info.kind,
3152
+ payload,
3153
+ isError: payload.isError,
3154
+ adapter: draftStream ? {
3155
+ buildFinalEdit: () => payloadText?.trim() && !payload.isError && !payloadReplyMismatch && !draftStream.mustDeliverFinalNormally() ? { text: payloadText } : void 0,
3156
+ editFinal: async (draftEventId, edit) => {
3157
+ if (draftStream.mustDeliverFinalNormally() || await matrixTextWouldActivateMentions(client, edit.text)) return { visibleReplySent: false };
3158
+ const { editMessageMatrix, prepareMatrixSingleText } = await loadMatrixSendModule();
3159
+ const presentationContent = hasMedia ? void 0 : resolveMatrixExtraContent(payload);
3160
+ const extraContent = {
3161
+ ...quietDraftStreaming ? { [MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY]: true } : {},
3162
+ ...presentationContent
3163
+ };
3164
+ if (!quietDraftStreaming && !presentationContent && draftStream.matchesPreparedText(edit.text)) {
3165
+ if (!await draftStream.finalizeLive()) return { visibleReplySent: false };
3166
+ } else await editMessageMatrix(roomId, draftEventId, edit.text, {
3167
+ client,
3168
+ cfg,
3169
+ threadId: threadTarget,
3170
+ accountId,
3171
+ ...Object.keys(extraContent).length > 0 ? { extraContent } : {}
3172
+ });
3173
+ return createDraftDeliveryResult(draftEventId, prepareMatrixSingleText(edit.text, {
3174
+ cfg,
3175
+ accountId,
3176
+ preserveWhitespace: true
3177
+ }).convertedText);
3178
+ },
3179
+ createPreviewReceipt: createDraftReceipt,
3180
+ buildSupplementalPayload: () => hasMedia ? ttsSupplement ? buildTtsSupplementMediaPayload(payload) : {
3181
+ ...payload,
3182
+ text: void 0
3183
+ } : void 0,
3184
+ deliverSupplemental: deliverPayload,
3185
+ logPreviewEditFailure: (err) => {
3186
+ logVerboseMessage(`matrix: preview final edit failed: ${String(err)}`);
3187
+ }
3188
+ } : void 0,
3189
+ deliverNormally: async (normalPayload) => {
3190
+ if (settlesPreview && !previewLifecycle.previewFinalized && (hasMedia || payloadText?.trim() || payload.isError || payloadReplyMismatch || draftStream?.mustDeliverFinalNormally())) {
3191
+ const id = draftStream?.eventId();
3192
+ const content = draftStream?.content();
3193
+ if (id && content) retainedDraftDelivery = createDraftDeliveryResult(id, content);
3194
+ }
3195
+ return await deliverPayload(normalPayload === payload ? fallbackPayload : normalPayload);
3196
+ }
3197
+ })).deliveryResult;
3198
+ } catch (error) {
3199
+ if (retainedDraftDelivery) previewLifecycle.retainPreview();
3200
+ throw toMatrixPartialDeliveryError(error, retainedDraftDelivery ? [retainedDraftDelivery] : []);
3201
+ }
3202
+ if (retainedDraftDelivery && !deliveryResult?.visibleReplySent) previewLifecycle.retainPreview();
3203
+ const mergedDelivery = mergeMatrixReplyDeliveryResults([retainedDraftDelivery?.messageIds?.includes(draftStream?.eventId() ?? "") ? retainedDraftDelivery : void 0, deliveryResult].filter((result) => result !== void 0));
3204
+ if (info.kind === "block") {
3205
+ beginNextBlockDraft();
3206
+ await typingCallbacks.onReplyStart();
3207
+ }
3208
+ return mergedDelivery;
3209
+ },
3210
+ onReplyError: (err, info) => {
3211
+ if (info.kind === "final") previewLifecycle.observeFailure();
3212
+ else nonFinalReplyDeliveryFailed = true;
3213
+ if (info.kind === "block") beginNextBlockDraft();
3214
+ runtime.error?.(`matrix ${info.kind} reply failed: ${String(err)}`);
3215
+ },
3216
+ nonFinalReplyDeliveryFailed: () => nonFinalReplyDeliveryFailed
3217
+ };
3218
+ }
3219
+ //#endregion
3220
+ //#region extensions/matrix/src/matrix/monitor/handler-state.ts
3221
+ const ALLOW_FROM_STORE_CACHE_TTL_MS = 3e4;
3222
+ const PAIRING_REPLY_COOLDOWN_MS = 3e5;
3223
+ const MAX_TRACKED_PAIRING_REPLY_SENDERS = 512;
3224
+ function createMatrixHandlerState(config) {
3225
+ const { core, accountId, runtime, allowFromResolvedEntries, groupAllowFromResolvedEntries, resolveLiveUserAllowlist } = config;
3226
+ let cachedStoreAllowFrom = null;
3227
+ const liveAllowlistCache = /* @__PURE__ */ new Map();
3228
+ const resolveCachedLiveAllowlist = async (paramsValue) => {
3229
+ const accountConfigLocal = resolveMatrixAccountConfig({
3230
+ cfg: paramsValue.cfg,
3231
+ accountId
3232
+ });
3233
+ const signature = JSON.stringify({
3234
+ entries: (paramsValue.entries ?? []).map((entry) => String(entry).trim()),
3235
+ failClosedOnUnresolved: paramsValue.failClosedOnUnresolved === true,
3236
+ dangerouslyAllowNameMatching: isDangerousNameMatchingEnabled(accountConfigLocal)
3237
+ });
3238
+ const cached = liveAllowlistCache.get(paramsValue.scope);
3239
+ if (cached?.signature === signature) return cached.entries;
3240
+ const entries = await resolveLiveUserAllowlist({
3241
+ cfg: paramsValue.cfg,
3242
+ accountId,
3243
+ entries: paramsValue.entries,
3244
+ failClosedOnUnresolved: paramsValue.failClosedOnUnresolved,
3245
+ startupResolvedEntries: paramsValue.startupResolvedEntries,
3246
+ runtime
3247
+ });
3248
+ liveAllowlistCache.set(paramsValue.scope, {
3249
+ signature,
3250
+ entries
3251
+ });
3252
+ return entries;
3253
+ };
3254
+ const pairingReplySentAtMsBySender = /* @__PURE__ */ new Map();
3255
+ const resolveLiveAccountAllowlists = async () => {
3256
+ const liveCfg = core.config.current();
3257
+ const liveAccountAllowlists = resolveMatrixAccountAllowlistConfig({
3258
+ cfg: liveCfg,
3259
+ accountId
3260
+ });
3261
+ return {
3262
+ liveCfg,
3263
+ liveDmAllowFrom: await resolveCachedLiveAllowlist({
3264
+ cfg: liveCfg,
3265
+ entries: liveAccountAllowlists.dmAllowFrom,
3266
+ startupResolvedEntries: allowFromResolvedEntries,
3267
+ scope: "dm"
3268
+ }),
3269
+ liveGroupAllowFrom: await resolveCachedLiveAllowlist({
3270
+ cfg: liveCfg,
3271
+ entries: liveAccountAllowlists.groupAllowFrom,
3272
+ failClosedOnUnresolved: true,
3273
+ startupResolvedEntries: groupAllowFromResolvedEntries,
3274
+ scope: "group"
3275
+ })
3276
+ };
3277
+ };
3278
+ const readStoreAllowFrom = async () => {
3279
+ const now = Date.now();
3280
+ if (cachedStoreAllowFrom && isFutureDateTimestampMs(cachedStoreAllowFrom.expiresAtMs, { nowMs: now })) return cachedStoreAllowFrom.value;
3281
+ cachedStoreAllowFrom = null;
3282
+ const value = await core.channel.pairing.readAllowFromStore({
3283
+ channel: "matrix",
3284
+ env: process.env,
3285
+ accountId
3286
+ }).catch(() => []);
3287
+ const expiresAtMs = resolveExpiresAtMsFromDurationMs(ALLOW_FROM_STORE_CACHE_TTL_MS, { nowMs: now });
3288
+ cachedStoreAllowFrom = expiresAtMs === void 0 ? null : {
3289
+ value,
3290
+ expiresAtMs
3291
+ };
3292
+ return value;
3293
+ };
3294
+ const shouldSendPairingReply = (senderId, created) => {
3295
+ const now = Date.now();
3296
+ if (created) {
3297
+ pairingReplySentAtMsBySender.set(senderId, now);
3298
+ return true;
3299
+ }
3300
+ const lastSentAtMs = pairingReplySentAtMsBySender.get(senderId);
3301
+ if (typeof lastSentAtMs === "number" && now - lastSentAtMs < PAIRING_REPLY_COOLDOWN_MS) return false;
3302
+ pairingReplySentAtMsBySender.set(senderId, now);
3303
+ if (pairingReplySentAtMsBySender.size > MAX_TRACKED_PAIRING_REPLY_SENDERS) {
3304
+ const oldestSender = pairingReplySentAtMsBySender.keys().next().value;
3305
+ if (typeof oldestSender === "string") pairingReplySentAtMsBySender.delete(oldestSender);
3306
+ }
3307
+ return true;
3308
+ };
3309
+ return {
3310
+ resolveLiveAccountAllowlists,
3311
+ readStoreAllowFrom,
3312
+ shouldSendPairingReply
3313
+ };
3314
+ }
3315
+ //#endregion
3316
+ //#region extensions/matrix/src/matrix/monitor/handler.ts
3317
+ const SESSION_RESTART_RECOVERY_TOMBSTONE_ERROR_CODE = "SESSION_RESTART_RECOVERY_TOMBSTONE";
3318
+ 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.";
3319
+ function createMatrixRoomMessageHandler(params) {
3320
+ 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;
3321
+ const handlerConfig = {
3322
+ ...params,
3323
+ allowFromResolvedEntries,
3324
+ groupAllowFromResolvedEntries,
3325
+ configuredBotUserIds,
3326
+ resolveLiveUserAllowlist,
3327
+ resolveStorePath: resolveStorePathImpl,
3328
+ createChannelInboundEnvelopeBuilder: createChannelInboundEnvelopeBuilderImpl,
3329
+ resolveHumanDelayConfig: resolveHumanDelayConfigImpl
3330
+ };
3331
+ const handlerState = createMatrixHandlerState({
3332
+ core,
3333
+ accountId,
3334
+ runtime,
3335
+ allowFromResolvedEntries,
3336
+ groupAllowFromResolvedEntries,
3337
+ resolveLiveUserAllowlist
3338
+ });
3339
+ const resolveThreadContext = createMatrixEventContextResolver({
3340
+ kind: "thread",
3341
+ client,
3342
+ getMemberDisplayName,
3343
+ logVerboseMessage
3344
+ });
3345
+ const resolveReplyContext = createMatrixEventContextResolver({
3346
+ kind: "reply",
3347
+ client,
3348
+ getMemberDisplayName,
3349
+ logVerboseMessage
3350
+ });
3351
+ const roomHistoryTracker = createRoomHistoryTracker();
3352
+ const roomIngressQueue = new KeyedAsyncQueue();
3353
+ const sharedDmContextNoticeRooms = /* @__PURE__ */ new Set();
3354
+ return async (roomId, event) => {
3355
+ const eventId = typeof event.event_id === "string" ? event.event_id.trim() : "";
3356
+ let inboundReplayClaim;
3357
+ let draftControllerRef;
3358
+ try {
3359
+ const eventType = event.type;
3360
+ if (eventType === EventType.RoomMessageEncrypted) return;
3361
+ const isPollEvent = isPollEventType(eventType);
3362
+ const isReactionEvent = eventType === EventType.Reaction;
3363
+ const locationContent = event.content;
3364
+ const isLocationEvent = eventType === EventType.Location || eventType === EventType.RoomMessage && locationContent.msgtype === EventType.Location;
3365
+ if (eventType !== EventType.RoomMessage && !isPollEvent && !isLocationEvent && !isReactionEvent) return;
3366
+ logVerboseMessage(`matrix: inbound event room=${roomId} type=${eventType} id=${event.event_id ?? "unknown"}`);
3367
+ if (event.unsigned?.redacted_because) return;
3368
+ const senderId = event.sender;
3369
+ if (!senderId) return;
3370
+ const eventTs = event.origin_server_ts;
3371
+ const eventAge = event.unsigned?.age;
3372
+ const commitInboundEventIfClaimed = async () => {
3373
+ const claim = inboundReplayClaim;
3374
+ if (!claim) return;
3375
+ await claim.commit();
3376
+ if (inboundReplayClaim === claim) inboundReplayClaim = void 0;
3377
+ };
3378
+ const readIngressPrefix = () => readMatrixIngressPrefix({
3379
+ client,
3380
+ senderId,
3381
+ dropPreStartupMessages,
3382
+ eventTs: eventTs ?? void 0,
3383
+ eventAge: eventAge ?? void 0,
3384
+ startupMs,
3385
+ startupGraceMs,
3386
+ event,
3387
+ eventType,
3388
+ eventId,
3389
+ inboundDeduper,
3390
+ roomId,
3391
+ logVerboseMessage,
3392
+ directTracker,
3393
+ claimInboundReplay: (handle) => {
3394
+ inboundReplayClaim = handle;
3395
+ }
3396
+ });
3397
+ const continueIngress = async (paramsLocal) => {
3398
+ const access = await resolveMatrixIngressAccess({
3399
+ handler: handlerConfig,
3400
+ params: paramsLocal,
3401
+ roomId,
3402
+ event,
3403
+ eventTs: eventTs ?? void 0,
3404
+ senderId,
3405
+ isReactionEvent,
3406
+ readStoreAllowFrom: handlerState.readStoreAllowFrom,
3407
+ shouldSendPairingReply: handlerState.shouldSendPairingReply,
3408
+ resolveLiveAccountAllowlists: handlerState.resolveLiveAccountAllowlists,
3409
+ roomHistoryTracker,
3410
+ commitInboundEventIfClaimed
3411
+ });
3412
+ if (!access) return;
3413
+ return await resolveMatrixIngressContent({
3414
+ handler: handlerConfig,
3415
+ params: paramsLocal,
3416
+ access,
3417
+ roomId,
3418
+ event,
3419
+ eventType,
3420
+ isPollEvent,
3421
+ eventTs: eventTs ?? void 0,
3422
+ senderId,
3423
+ roomHistoryTracker,
3424
+ resolveThreadContext,
3425
+ commitInboundEventIfClaimed
3426
+ });
3427
+ };
3428
+ const ingressResult = historyLimit > 0 ? await roomIngressQueue.enqueue(roomId, async () => {
3429
+ const prefix = await readIngressPrefix();
3430
+ if (!prefix) return;
3431
+ if (prefix.isDirectMessage) return { deferredPrefix: prefix };
3432
+ const result = await continueIngress({
3433
+ ...prefix,
3434
+ audioPreflightMode: shouldDeferMatrixAudioPreflightForRoomIngress({
3435
+ content: prefix.content,
3436
+ cfg: startupConfig
3437
+ }) ? "defer" : "run"
3438
+ });
3439
+ return result && "deferredPrefix" in result ? { deferredPrefix: result.deferredPrefix } : { ingressResult: result };
3440
+ }) : void 0;
3441
+ const resolvedIngressResult = historyLimit > 0 ? ingressResult?.deferredPrefix ? await continueIngress(ingressResult.deferredPrefix) : ingressResult?.ingressResult : await (async () => {
3442
+ const prefix = await readIngressPrefix();
3443
+ if (!prefix) return;
3444
+ return await continueIngress(prefix);
3445
+ })();
3446
+ if (!resolvedIngressResult) return;
3447
+ if ("deferredPrefix" in resolvedIngressResult) return;
3448
+ const { cfg, liveDmAllowFrom, route: _route, roomConfig, isDirectMessage, isRoom, bodyText, messageId, triggerSnapshot, threadRootId, thread, botLoopProtection } = resolvedIngressResult;
3449
+ const inboundContext = await resolveMatrixInboundContext({
3450
+ handler: handlerConfig,
3451
+ ingress: resolvedIngressResult,
3452
+ roomId,
3453
+ event,
3454
+ eventTs: eventTs ?? void 0,
3455
+ resolveThreadContext,
3456
+ resolveReplyContext,
3457
+ senderId,
3458
+ sharedDmContextNoticeRooms
3459
+ });
3460
+ if (!inboundContext) return;
3461
+ const { replyToEventId, threadTarget, storePath, ctxPayload, replyTarget, sharedDmContextNotice } = inboundContext;
3462
+ const mediaLocalRoots = getAgentScopedMediaLocalRoots(cfg, _route.agentId);
3463
+ const { onModelSelected, ...prefixOptions } = createReplyPrefixOptions({
3464
+ cfg,
3465
+ agentId: _route.agentId,
3466
+ channel: "matrix",
3467
+ accountId: _route.accountId
3468
+ });
3469
+ const typingCallbacks = createTypingCallbacks({
3470
+ start: async () => {
3471
+ const { sendTypingMatrix } = await loadMatrixSendModule();
3472
+ await sendTypingMatrix(roomId, true, { client });
3473
+ },
3474
+ stop: async () => {
3475
+ const { sendTypingMatrix } = await loadMatrixSendModule();
3476
+ await sendTypingMatrix(roomId, false, { client });
3477
+ },
3478
+ onStartError: (err) => {
3479
+ logTypingFailure({
3480
+ log: logVerboseMessage,
3481
+ channel: "matrix",
3482
+ action: "start",
3483
+ target: roomId,
3484
+ error: err
3485
+ });
3486
+ },
3487
+ onStopError: (err) => {
3488
+ logTypingFailure({
3489
+ log: logVerboseMessage,
3490
+ channel: "matrix",
3491
+ action: "stop",
3492
+ target: roomId,
3493
+ error: err
3494
+ });
3495
+ }
3496
+ });
3497
+ const hookRunner = getGlobalHookRunner();
3498
+ const allowProviderPreview = !((hookRunner?.hasHooks("reply_payload_sending") ?? false) || (hookRunner?.hasHooks("message_sending") ?? false));
3499
+ const draftController = await createMatrixDraftController({
3500
+ streaming: allowProviderPreview ? streaming : "off",
3501
+ previewToolProgressEnabled: allowProviderPreview && previewToolProgressEnabled,
3502
+ replyToMode,
3503
+ messageId,
3504
+ threadTarget,
3505
+ accountConfig: params.accountConfig,
3506
+ cfg,
3507
+ accountId: _route.accountId,
3508
+ roomId,
3509
+ client,
3510
+ logVerboseMessage
3511
+ });
3512
+ const { draftStream } = draftController;
3513
+ draftControllerRef = draftController;
3514
+ const replyDispatcher = createMatrixReplyDispatcher({
3515
+ cfg,
3516
+ prefixOptions,
3517
+ humanDelay: resolveHumanDelayConfigImpl(cfg, _route.agentId),
3518
+ typingCallbacks,
3519
+ streaming,
3520
+ draftStream,
3521
+ draftController,
3522
+ client,
3523
+ roomId,
3524
+ runtime,
3525
+ replyToMode,
3526
+ threadTarget,
3527
+ replyToEventId: replyToEventId ?? void 0,
3528
+ accountId: _route.accountId,
3529
+ mediaLocalRoots,
3530
+ logVerboseMessage
3531
+ });
3532
+ const { deliverReply, onReplyError, turnDispatcherOptions } = replyDispatcher;
3533
+ const pinnedMainDmOwner = isDirectMessage ? resolvePinnedMainDmOwnerFromAllowlist({
3534
+ dmScope: cfg.session?.dmScope,
3535
+ allowFrom: liveDmAllowFrom,
3536
+ normalizeEntry: normalizeMatrixUserId
3537
+ }) : null;
3538
+ const inboundLastRouteSessionKey = resolveInboundLastRouteSessionKey({
3539
+ route: _route,
3540
+ sessionKey: _route.sessionKey
3541
+ });
3542
+ const replayClaimAtDispatch = inboundReplayClaim;
3543
+ const turnAdoptionLifecycle = replayClaimAtDispatch ? {
3544
+ admission: "exclusive",
3545
+ onDeferred: () => {
3546
+ if (inboundReplayClaim !== replayClaimAtDispatch) return false;
3547
+ inboundReplayClaim = void 0;
3548
+ },
3549
+ onAdopted: async () => {
3550
+ if (inboundReplayClaim === replayClaimAtDispatch) inboundReplayClaim = void 0;
3551
+ await replayClaimAtDispatch.commit();
3552
+ },
3553
+ onAbandoned: () => {
3554
+ if (inboundReplayClaim === replayClaimAtDispatch) inboundReplayClaim = void 0;
3555
+ replayClaimAtDispatch.release();
3556
+ }
3557
+ } : void 0;
3558
+ const turnResultPromise = core.channel.inbound.run({
3559
+ channel: "matrix",
3560
+ accountId: _route.accountId,
3561
+ raw: event,
3562
+ ...turnAdoptionLifecycle ? { turnAdoptionLifecycle } : {},
3563
+ adapter: {
3564
+ ingest: () => ({
3565
+ id: messageId,
3566
+ rawText: bodyText,
3567
+ textForAgent: ctxPayload.BodyForAgent,
3568
+ textForCommands: ctxPayload.CommandBody,
3569
+ raw: event
3570
+ }),
3571
+ resolveTurn: () => ({
3572
+ cfg,
3573
+ channel: "matrix",
3574
+ accountId: _route.accountId,
3575
+ route: {
3576
+ agentId: _route.agentId,
3577
+ sessionKey: _route.sessionKey
3578
+ },
3579
+ ctxPayload,
3580
+ botLoopProtection,
3581
+ record: {
3582
+ updateLastRoute: isDirectMessage ? {
3583
+ sessionKey: inboundLastRouteSessionKey,
3584
+ channel: "matrix",
3585
+ to: `room:${roomId}`,
3586
+ accountId: _route.accountId,
3587
+ mainDmOwnerPin: inboundLastRouteSessionKey === _route.mainSessionKey && pinnedMainDmOwner ? {
3588
+ ownerRecipient: pinnedMainDmOwner,
3589
+ senderRecipient: normalizeMatrixUserId(senderId),
3590
+ onSkip: ({ ownerRecipient, senderRecipient }) => {
3591
+ logVerboseMessage(`matrix: skip main-session last route for ${senderRecipient} (pinned owner ${ownerRecipient})`);
3592
+ }
3593
+ } : void 0
3594
+ } : void 0,
3595
+ onRecordError: (err) => {
3596
+ logger.warn("failed updating session meta", {
3597
+ error: String(err),
3598
+ storePath,
3599
+ sessionKey: ctxPayload.SessionKey ?? _route.sessionKey
3600
+ });
3601
+ }
3602
+ },
3603
+ afterRecord: async () => {
3604
+ if (sharedDmContextNotice && markTrackedRoomIfFirst(sharedDmContextNoticeRooms, roomId)) try {
3605
+ await client.sendMessage(roomId, {
3606
+ msgtype: "m.notice",
3607
+ body: sharedDmContextNotice
3608
+ });
3609
+ } catch (err) {
3610
+ logVerboseMessage(`matrix: failed sending shared DM session notice room=${roomId}: ${String(err)}`);
3611
+ }
3612
+ },
3613
+ delivery: {
3614
+ observeMessageSent: true,
3615
+ preparePayload: prepareMatrixReplyPayload,
3616
+ deliver: deliverReply,
3617
+ onError: (err, info) => onReplyError(err, info)
3618
+ },
3619
+ dispatcherOptions: {
3620
+ ...turnDispatcherOptions,
3621
+ onSettled: () => draftController.cancelProgressDraft()
3622
+ },
3623
+ replyOptions: {
3624
+ skillFilter: roomConfig?.skills,
3625
+ disableBlockStreaming: !blockStreamingEnabled,
3626
+ onPartialReply: draftStream ? (payload) => draftController.onPartialReply(payload.text ?? "") : void 0,
3627
+ onBlockReplyQueued: draftStream ? (payload, context) => {
3628
+ if (payload.isCompactionNotice === true) return false;
3629
+ draftController.queueDraftBlockBoundary(payload, context);
3630
+ return false;
3631
+ } : void 0,
3632
+ onAssistantMessageStart: draftStream ? () => {
3633
+ draftController.resetDraftBlockOffsets();
3634
+ draftController.beginAssistantMessage();
3635
+ return false;
3636
+ } : void 0,
3637
+ onQueuedFollowupAdmitted: draftStream ? draftController.resetDraftDeliveryState : void 0,
3638
+ ...draftController.buildPreviewToolProgressReplyOptions(),
3639
+ onObservedReplyDelivery: draftStream ? () => draftController.previewLifecycle.observeDelivery({ visibleReplySent: true }) : void 0,
3640
+ onModelSelected
3641
+ }
3642
+ })
3643
+ }
3644
+ });
3645
+ let turnResult;
3646
+ try {
3647
+ turnResult = await turnResultPromise;
3648
+ } catch (err) {
3649
+ if (extractErrorCode(err) !== SESSION_RESTART_RECOVERY_TOMBSTONE_ERROR_CODE) throw err;
3650
+ try {
3651
+ const { sendMessageMatrix } = await loadMatrixSendModule();
3652
+ await sendMessageMatrix(roomId, RESTART_RECOVERY_TOMBSTONE_NOTICE, {
3653
+ cfg,
3654
+ client,
3655
+ accountId: _route.accountId,
3656
+ replyToId: threadTarget || replyToMode === "off" ? void 0 : messageId,
3657
+ fallbackReplyToId: threadTarget,
3658
+ threadId: threadTarget,
3659
+ deliveryQueueId: `matrix:restart-recovery-tombstone:${_route.accountId}:${roomId}:${eventId}`,
3660
+ deliveryPartIndex: 0,
3661
+ deliveryPartCount: 1,
3662
+ extraContent: { msgtype: "m.notice" }
3663
+ });
3664
+ await commitInboundEventIfClaimed();
3665
+ } catch (noticeError) {
3666
+ runtime.error?.(`matrix: failed completing restart-recovery tombstone notice room=${roomId} id=${eventId || "unknown"}: ${String(noticeError)}`);
3667
+ }
3668
+ return;
3669
+ }
3670
+ if (!turnResult.dispatched) {
3671
+ if (turnResult.admission.kind === "drop" && turnResult.admission.reason === "bot-loop-protection") await commitInboundEventIfClaimed();
3672
+ return;
3673
+ }
3674
+ const { dispatchResult } = turnResult;
3675
+ const { queuedFinal } = dispatchResult;
3676
+ if (draftController.previewLifecycle.finalFailed) {
3677
+ logVerboseMessage(`matrix: final reply delivery failed room=${roomId} id=${messageId}; keeping replay committed`);
3678
+ await commitInboundEventIfClaimed();
3679
+ return;
3680
+ }
3681
+ if (!queuedFinal && replyDispatcher.nonFinalReplyDeliveryFailed()) {
3682
+ logVerboseMessage(`matrix: non-final reply delivery failed room=${roomId} id=${messageId}; keeping replay committed`);
3683
+ await commitInboundEventIfClaimed();
3684
+ return;
3685
+ }
3686
+ if (isRoom && triggerSnapshot) roomHistoryTracker.consumeHistory(_route.agentId, roomId, triggerSnapshot, messageId, threadRootId ? thread.threadId : void 0);
3687
+ if (!hasFinalInboundReplyDispatch(dispatchResult)) {
3688
+ await commitInboundEventIfClaimed();
3689
+ return;
3690
+ }
3691
+ const finalCount = resolveInboundReplyDispatchCounts(dispatchResult).final;
3692
+ logVerboseMessage(`matrix: delivered ${finalCount} reply${finalCount === 1 ? "" : "ies"} to ${replyTarget}`);
3693
+ await commitInboundEventIfClaimed();
3694
+ } catch (err) {
3695
+ const draftController = draftControllerRef;
3696
+ if (draftController?.draftStream?.eventId()) draftController.previewLifecycle.retainPreview();
3697
+ runtime.error?.(`matrix handler failed: ${String(err)}`);
3698
+ } finally {
3699
+ const draftStream = draftControllerRef?.draftStream;
3700
+ if (draftStream) {
3701
+ await draftStream.stop().catch(() => void 0);
3702
+ await draftControllerRef?.previewLifecycle.cleanup();
3703
+ await draftStream.cleanupPending();
3704
+ }
3705
+ inboundReplayClaim?.release();
3706
+ }
3707
+ };
3708
+ }
3709
+ //#endregion
3710
+ //#region extensions/matrix/src/matrix/monitor/recent-invite.ts
3711
+ function shouldPromoteRecentInviteRoom(params) {
3712
+ if (!params.roomInfo.nameResolved || !params.roomInfo.aliasesResolved) return false;
3713
+ const roomAliases = [params.roomInfo.canonicalAlias ?? "", ...params.roomInfo.altAliases].filter(Boolean);
3714
+ if ((params.roomInfo.name?.trim() ?? "") || roomAliases.length > 0) return false;
3715
+ return resolveMatrixRoomConfig({
3716
+ rooms: params.rooms,
3717
+ roomId: params.roomId,
3718
+ aliases: roomAliases
3719
+ }).matchSource === void 0;
3720
+ }
3721
+ //#endregion
3722
+ //#region extensions/matrix/src/matrix/monitor/startup.ts
3723
+ const loadMatrixStartupMaintenanceDeps = createLazyRuntimeModule(() => Promise.all([
3724
+ import("./config-update-5m1Un5gJ.mjs").then((n) => n.t),
3725
+ import("./device-health-U-yoVjPw.mjs").then((n) => n.t),
3726
+ import("./profile-B3DD2jYa.mjs").then((n) => n.n),
3727
+ import("./startup-verification-Aiy_xVdI.mjs")
3728
+ ]).then(([configUpdateModule, deviceHealthModule, profileModule, startupVerificationModule]) => ({
3729
+ updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
3730
+ summarizeMatrixDeviceHealth: deviceHealthModule.summarizeMatrixDeviceHealth,
3731
+ syncMatrixOwnProfile: profileModule.syncMatrixOwnProfile,
3732
+ ensureMatrixStartupVerification: startupVerificationModule.ensureMatrixStartupVerification
3733
+ })));
3734
+ async function runMatrixStartupMaintenance(params, deps) {
3735
+ const runtimeDeps = deps ?? await loadMatrixStartupMaintenanceDeps();
3736
+ throwIfMatrixStartupAborted(params.abortSignal);
3737
+ try {
3738
+ const profileSync = await runtimeDeps.syncMatrixOwnProfile({
3739
+ client: params.client,
3740
+ userId: params.auth.userId,
3741
+ displayName: params.accountConfig.name,
3742
+ avatarUrl: params.accountConfig.avatarUrl,
3743
+ loadAvatarFromUrl: params.loadWebMedia
3744
+ });
3745
+ throwIfMatrixStartupAborted(params.abortSignal);
3746
+ if (profileSync.displayNameUpdated) params.logger.info(`matrix: profile display name updated for ${params.auth.userId}`);
3747
+ if (profileSync.avatarUpdated) params.logger.info(`matrix: profile avatar updated for ${params.auth.userId}`);
3748
+ if (profileSync.convertedAvatarFromHttp && profileSync.resolvedAvatarUrl && params.accountConfig.avatarUrl !== profileSync.resolvedAvatarUrl) {
3749
+ const latestCfg = params.getRuntimeConfig();
3750
+ const updatedCfg = runtimeDeps.updateMatrixAccountConfig(latestCfg, params.accountId, { avatarUrl: profileSync.resolvedAvatarUrl });
3751
+ await params.replaceConfigFile(updatedCfg);
3752
+ throwIfMatrixStartupAborted(params.abortSignal);
3753
+ params.logVerboseMessage(`matrix: persisted converted avatar URL for account ${params.accountId} (${profileSync.resolvedAvatarUrl})`);
3754
+ }
3755
+ } catch (err) {
3756
+ if (isMatrixStartupAbortError(err)) throw err;
3757
+ params.logger.warn("matrix: failed to sync profile from config", { error: String(err) });
3758
+ }
3759
+ if (!(params.auth.encryption && params.client.crypto)) return;
3760
+ try {
3761
+ throwIfMatrixStartupAborted(params.abortSignal);
3762
+ const deviceHealth = runtimeDeps.summarizeMatrixDeviceHealth(await params.client.listOwnDevices());
3763
+ 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.`);
3764
+ } catch (err) {
3765
+ if (isMatrixStartupAbortError(err)) throw err;
3766
+ params.logger.debug?.("Failed to inspect matrix device hygiene (non-fatal)", { error: String(err) });
3767
+ }
3768
+ try {
3769
+ throwIfMatrixStartupAborted(params.abortSignal);
3770
+ const startupVerification = await runtimeDeps.ensureMatrixStartupVerification({
3771
+ client: params.client,
3772
+ auth: params.auth,
3773
+ accountConfig: params.accountConfig,
3774
+ env: params.env
3775
+ });
3776
+ throwIfMatrixStartupAborted(params.abortSignal);
3777
+ if (startupVerification.kind === "verified") params.logger.info("matrix: device is verified by its owner and ready for encrypted rooms");
3778
+ else if (startupVerification.kind === "disabled" || startupVerification.kind === "cooldown" || startupVerification.kind === "pending" || startupVerification.kind === "request-failed") {
3779
+ params.logger.info("matrix: device not verified — run 'openclaw matrix verify device <key>' to enable E2EE");
3780
+ if (startupVerification.kind === "pending") params.logger.info("matrix: startup verification request is already pending; finish it in another Matrix client");
3781
+ else if (startupVerification.kind === "cooldown") params.logVerboseMessage(`matrix: skipped startup verification request due to cooldown (retryAfterMs=${startupVerification.retryAfterMs ?? 0})`);
3782
+ else if (startupVerification.kind === "request-failed") params.logger.debug?.("Matrix startup verification request failed (non-fatal)", { error: startupVerification.error ?? "unknown" });
3783
+ } else if (startupVerification.kind === "requested") params.logger.info("matrix: device not verified — requested verification in another Matrix client");
3784
+ } catch (err) {
3785
+ if (isMatrixStartupAbortError(err)) throw err;
3786
+ params.logger.debug?.("Failed to resolve matrix verification status (non-fatal)", { error: String(err) });
3787
+ }
3788
+ }
3789
+ //#endregion
3790
+ //#region extensions/matrix/src/matrix/monitor/status.ts
3791
+ function cloneLastDisconnect(value) {
3792
+ if (!value || typeof value === "string") return value ?? null;
3793
+ return { ...value };
3794
+ }
3795
+ function formatSyncError(error) {
3796
+ if (!error) return null;
3797
+ if (error instanceof Error) return error.message || error.name || "unknown";
3798
+ return formatErrorMessage(error);
3799
+ }
3800
+ function createMatrixMonitorStatusController(params) {
3801
+ const status = {
3802
+ accountId: params.accountId,
3803
+ ...params.baseUrl ? { baseUrl: params.baseUrl } : {},
3804
+ connected: false,
3805
+ lastConnectedAt: null,
3806
+ lastDisconnect: null,
3807
+ lastError: null,
3808
+ healthState: "starting",
3809
+ lifecycle: "starting"
3810
+ };
3811
+ const emit = () => {
3812
+ params.statusSink?.({
3813
+ ...status,
3814
+ lastDisconnect: cloneLastDisconnect(status.lastDisconnect)
3815
+ });
3816
+ };
3817
+ const noteConnected = (at = Date.now(), options) => {
3818
+ const lastConnectedAt = status.connected === true ? status.lastConnectedAt ?? at : at;
3819
+ Object.assign(status, channelReadyPatch({
3820
+ lastConnectedAt,
3821
+ lastEventAt: at,
3822
+ lastDisconnect: null,
3823
+ healthState: "healthy"
3824
+ }));
3825
+ if (options?.transportActivity) Object.assign(status, createTransportActivityStatusPatch(at));
3826
+ emit();
3827
+ };
3828
+ const noteDisconnected = (paramsLocal) => {
3829
+ const at = paramsLocal.at ?? Date.now();
3830
+ const tokenInvalidated = isMatrixAccessTokenInvalidatedError(paramsLocal.error);
3831
+ if (status.lifecycle === "blocked" && status.terminalDisconnect === true && !tokenInvalidated) {
3832
+ status.connected = false;
3833
+ status.lastEventAt = at;
3834
+ emit();
3835
+ return;
3836
+ }
3837
+ const error = formatSyncError(paramsLocal.error);
3838
+ status.connected = false;
3839
+ status.lastEventAt = at;
3840
+ status.lastDisconnect = {
3841
+ at,
3842
+ ...error ? { error } : {}
3843
+ };
3844
+ status.healthState = paramsLocal.state.toLowerCase();
3845
+ if (tokenInvalidated) Object.assign(status, channelBlockedPatch(error ?? "Matrix access token invalidated"));
3846
+ else {
3847
+ status.lastError = error;
3848
+ status.lifecycle = "recovering";
3849
+ status.terminalDisconnect = void 0;
3850
+ }
3851
+ emit();
3852
+ };
3853
+ emit();
3854
+ return {
3855
+ noteSyncState(state, error, at = Date.now()) {
3856
+ if (isMatrixReadySyncState(state)) {
3857
+ noteConnected(at, { transportActivity: state === "SYNCING" });
3858
+ return;
3859
+ }
3860
+ if (isMatrixDisconnectedSyncState(state)) {
3861
+ noteDisconnected({
3862
+ state,
3863
+ at,
3864
+ error
3865
+ });
3866
+ return;
3867
+ }
3868
+ status.lastEventAt = at;
3869
+ status.healthState = state.toLowerCase();
3870
+ emit();
3871
+ },
3872
+ noteUnexpectedError(error, at = Date.now()) {
3873
+ noteDisconnected({
3874
+ state: "ERROR",
3875
+ at,
3876
+ error
3877
+ });
3878
+ },
3879
+ markStopped(at = Date.now()) {
3880
+ if (status.lifecycle !== "blocked" && status.healthState !== "error") Object.assign(status, channelStoppedPatch({
3881
+ lastEventAt: at,
3882
+ healthState: "stopped"
3883
+ }));
3884
+ else {
3885
+ status.connected = false;
3886
+ status.lastEventAt = at;
3887
+ }
3888
+ emit();
3889
+ }
3890
+ };
3891
+ }
3892
+ //#endregion
3893
+ //#region extensions/matrix/src/matrix/monitor/sync-lifecycle.ts
3894
+ function formatSyncLifecycleError(state, error) {
3895
+ if (error instanceof Error) return error;
3896
+ const message = typeof error === "string" && error.trim() ? error.trim() : void 0;
3897
+ if (state === "STOPPED") return new Error(message ?? "Matrix sync stopped unexpectedly");
3898
+ return new Error(message ?? `Matrix sync entered ${state} unexpectedly`);
3899
+ }
3900
+ function createMatrixMonitorSyncLifecycle(params) {
3901
+ let fatalError = null;
3902
+ let resolveFatalWait = null;
3903
+ let rejectFatalWait = null;
3904
+ const settleFatal = (error) => {
3905
+ if (fatalError) return;
3906
+ fatalError = error;
3907
+ rejectFatalWait?.(error);
3908
+ resolveFatalWait = null;
3909
+ rejectFatalWait = null;
3910
+ };
3911
+ const onSyncState = (state, _prevState, error) => {
3912
+ if (isMatrixTerminalSyncState(state) && !params.isStopping?.()) {
3913
+ const fatalErrorLocal = formatSyncLifecycleError(state, error);
3914
+ params.statusController.noteUnexpectedError(fatalErrorLocal);
3915
+ settleFatal(fatalErrorLocal);
3916
+ return;
3917
+ }
3918
+ if (fatalError) return;
3919
+ if (params.isStopping?.() && !isMatrixTerminalSyncState(state)) return;
3920
+ params.statusController.noteSyncState(state, error);
3921
+ };
3922
+ const onUnexpectedError = (error) => {
3923
+ if (params.isStopping?.()) return;
3924
+ params.statusController.noteUnexpectedError(error);
3925
+ settleFatal(error);
3926
+ };
3927
+ params.client.on("sync.state", onSyncState);
3928
+ params.client.on("sync.unexpected_error", onUnexpectedError);
3929
+ return {
3930
+ async waitForFatalStop() {
3931
+ if (fatalError) throw fatalError;
3932
+ if (resolveFatalWait || rejectFatalWait) throw new Error("Matrix fatal-stop wait already in progress");
3933
+ await new Promise((resolve, reject) => {
3934
+ resolveFatalWait = resolve;
3935
+ rejectFatalWait = (error) => reject(error);
3936
+ });
3937
+ },
3938
+ dispose() {
3939
+ resolveFatalWait?.();
3940
+ resolveFatalWait = null;
3941
+ rejectFatalWait = null;
3942
+ params.client.off("sync.state", onSyncState);
3943
+ params.client.off("sync.unexpected_error", onUnexpectedError);
3944
+ }
3945
+ };
3946
+ }
3947
+ //#endregion
3948
+ //#region extensions/matrix/src/matrix/monitor/index.ts
3949
+ function resolveMatrixStreamingMode(streaming) {
3950
+ const mode = streaming?.mode;
3951
+ if (mode === "partial" || mode === "quiet" || mode === "progress") return mode;
3952
+ return "off";
3953
+ }
3954
+ function resolveMatrixPreviewToolProgressEnabled(streaming) {
3955
+ const mode = resolveMatrixStreamingMode(streaming);
3956
+ if (mode === "off") return false;
3957
+ if (mode === "progress") return streaming?.progress?.toolProgress ?? streaming?.preview?.toolProgress ?? false;
3958
+ return streaming?.preview?.toolProgress ?? true;
3959
+ }
3960
+ const DEFAULT_MEDIA_MAX_MB = 20;
3961
+ async function monitorMatrixProvider(opts = {}) {
3962
+ if (opts.abortSignal?.aborted) return;
3963
+ const core = getMatrixRuntime();
3964
+ let cfg = core.config.current();
3965
+ if (cfg.channels?.["matrix"]?.enabled === false) return;
3966
+ const logger = core.logging.getChildLogger({ module: "matrix-auto-reply" });
3967
+ const runtime = opts.runtime ?? {
3968
+ log: (...args) => {
3969
+ logger.info(format(...args));
3970
+ },
3971
+ error: (...args) => {
3972
+ logger.error(format(...args));
3973
+ },
3974
+ exit: (code) => {
3975
+ throw new Error(`exit ${code}`);
3976
+ }
3977
+ };
3978
+ const logVerboseMessage = (message) => {
3979
+ if (!core.logging.shouldLogVerbose()) return;
3980
+ logger.debug?.(message);
3981
+ };
3982
+ const effectiveAccountId = resolveMatrixAuthContext({
3983
+ cfg,
3984
+ accountId: opts.accountId
3985
+ }).accountId;
3986
+ const accountConfig = resolveMatrixAccountConfig({
3987
+ cfg,
3988
+ accountId: effectiveAccountId
3989
+ });
3990
+ const allowlistOnly = accountConfig.allowlistOnly === true;
3991
+ const accountAllowBots = accountConfig.allowBots;
3992
+ let roomsConfig = accountConfig.groups ?? accountConfig.rooms;
3993
+ let needsRoomAliasesForConfig = false;
3994
+ const initialAllowFrom = (accountConfig.dm?.allowFrom ?? []).map(String);
3995
+ const initialGroupAllowFrom = (accountConfig.groupAllowFrom ?? []).map(String);
3996
+ const { allowFrom, allowFromResolvedEntries, groupAllowFrom, groupAllowFromResolvedEntries, roomsConfig: resolvedRoomsConfig } = await resolveMatrixMonitorConfig({
3997
+ cfg,
3998
+ accountId: effectiveAccountId,
3999
+ allowFrom: initialAllowFrom,
4000
+ groupAllowFrom: initialGroupAllowFrom,
4001
+ roomsConfig,
4002
+ runtime
4003
+ });
4004
+ roomsConfig = resolvedRoomsConfig;
4005
+ needsRoomAliasesForConfig = Boolean(roomsConfig && Object.keys(roomsConfig).some((key) => key.trim().startsWith("#")));
4006
+ cfg = {
4007
+ ...cfg,
4008
+ channels: {
4009
+ ...cfg.channels,
4010
+ matrix: {
4011
+ ...cfg.channels?.["matrix"],
4012
+ dm: {
4013
+ ...cfg.channels?.["matrix"]?.dm,
4014
+ allowFrom
4015
+ },
4016
+ groupAllowFrom,
4017
+ ...roomsConfig ? { groups: roomsConfig } : {}
4018
+ }
4019
+ }
4020
+ };
4021
+ const auth = await resolveMatrixAuth({
4022
+ cfg,
4023
+ accountId: effectiveAccountId
4024
+ });
4025
+ if (opts.abortSignal?.aborted) return;
4026
+ const configuredBotUserIds = await resolveConfiguredMatrixBotUserIds({
4027
+ cfg,
4028
+ accountId: effectiveAccountId,
4029
+ abortSignal: opts.abortSignal
4030
+ });
4031
+ if (opts.abortSignal?.aborted) return;
4032
+ const resolvedInitialSyncLimit = resolveOptionalIntegerOption(opts.initialSyncLimit, { min: 0 }) ?? auth.initialSyncLimit;
4033
+ const authWithLimit = resolvedInitialSyncLimit === auth.initialSyncLimit ? auth : {
4034
+ ...auth,
4035
+ initialSyncLimit: resolvedInitialSyncLimit
4036
+ };
4037
+ const statusController = createMatrixMonitorStatusController({
4038
+ accountId: auth.accountId,
4039
+ baseUrl: auth.homeserver,
4040
+ statusSink: opts.setStatus
4041
+ });
4042
+ let cleanedUp = false;
4043
+ let cleanupPromise = null;
4044
+ let client = null;
4045
+ let clientLease = null;
4046
+ let monitorLifecycleSignal = opts.abortSignal;
4047
+ let threadBindingManager = null;
4048
+ const monitorTaskRunner = createMatrixMonitorTaskRunner({
4049
+ logger,
4050
+ logVerboseMessage
4051
+ });
4052
+ let disposeAutoJoin = () => {};
4053
+ let disposeMonitorEvents = () => {};
4054
+ let syncLifecycle = null;
4055
+ let monitorSetupClosed = false;
4056
+ const cleanup = (mode = "persist") => {
4057
+ if (cleanupPromise) return cleanupPromise;
4058
+ cleanedUp = true;
4059
+ cleanupPromise = (async () => {
4060
+ try {
4061
+ await clientLease?.release({ mode });
4062
+ } finally {
4063
+ statusController.markStopped();
4064
+ }
4065
+ })();
4066
+ return cleanupPromise;
4067
+ };
4068
+ const defaultGroupPolicy = resolveDefaultGroupPolicy(cfg);
4069
+ const { groupPolicy: groupPolicyRaw, providerMissingFallbackApplied } = resolveAllowlistProviderRuntimeGroupPolicy({
4070
+ providerConfigPresent: cfg.channels?.["matrix"] !== void 0,
4071
+ groupPolicy: accountConfig.groupPolicy,
4072
+ defaultGroupPolicy
4073
+ });
4074
+ warnMissingProviderGroupPolicyFallbackOnce({
4075
+ providerMissingFallbackApplied,
4076
+ providerKey: "matrix",
4077
+ accountId: effectiveAccountId,
4078
+ blockedLabel: GROUP_POLICY_BLOCKED_LABEL.room,
4079
+ log: (message) => logVerboseMessage(message)
4080
+ });
4081
+ const groupPolicy = allowlistOnly && groupPolicyRaw === "open" ? "allowlist" : groupPolicyRaw;
4082
+ const replyToMode = opts.replyToMode ?? accountConfig.replyToMode ?? "off";
4083
+ const threadReplies = accountConfig.threadReplies ?? "inbound";
4084
+ const dmThreadReplies = accountConfig.dm?.threadReplies;
4085
+ const threadBindingIdleTimeoutMs = resolveThreadBindingIdleTimeoutMsForChannel({
4086
+ cfg,
4087
+ channel: "matrix",
4088
+ accountId: effectiveAccountId
4089
+ });
4090
+ const threadBindingMaxAgeMs = resolveThreadBindingMaxAgeMsForChannel({
4091
+ cfg,
4092
+ channel: "matrix",
4093
+ accountId: effectiveAccountId
4094
+ });
4095
+ const dmConfig = accountConfig.dm;
4096
+ const dmEnabled = dmConfig?.enabled ?? true;
4097
+ const dmPolicyRaw = dmConfig?.policy ?? "pairing";
4098
+ const dmPolicy = allowlistOnly && dmPolicyRaw !== "disabled" ? "allowlist" : dmPolicyRaw;
4099
+ const dmSessionScope = dmConfig?.sessionScope ?? "per-user";
4100
+ const historyLimit = resolvePromptHistoryLimit(accountConfig.historyLimit ?? cfg.messages?.groupChat?.historyLimit, 0);
4101
+ const mediaMaxMb = opts.mediaMaxMb ?? accountConfig.mediaMaxMb ?? DEFAULT_MEDIA_MAX_MB;
4102
+ const mediaMaxBytes = Math.max(1, mediaMaxMb) * 1024 * 1024;
4103
+ const streaming = resolveMatrixStreamingMode(accountConfig.streaming);
4104
+ const previewToolProgressEnabled = resolveMatrixPreviewToolProgressEnabled(accountConfig.streaming);
4105
+ const blockStreamingEnabled = resolveChannelStreamingBlockEnabled(accountConfig) === true;
4106
+ const startupMs = Date.now();
4107
+ const startupGraceMs = 0;
4108
+ const warnedEncryptedRooms = /* @__PURE__ */ new Set();
4109
+ const warnedCryptoMissingRooms = /* @__PURE__ */ new Set();
4110
+ let healthySyncSinceMs;
4111
+ const noteSyncHealthState = (state, at = Date.now()) => {
4112
+ if (isMatrixReadySyncState(state)) {
4113
+ healthySyncSinceMs ??= at;
4114
+ return;
4115
+ }
4116
+ if (isMatrixDisconnectedSyncState(state)) healthySyncSinceMs = void 0;
4117
+ };
4118
+ const onSyncState = (state) => {
4119
+ noteSyncHealthState(state);
4120
+ };
4121
+ const monitorRetirement = {
4122
+ closeTaskAdmission: () => {
4123
+ monitorSetupClosed = true;
4124
+ monitorTaskRunner.close();
4125
+ },
4126
+ detachListeners: () => {
4127
+ disposeAutoJoin();
4128
+ disposeMonitorEvents();
4129
+ client?.off("sync.state", onSyncState);
4130
+ syncLifecycle?.dispose();
4131
+ },
4132
+ waitForTasks: monitorTaskRunner.waitForIdle,
4133
+ cleanup: () => threadBindingManager?.stop()
4134
+ };
4135
+ try {
4136
+ clientLease = await acquireSharedMatrixClient({
4137
+ cfg,
4138
+ auth: authWithLimit,
4139
+ startClient: false,
4140
+ accountId: auth.accountId,
4141
+ abortSignal: opts.abortSignal,
4142
+ role: "monitor"
4143
+ });
4144
+ client = clientLease.client;
4145
+ monitorLifecycleSignal = opts.abortSignal ? AbortSignal.any([opts.abortSignal, clientLease.abortSignal]) : clientLease.abortSignal;
4146
+ clientLease.registerMonitorRetirement(monitorRetirement);
4147
+ const inboundDeduper = createMatrixInboundEventDeduper({
4148
+ auth,
4149
+ env: process.env
4150
+ });
4151
+ syncLifecycle = createMatrixMonitorSyncLifecycle({
4152
+ client,
4153
+ statusController,
4154
+ isStopping: () => cleanedUp || monitorLifecycleSignal?.aborted === true
4155
+ });
4156
+ client.on("sync.state", onSyncState);
4157
+ const dropPreStartupMessages = !client.hasPersistedSyncState();
4158
+ const { getRoomInfo, getMemberDisplayName, invalidateMemberDisplayName } = createMatrixRoomInfoResolver(client);
4159
+ const isExplicitlyConfiguredRoom = async (roomId) => {
4160
+ const roomInfoForConfig = needsRoomAliasesForConfig ? await getRoomInfo(roomId, { includeAliases: true }) : void 0;
4161
+ const aliases = roomInfoForConfig ? [roomInfoForConfig.canonicalAlias ?? "", ...roomInfoForConfig.altAliases].filter(Boolean) : [];
4162
+ return resolveMatrixRoomConfig({
4163
+ rooms: roomsConfig,
4164
+ roomId,
4165
+ aliases
4166
+ }).matchSource === "direct";
4167
+ };
4168
+ const canPromoteRecentInvite = async (roomId) => shouldPromoteRecentInviteRoom({
4169
+ roomId,
4170
+ roomInfo: await getRoomInfo(roomId, { includeAliases: true }),
4171
+ rooms: roomsConfig
4172
+ });
4173
+ const directTracker = createDirectRoomTracker(client, {
4174
+ log: logVerboseMessage,
4175
+ isExplicitlyConfiguredRoom,
4176
+ canPromoteRecentInvite,
4177
+ canPromoteUnmappedStrictRoom: dmSessionScope === "per-room" ? canPromoteRecentInvite : void 0,
4178
+ shouldKeepLocallyPromotedDirectRoom: async (roomId) => {
4179
+ try {
4180
+ const roomInfo = await getRoomInfo(roomId, { includeAliases: true });
4181
+ if (!roomInfo.nameResolved || !roomInfo.aliasesResolved) return;
4182
+ return shouldPromoteRecentInviteRoom({
4183
+ roomId,
4184
+ roomInfo,
4185
+ rooms: roomsConfig
4186
+ });
4187
+ } catch (err) {
4188
+ logVerboseMessage(`matrix: local promotion revalidation failed room=${roomId} (${String(err)})`);
4189
+ return;
4190
+ }
4191
+ }
4192
+ });
4193
+ disposeAutoJoin = registerMatrixAutoJoin({
4194
+ client,
4195
+ accountConfig,
4196
+ runtime,
4197
+ runDetachedTask: monitorTaskRunner.runDetachedTask
4198
+ });
4199
+ const handleRoomMessage = createMatrixRoomMessageHandler({
4200
+ client,
4201
+ core,
4202
+ cfg,
4203
+ accountId: effectiveAccountId,
4204
+ accountConfig,
4205
+ runtime,
4206
+ logger,
4207
+ logVerboseMessage,
4208
+ allowFrom,
4209
+ allowFromResolvedEntries,
4210
+ groupAllowFrom,
4211
+ groupAllowFromResolvedEntries,
4212
+ roomsConfig,
4213
+ accountAllowBots,
4214
+ configuredBotUserIds,
4215
+ groupPolicy,
4216
+ replyToMode,
4217
+ threadReplies,
4218
+ dmThreadReplies,
4219
+ dmSessionScope,
4220
+ streaming,
4221
+ previewToolProgressEnabled,
4222
+ blockStreamingEnabled,
4223
+ dmEnabled,
4224
+ dmPolicy,
4225
+ mediaMaxBytes,
4226
+ historyLimit,
4227
+ startupMs,
4228
+ startupGraceMs,
4229
+ dropPreStartupMessages,
4230
+ inboundDeduper,
4231
+ directTracker,
4232
+ getRoomInfo,
4233
+ getMemberDisplayName,
4234
+ needsRoomAliasesForConfig
4235
+ });
4236
+ const createdThreadBindingManager = await createMatrixThreadBindingManager({
4237
+ cfg,
4238
+ accountId: effectiveAccountId,
4239
+ auth,
4240
+ client,
4241
+ env: process.env,
4242
+ idleTimeoutMs: threadBindingIdleTimeoutMs,
4243
+ maxAgeMs: threadBindingMaxAgeMs,
4244
+ logVerboseMessage
4245
+ });
4246
+ if (monitorSetupClosed) {
4247
+ await createdThreadBindingManager.stop();
4248
+ await cleanup("stop");
4249
+ return;
4250
+ }
4251
+ threadBindingManager = createdThreadBindingManager;
4252
+ logVerboseMessage(`matrix: thread bindings ready account=${threadBindingManager.accountId} idleMs=${threadBindingIdleTimeoutMs} maxAgeMs=${threadBindingMaxAgeMs}`);
4253
+ disposeMonitorEvents = registerMatrixMonitorEvents({
4254
+ cfg,
4255
+ client,
4256
+ auth,
4257
+ allowFrom,
4258
+ dmEnabled,
4259
+ dmPolicy,
4260
+ readStoreAllowFrom: async () => await core.channel.pairing.readAllowFromStore({
4261
+ channel: "matrix",
4262
+ env: process.env,
4263
+ accountId: effectiveAccountId
4264
+ }).catch(() => []),
4265
+ directTracker,
4266
+ groupPolicy,
4267
+ roomsConfig,
4268
+ needsRoomAliasesForConfig,
4269
+ getRoomInfo,
4270
+ invalidateMemberDisplayName,
4271
+ logVerboseMessage,
4272
+ warnedEncryptedRooms,
4273
+ warnedCryptoMissingRooms,
4274
+ logger,
4275
+ startupGraceMs,
4276
+ getHealthySyncSinceMs: () => healthySyncSinceMs,
4277
+ formatNativeDependencyHint: core.system.formatNativeDependencyHint,
4278
+ onRoomMessage: handleRoomMessage,
4279
+ runDetachedTask: monitorTaskRunner.runDetachedTask
4280
+ });
4281
+ logVerboseMessage("matrix: starting client");
4282
+ await clientLease.start(monitorLifecycleSignal);
4283
+ if (monitorSetupClosed) {
4284
+ await cleanup("stop");
4285
+ return;
4286
+ }
4287
+ logVerboseMessage("matrix: client started");
4288
+ logger.info(`matrix: logged in as ${auth.userId}`);
4289
+ monitorTaskRunner.runDetachedTask("deviceId backfill", async () => {
4290
+ const taskSignal = getMatrixMonitorTaskSignal();
4291
+ await backfillMatrixAuthDeviceIdAfterStartup({
4292
+ auth,
4293
+ env: process.env,
4294
+ abortSignal: taskSignal && monitorLifecycleSignal ? AbortSignal.any([taskSignal, monitorLifecycleSignal]) : taskSignal ?? monitorLifecycleSignal
4295
+ });
4296
+ });
4297
+ registerChannelRuntimeContext({
4298
+ channelRuntime: opts.channelRuntime,
4299
+ channelId: "matrix",
4300
+ accountId: effectiveAccountId,
4301
+ capability: CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY,
4302
+ context: { client },
4303
+ abortSignal: monitorLifecycleSignal
4304
+ });
4305
+ await runMatrixStartupMaintenance({
4306
+ client,
4307
+ auth,
4308
+ accountId: effectiveAccountId,
4309
+ effectiveAccountId,
4310
+ accountConfig,
4311
+ logger,
4312
+ logVerboseMessage,
4313
+ getRuntimeConfig: () => core.config.current(),
4314
+ replaceConfigFile: async (nextCfg) => {
4315
+ await core.config.replaceConfigFile({
4316
+ nextConfig: nextCfg,
4317
+ afterWrite: { mode: "auto" }
4318
+ });
4319
+ },
4320
+ loadWebMedia: async (url, maxBytes) => await core.media.loadWebMedia(url, maxBytes),
4321
+ env: process.env,
4322
+ abortSignal: monitorLifecycleSignal
4323
+ });
4324
+ if (monitorSetupClosed) {
4325
+ await cleanup("stop");
4326
+ return;
4327
+ }
4328
+ await Promise.race([waitUntilAbort(monitorLifecycleSignal, async () => {
4329
+ try {
4330
+ logVerboseMessage("matrix: stopping client");
4331
+ await cleanup();
4332
+ } catch (err) {
4333
+ logger.warn("matrix: failed during monitor shutdown cleanup", { error: String(err) });
4334
+ }
4335
+ }), syncLifecycle.waitForFatalStop()]);
4336
+ await cleanup();
4337
+ } catch (err) {
4338
+ if (monitorSetupClosed) {
4339
+ await cleanup("stop");
4340
+ return;
4341
+ }
4342
+ if (monitorLifecycleSignal?.aborted === true && isMatrixStartupAbortError(err)) {
4343
+ await cleanup("stop");
4344
+ return;
4345
+ }
4346
+ statusController.noteUnexpectedError(err);
4347
+ await cleanup();
4348
+ throw err;
4349
+ }
4350
+ }
4351
+ //#endregion
4352
+ export { monitorMatrixProvider };