@openclaw/matrix 2026.10.2 → 2026.10.5-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/dist/.setup/{account-selection-BDeeqwwR.mjs → account-selection-Bs_jCAaG.mjs} +3 -5
  2. package/dist/.setup/{approval-handler.runtime-QkHLH2az.mjs → approval-handler.runtime-rxLn8CbP.mjs} +60 -83
  3. package/dist/.setup/{channel-CeRXEAEP.mjs → channel-BcwGspPw.mjs} +92 -120
  4. package/dist/.setup/{channel.runtime-DBQA2y1F.mjs → channel.runtime-CUc6rbu1.mjs} +23 -18
  5. package/dist/.setup/{channel.setup-DC2t7_PK.mjs → channel.setup-CwuYD_CT.mjs} +2 -3
  6. package/dist/.setup/{cli-Be8tdNw8.mjs → cli-mbL9jCro.mjs} +80 -120
  7. package/dist/.setup/{cli-metadata-CtcjBFhc.mjs → cli-metadata-6MOGuyHq.mjs} +1 -1
  8. package/dist/.setup/{client-DY3HExqI.mjs → client-BlTvpEWC.mjs} +2 -2
  9. package/dist/.setup/{client-bootstrap-CZvJjr29.mjs → client-bootstrap-D05xy1HB.mjs} +2 -3
  10. package/dist/.setup/{client-support-D7BlioUb.mjs → client-support-D-xHScuo.mjs} +1 -1
  11. package/dist/.setup/{client-kmih04ng.mjs → client-vPPbaxNp.mjs} +14 -24
  12. package/dist/.setup/{create-client-CbJVyFDy.mjs → create-client-CroC4BVc.mjs} +4 -4
  13. package/dist/.setup/{credentials-C2dvc_kB.mjs → credentials-Bf9PQ7xs.mjs} +4 -18
  14. package/dist/.setup/{crypto-runtime-B2AjWo-i.mjs → crypto-runtime-CpJ0b7vY.mjs} +80 -123
  15. package/dist/.setup/{deps-CFNl7tQo.mjs → deps-L_1bUAGL.mjs} +20 -37
  16. package/dist/.setup/{direct-management-DJtQhLKH.mjs → direct-management-B3wYhx_M.mjs} +25 -51
  17. package/dist/.setup/{directory-live-DW5UykLL.mjs → directory-live-B1WbfSHo.mjs} +3 -3
  18. package/dist/.setup/{draft-stream-B87DfA6a.mjs → draft-stream-Bdrh7dRt.mjs} +2 -3
  19. package/dist/.setup/{encryption-guidance-BEjKbiMR.mjs → encryption-guidance-D5_IsDIy.mjs} +1 -1
  20. package/dist/.setup/{env-vars-dGqak9dN.mjs → env-vars-aEBngJPa.mjs} +2 -17
  21. package/dist/.setup/{event-helpers-CspuhE9k.mjs → event-helpers-CxNgMQqH.mjs} +5 -7
  22. package/dist/.setup/{exec-approvals-BLDAMyHs.mjs → exec-approvals-BgNWWJg1.mjs} +6 -12
  23. package/dist/.setup/{file-sync-store-Clc9iEdn.mjs → file-sync-store-BdKx_gMi.mjs} +2 -5
  24. package/dist/.setup/{http-client-DfJY5Ck0.mjs → http-client-ByR4STVQ.mjs} +55 -59
  25. package/dist/.setup/{messages-uCbwLRKS.mjs → messages-B1CZqU8u.mjs} +4 -16
  26. package/dist/.setup/{monitor-skIntQVG.mjs → monitor-Dk_fQL1k.mjs} +176 -232
  27. package/dist/.setup/{onboarding-Cm_tOJxs.mjs → onboarding-CrSexor_.mjs} +33 -50
  28. package/dist/.setup/{outbound-CqQou3ny.mjs → outbound-LR3SqPIq.mjs} +2 -2
  29. package/dist/.setup/{profile-update-C1n8SRqH.mjs → profile-update-C7bjaGR6.mjs} +2 -3
  30. package/dist/.setup/{reaction-events-Cqq46xsG.mjs → reaction-events-CTSvOlXO.mjs} +4 -4
  31. package/dist/.setup/{resolve-targets-DFeU1Ww6.mjs → resolve-targets-BVVbbvP6.mjs} +15 -21
  32. package/dist/.setup/{retired-state-BXUQ2I-C.mjs → retired-state-DW5pLH05.mjs} +22 -3
  33. package/dist/.setup/{room-info-BPMbwe8I.mjs → room-info-9Uqlpt1V.mjs} +4 -4
  34. package/dist/.setup/{sdk-CgQGkCsS.mjs → sdk-Cfc6m7fY.mjs} +115 -195
  35. package/dist/.setup/{secret-contract-JlB6VmI3.mjs → secret-contract-DSBRvhdZ.mjs} +1 -1
  36. package/dist/.setup/{secret-contract-api-B-iJoQEv.mjs → secret-contract-api-DzEJ-X7n.mjs} +1 -1
  37. package/dist/.setup/{send-B1Y2L4wj.mjs → send-LCOuTVc1.mjs} +10 -30
  38. package/dist/.setup/{setup-bootstrap-UNIGyKnk.mjs → setup-bootstrap-CV-hHBXu.mjs} +2 -2
  39. package/dist/.setup/setup-core-CKnNTfgD.mjs +673 -0
  40. package/dist/.setup/{setup-plugin-api-BRs9bcp4.mjs → setup-plugin-api-BDAYk1a5.mjs} +1 -1
  41. package/dist/.setup/{startup-verification-D00eUt74.mjs → startup-verification-CgfUb4yJ.mjs} +3 -3
  42. package/dist/.setup/{storage-D7agewjH.mjs → storage-DkC6bHgA.mjs} +24 -49
  43. package/dist/.setup/{subagent-hooks-D5kd_kzN.mjs → subagent-hooks-D8jyeQsO.mjs} +1 -1
  44. package/dist/.setup/{sync-cache-state-C2z64uyk.mjs → sync-cache-state-D4G-fi3t.mjs} +20 -33
  45. package/dist/.setup/{target-ids-Nwx7cMVE.mjs → target-ids-HhcaKX1n.mjs} +15 -1
  46. package/dist/.setup/{thread-binding-api-DRMC62cs.mjs → thread-binding-api-BvuaKpd0.mjs} +1 -1
  47. package/dist/.setup/{thread-bindings-DveHVZqN.mjs → thread-bindings-CT4P-OSZ.mjs} +38 -58
  48. package/dist/.setup/{thread-bindings-shared-hxKkYC1W.mjs → thread-bindings-shared-CbsFNbAY.mjs} +19 -37
  49. package/dist/.setup/{tool-actions-BqlK2ilM.mjs → tool-actions-DAp6_XSJ.mjs} +17 -18
  50. package/dist/.setup/{verification-kMlFYUn0.mjs → verification-B3VswneT.mjs} +15 -21
  51. package/dist/api.js +7 -7
  52. package/dist/channel-plugin-api.js +1 -1
  53. package/dist/cli-metadata.js +1 -1
  54. package/dist/contract-api.js +2 -2
  55. package/dist/doctor-contract-api.js +13 -22
  56. package/dist/helper-api.js +2 -2
  57. package/dist/index.js +1 -1
  58. package/dist/plugin-entry.handlers.runtime.js +2 -2
  59. package/dist/runtime-api.js +4 -4
  60. package/dist/secret-contract-api.js +1 -1
  61. package/dist/session-binding-contract-api.js +1 -1
  62. package/dist/setup-entry.js +2 -2
  63. package/dist/setup-plugin-api.js +1 -1
  64. package/dist/subagent-hooks-api.js +1 -1
  65. package/dist/thread-binding-api.js +1 -1
  66. package/dist/thread-bindings-runtime.js +1 -1
  67. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/package.json +1 -1
  68. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm.d.ts +129 -129
  69. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.cjs +688 -688
  70. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.js +512 -512
  71. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm +0 -0
  72. package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts +84 -84
  73. package/node_modules/@openclaw/fs-safe/CHANGELOG.md +35 -0
  74. package/node_modules/@openclaw/fs-safe/README.md +1 -1
  75. package/node_modules/@openclaw/fs-safe/dist/advanced.d.ts +1 -1
  76. package/node_modules/@openclaw/fs-safe/dist/advanced.js +1 -1
  77. package/node_modules/@openclaw/fs-safe/dist/archive-durability.js +1 -1
  78. package/node_modules/@openclaw/fs-safe/dist/archive-merge.js +4 -4
  79. package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
  80. package/node_modules/@openclaw/fs-safe/dist/archive-read.js +5 -4
  81. package/node_modules/@openclaw/fs-safe/dist/archive-staging.d.ts +1 -1
  82. package/node_modules/@openclaw/fs-safe/dist/archive-staging.js +22 -38
  83. package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.d.ts +17 -0
  84. package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.js +117 -0
  85. package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.d.ts +8 -5
  86. package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.js +27 -50
  87. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.d.ts +3 -0
  88. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-acquire.js +57 -11
  89. package/node_modules/@openclaw/fs-safe/dist/guarded-mutation.js +5 -5
  90. package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +52 -5
  91. package/node_modules/@openclaw/fs-safe/dist/guest.js +1 -1
  92. package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +1 -0
  93. package/node_modules/@openclaw/fs-safe/dist/native-operations.d.ts +0 -1
  94. package/node_modules/@openclaw/fs-safe/dist/native-operations.js +22 -26
  95. package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +5 -1
  96. package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +4 -1
  97. package/node_modules/@openclaw/fs-safe/dist/permission-exec.js +2 -1
  98. package/node_modules/@openclaw/fs-safe/dist/pinned-write-types.d.ts +6 -1
  99. package/node_modules/@openclaw/fs-safe/dist/private-temp-workspace.js +2 -2
  100. package/node_modules/@openclaw/fs-safe/dist/publish-file.js +34 -7
  101. package/node_modules/@openclaw/fs-safe/dist/replace-file-copy-fallback.js +1 -4
  102. package/node_modules/@openclaw/fs-safe/dist/replace-file-descriptor.js +6 -0
  103. package/node_modules/@openclaw/fs-safe/dist/root-create-input.d.ts +15 -1
  104. package/node_modules/@openclaw/fs-safe/dist/root-create-input.js +4 -0
  105. package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +1 -1
  106. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +0 -1
  107. package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +6 -12
  108. package/node_modules/@openclaw/fs-safe/dist/root-impl.js +15 -15
  109. package/node_modules/@openclaw/fs-safe/dist/root-paths.js +1 -1
  110. package/node_modules/@openclaw/fs-safe/dist/root-walk.js +4 -4
  111. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.d.ts +10 -1
  112. package/node_modules/@openclaw/fs-safe/dist/root-write-verification.js +20 -0
  113. package/node_modules/@openclaw/fs-safe/dist/secure-temp-dir.js +19 -7
  114. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-acquire.js +25 -3
  115. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-admission.d.ts +2 -0
  116. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.d.ts +14 -0
  117. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock-retained.js +187 -0
  118. package/node_modules/@openclaw/fs-safe/dist/sidecar-lock.js +15 -1
  119. package/node_modules/@openclaw/fs-safe/dist/temp-directory-diagnostics.d.ts +10 -0
  120. package/node_modules/@openclaw/fs-safe/dist/temp-directory-diagnostics.js +29 -0
  121. package/node_modules/@openclaw/fs-safe/dist/temp-target.js +1 -1
  122. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-admission.js +6 -6
  123. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.d.ts +4 -4
  124. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-child-admission.js +17 -16
  125. package/node_modules/@openclaw/fs-safe/dist/temp-workspace-descriptor.js +20 -28
  126. package/node_modules/@openclaw/fs-safe/dist/walk.js +2 -13
  127. package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +2 -2
  128. package/node_modules/@openclaw/fs-safe/dist/watch-native.js +3 -1
  129. package/node_modules/@openclaw/fs-safe/dist/watch-rescan.js +3 -9
  130. package/node_modules/@openclaw/fs-safe/dist/watch.js +2 -3
  131. package/node_modules/@openclaw/fs-safe/docs/advanced.md +1 -1
  132. package/node_modules/@openclaw/fs-safe/docs/archive.md +3 -0
  133. package/node_modules/@openclaw/fs-safe/docs/atomic.md +11 -3
  134. package/node_modules/@openclaw/fs-safe/docs/contributing.md +1 -1
  135. package/node_modules/@openclaw/fs-safe/docs/copy.md +48 -0
  136. package/node_modules/@openclaw/fs-safe/docs/guest.md +21 -4
  137. package/node_modules/@openclaw/fs-safe/docs/path-scope.md +4 -0
  138. package/node_modules/@openclaw/fs-safe/docs/sidecar-lock.md +46 -8
  139. package/node_modules/@openclaw/fs-safe/docs/temp.md +12 -0
  140. package/node_modules/@openclaw/fs-safe/docs/watch.md +3 -2
  141. package/node_modules/@openclaw/fs-safe/package.json +15 -15
  142. package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
  143. package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
  144. package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
  145. package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
  146. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
  147. package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
  148. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
  149. package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
  150. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
  151. package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
  152. package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
  153. package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
  154. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
  155. package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
  156. package/node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.d.ts +6 -12
  157. package/node_modules/matrix-widget-api/lib/interfaces/RtcLivekitActions.js.map +1 -1
  158. package/node_modules/matrix-widget-api/package.json +1 -1
  159. package/node_modules/matrix-widget-api/src/interfaces/RtcLivekitActions.ts +6 -13
  160. package/node_modules/music-metadata/README.md +35 -32
  161. package/node_modules/music-metadata/lib/ParserFactory.d.ts +1 -1
  162. package/node_modules/music-metadata/lib/ParserFactory.js +17 -13
  163. package/node_modules/music-metadata/lib/aiff/AiffParser.js +19 -12
  164. package/node_modules/music-metadata/lib/aiff/AiffToken.d.ts +1 -1
  165. package/node_modules/music-metadata/lib/aiff/AiffToken.js +2 -1
  166. package/node_modules/music-metadata/lib/apev2/APEv2Parser.d.ts +4 -3
  167. package/node_modules/music-metadata/lib/apev2/APEv2Parser.js +59 -16
  168. package/node_modules/music-metadata/lib/apev2/APEv2TagMapper.js +1 -0
  169. package/node_modules/music-metadata/lib/apev2/APEv2Token.d.ts +1 -1
  170. package/node_modules/music-metadata/lib/apev2/APEv2Token.js +1 -1
  171. package/node_modules/music-metadata/lib/asf/AsfGuid.js +56 -50
  172. package/node_modules/music-metadata/lib/asf/AsfObject.d.ts +1 -1
  173. package/node_modules/music-metadata/lib/asf/AsfObject.js +3 -2
  174. package/node_modules/music-metadata/lib/asf/AsfParser.js +15 -7
  175. package/node_modules/music-metadata/lib/asf/AsfTagMapper.d.ts +3 -2
  176. package/node_modules/music-metadata/lib/asf/AsfTagMapper.js +21 -4
  177. package/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.d.ts +1 -1
  178. package/node_modules/music-metadata/lib/common/CombinedTagMapper.d.ts +2 -2
  179. package/node_modules/music-metadata/lib/common/CombinedTagMapper.js +6 -6
  180. package/node_modules/music-metadata/lib/common/FourCC.js +3 -2
  181. package/node_modules/music-metadata/lib/common/GenericTagMapper.d.ts +1 -1
  182. package/node_modules/music-metadata/lib/common/GenericTagTypes.js +1 -1
  183. package/node_modules/music-metadata/lib/common/MetadataCollector.d.ts +3 -1
  184. package/node_modules/music-metadata/lib/common/MetadataCollector.js +28 -9
  185. package/node_modules/music-metadata/lib/common/Util.js +25 -17
  186. package/node_modules/music-metadata/lib/core.d.ts +4 -4
  187. package/node_modules/music-metadata/lib/core.js +18 -11
  188. package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.js +29 -16
  189. package/node_modules/music-metadata/lib/dsf/DsfChunk.d.ts +1 -1
  190. package/node_modules/music-metadata/lib/dsf/DsfParser.js +3 -5
  191. package/node_modules/music-metadata/lib/ebml/EbmlIterator.d.ts +1 -1
  192. package/node_modules/music-metadata/lib/ebml/EbmlIterator.js +35 -6
  193. package/node_modules/music-metadata/lib/ebml/types.d.ts +1 -1
  194. package/node_modules/music-metadata/lib/ebml/types.js +1 -1
  195. package/node_modules/music-metadata/lib/flac/FlacParser.d.ts +1 -1
  196. package/node_modules/music-metadata/lib/flac/FlacParser.js +6 -5
  197. package/node_modules/music-metadata/lib/flac/FlacToken.d.ts +1 -1
  198. package/node_modules/music-metadata/lib/flac/FlacToken.js +1 -1
  199. package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.d.ts +1 -1
  200. package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +212 -42
  201. package/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js +5 -5
  202. package/node_modules/music-metadata/lib/id3v2/FrameHeader.d.ts +1 -1
  203. package/node_modules/music-metadata/lib/id3v2/FrameHeader.js +8 -5
  204. package/node_modules/music-metadata/lib/id3v2/FrameParser.d.ts +2 -1
  205. package/node_modules/music-metadata/lib/id3v2/FrameParser.js +54 -23
  206. package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.d.ts +1 -1
  207. package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.js +1 -1
  208. package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.js +3 -3
  209. package/node_modules/music-metadata/lib/id3v2/ID3v2ChapterToken.js +2 -2
  210. package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.d.ts +1 -1
  211. package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js +32 -16
  212. package/node_modules/music-metadata/lib/id3v2/ID3v2Token.d.ts +2 -2
  213. package/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +2 -3
  214. package/node_modules/music-metadata/lib/index.js +6 -3
  215. package/node_modules/music-metadata/lib/lrc/LyricsParser.js +3 -5
  216. package/node_modules/music-metadata/lib/matroska/MatroskaDtd.js +7 -3
  217. package/node_modules/music-metadata/lib/matroska/MatroskaParser.js +22 -11
  218. package/node_modules/music-metadata/lib/matroska/types.d.ts +2 -2
  219. package/node_modules/music-metadata/lib/mp4/Atom.d.ts +4 -3
  220. package/node_modules/music-metadata/lib/mp4/Atom.js +44 -11
  221. package/node_modules/music-metadata/lib/mp4/AtomToken.d.ts +1 -1
  222. package/node_modules/music-metadata/lib/mp4/AtomToken.js +30 -8
  223. package/node_modules/music-metadata/lib/mp4/MP4Parser.d.ts +2 -0
  224. package/node_modules/music-metadata/lib/mp4/MP4Parser.js +79 -54
  225. package/node_modules/music-metadata/lib/mp4/MP4TagMapper.d.ts +2 -2
  226. package/node_modules/music-metadata/lib/mpeg/MpegLoader.js +1 -1
  227. package/node_modules/music-metadata/lib/mpeg/MpegParser.js +41 -19
  228. package/node_modules/music-metadata/lib/mpeg/ReplayGainDataFormat.d.ts +2 -2
  229. package/node_modules/music-metadata/lib/mpeg/ReplayGainDataFormat.js +1 -1
  230. package/node_modules/music-metadata/lib/mpeg/XingTag.d.ts +1 -1
  231. package/node_modules/music-metadata/lib/musepack/MusepackParser.js +2 -2
  232. package/node_modules/music-metadata/lib/musepack/sv7/BitReader.js +1 -1
  233. package/node_modules/music-metadata/lib/musepack/sv7/MpcSv7Parser.js +4 -3
  234. package/node_modules/music-metadata/lib/musepack/sv7/StreamVersion7.js +3 -3
  235. package/node_modules/music-metadata/lib/musepack/sv8/MpcSv8Parser.js +7 -5
  236. package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.js +2 -2
  237. package/node_modules/music-metadata/lib/ogg/OggParser.js +23 -13
  238. package/node_modules/music-metadata/lib/ogg/OggToken.d.ts +2 -0
  239. package/node_modules/music-metadata/lib/ogg/OggToken.js +1 -1
  240. package/node_modules/music-metadata/lib/ogg/flac/FlacStream.d.ts +2 -2
  241. package/node_modules/music-metadata/lib/ogg/flac/FlacStream.js +2 -2
  242. package/node_modules/music-metadata/lib/ogg/opus/OpusStream.d.ts +2 -2
  243. package/node_modules/music-metadata/lib/ogg/opus/OpusStream.js +8 -4
  244. package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.d.ts +2 -2
  245. package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.js +2 -1
  246. package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.d.ts +2 -2
  247. package/node_modules/music-metadata/lib/ogg/vorbis/Vorbis.d.ts +1 -1
  248. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.js +1 -1
  249. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.d.ts +4 -3
  250. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.js +16 -9
  251. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.js +4 -0
  252. package/node_modules/music-metadata/lib/riff/RiffChunk.d.ts +3 -1
  253. package/node_modules/music-metadata/lib/riff/RiffChunk.js +3 -2
  254. package/node_modules/music-metadata/lib/riff/RiffInfoTagMap.d.ts +1 -1
  255. package/node_modules/music-metadata/lib/type.d.ts +3 -3
  256. package/node_modules/music-metadata/lib/type.js +1 -1
  257. package/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +1 -1
  258. package/node_modules/music-metadata/lib/wav/WaveChunk.js +3 -2
  259. package/node_modules/music-metadata/lib/wav/WaveParser.d.ts +6 -2
  260. package/node_modules/music-metadata/lib/wav/WaveParser.js +75 -22
  261. package/node_modules/music-metadata/lib/wavpack/WavPackParser.js +22 -13
  262. package/node_modules/music-metadata/lib/wavpack/WavPackToken.js +3 -2
  263. package/node_modules/music-metadata/package.json +3 -2
  264. package/node_modules/uint8array-extras/index.d.ts +7 -7
  265. package/node_modules/uint8array-extras/index.js +27 -13
  266. package/node_modules/uint8array-extras/package.json +6 -6
  267. package/node_modules/uint8array-extras/readme.md +7 -7
  268. package/package.json +7 -7
  269. package/dist/.setup/accounts-C_r0UlEm.mjs +0 -138
  270. package/dist/.setup/config-update-CZndPxNd.mjs +0 -102
  271. package/dist/.setup/profile-DS0xdJAi.mjs +0 -80
  272. package/dist/.setup/setup-core-6DppLENo.mjs +0 -377
  273. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.d.ts +0 -17
  274. package/node_modules/@openclaw/fs-safe/dist/file-lock-sync-root-arbitration.js +0 -66
  275. package/node_modules/@openclaw/fs-safe/dist/publish-file-native.d.ts +0 -4
  276. package/node_modules/@openclaw/fs-safe/dist/publish-file-native.js +0 -35
  277. package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.d.ts +0 -7
  278. package/node_modules/@openclaw/fs-safe/dist/root-move-preflight.js +0 -16
  279. package/dist/.setup/{errors-DKVS3_DO.mjs → errors-Bw4EHwKX.mjs} +1 -1
@@ -1,377 +0,0 @@
1
- import { u as resolveMatrixEnvAuthReadiness } from "./account-selection-BDeeqwwR.mjs";
2
- import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
3
- import { r as resolveDefaultMatrixAccountId } from "./accounts-C_r0UlEm.mjs";
4
- import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.mjs";
5
- import { n as updateMatrixAccountConfig } from "./config-update-CZndPxNd.mjs";
6
- import { t as isSupportedMatrixAvatarSource } from "./profile-DS0xdJAi.mjs";
7
- import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
- import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
9
- import { DEFAULT_ACCOUNT_ID, addWildcardAllowFrom, applyAccountNameToChannelSection, normalizeAccountId, normalizeAllowFromEntries, normalizeSecretInputString, patchTopLevelChannelConfigSection, prepareScopedSetupConfig, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
10
- import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/routing";
11
- import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
12
- //#region extensions/matrix/src/setup-contract.ts
13
- const matrixSingleAccountKeysToMove = [
14
- "homeserver",
15
- "userId",
16
- "accessToken",
17
- "password",
18
- "deviceId",
19
- "deviceName",
20
- "avatarUrl",
21
- "initialSyncLimit",
22
- "encryption",
23
- "allowlistOnly",
24
- "dangerouslyAllowNameMatching",
25
- "allowBots",
26
- "streaming",
27
- "replyToMode",
28
- "threadReplies",
29
- "textChunkLimit",
30
- "responsePrefix",
31
- "ackReaction",
32
- "ackReactionScope",
33
- "reactionNotifications",
34
- "threadBindings",
35
- "startupVerification",
36
- "startupVerificationCooldownHours",
37
- "mediaMaxMb",
38
- "autoJoin",
39
- "autoJoinAllowlist",
40
- "dm",
41
- "groups",
42
- "rooms",
43
- "actions"
44
- ];
45
- const matrixNamedAccountPromotionKeys = [
46
- "name",
47
- "homeserver",
48
- "userId",
49
- "accessToken",
50
- "password",
51
- "deviceId",
52
- "deviceName",
53
- "avatarUrl",
54
- "initialSyncLimit",
55
- "encryption"
56
- ];
57
- const singleAccountKeysToMove = [...matrixSingleAccountKeysToMove];
58
- const namedAccountPromotionKeys = [...matrixNamedAccountPromotionKeys];
59
- function resolveSingleAccountPromotionTarget(params) {
60
- const accounts = typeof params.channel.accounts === "object" && params.channel.accounts ? params.channel.accounts : {};
61
- const normalizedDefaultAccount = typeof params.channel.defaultAccount === "string" && params.channel.defaultAccount.trim() ? normalizeAccountId$1(params.channel.defaultAccount) : void 0;
62
- const matchedAccountId = normalizedDefaultAccount ? Object.entries(accounts).find(([accountId, value]) => accountId && value && typeof value === "object" && normalizeAccountId$1(accountId) === normalizedDefaultAccount)?.[0] : void 0;
63
- if (matchedAccountId) return matchedAccountId;
64
- if (normalizedDefaultAccount) return DEFAULT_ACCOUNT_ID$1;
65
- const namedAccounts = Object.entries(accounts).filter(([accountId, value]) => accountId && typeof value === "object" && value);
66
- if (namedAccounts.length === 1) {
67
- const onlyAccount = namedAccounts[0];
68
- if (onlyAccount) return onlyAccount[0];
69
- }
70
- return DEFAULT_ACCOUNT_ID$1;
71
- }
72
- //#endregion
73
- //#region extensions/matrix/src/setup-config.ts
74
- const channel$1 = "matrix";
75
- const COMMON_SINGLE_ACCOUNT_KEYS_TO_MOVE = /* @__PURE__ */ new Set([
76
- "name",
77
- "enabled",
78
- "httpPort",
79
- "webhookPath",
80
- "webhookUrl",
81
- "webhookSecret",
82
- "service",
83
- "region",
84
- "homeserver",
85
- "userId",
86
- "accessToken",
87
- "password",
88
- "deviceName",
89
- "url",
90
- "code",
91
- "dmPolicy",
92
- "allowFrom",
93
- "groupPolicy",
94
- "groupAllowFrom",
95
- "defaultTo"
96
- ]);
97
- const MATRIX_SINGLE_ACCOUNT_KEYS_TO_MOVE = new Set(matrixSingleAccountKeysToMove);
98
- const MATRIX_NAMED_ACCOUNT_PROMOTION_KEYS = new Set(matrixNamedAccountPromotionKeys);
99
- function cloneIfObject(value) {
100
- if (value && typeof value === "object") return structuredClone(value);
101
- return value;
102
- }
103
- function resolveExistingMatrixAccountKey(accounts, targetAccountId) {
104
- const normalizedTargetAccountId = normalizeAccountId(targetAccountId);
105
- return Object.keys(accounts).find((accountId) => normalizeAccountId(accountId) === normalizedTargetAccountId) ?? targetAccountId;
106
- }
107
- function moveSingleMatrixAccountConfigToNamedAccount(cfg) {
108
- const baseConfig = cfg.channels?.[channel$1];
109
- const base = typeof baseConfig === "object" && baseConfig ? baseConfig : void 0;
110
- if (!base) return cfg;
111
- const accounts = typeof base.accounts === "object" && base.accounts ? base.accounts : {};
112
- const hasNamedAccounts = Object.keys(accounts).some(Boolean);
113
- const keysToMove = Object.entries(base).filter(([key, value]) => {
114
- if (key === "accounts" || key === "enabled" || value === void 0) return false;
115
- if (!COMMON_SINGLE_ACCOUNT_KEYS_TO_MOVE.has(key) && !MATRIX_SINGLE_ACCOUNT_KEYS_TO_MOVE.has(key)) return false;
116
- if (hasNamedAccounts && !MATRIX_NAMED_ACCOUNT_PROMOTION_KEYS.has(key)) return false;
117
- return true;
118
- }).map(([key]) => key);
119
- if (keysToMove.length === 0) return cfg;
120
- const resolvedTargetAccountId = resolveExistingMatrixAccountKey(accounts, resolveSingleAccountPromotionTarget({ channel: base }));
121
- const nextAccount = { ...accounts[resolvedTargetAccountId] };
122
- for (const key of keysToMove) nextAccount[key] = cloneIfObject(base[key]);
123
- return patchTopLevelChannelConfigSection({
124
- cfg,
125
- channel: channel$1,
126
- clearFields: keysToMove,
127
- patch: { accounts: {
128
- ...accounts,
129
- [resolvedTargetAccountId]: nextAccount
130
- } }
131
- });
132
- }
133
- function validateMatrixSetupInput(params) {
134
- const input = params.input;
135
- const avatarUrl = normalizeOptionalString(input.avatarUrl);
136
- if (avatarUrl && !isSupportedMatrixAvatarSource(avatarUrl)) return "Matrix avatar URL must be an mxc:// URI or an http(s) URL.";
137
- if (input.useEnv) {
138
- const envReadiness = resolveMatrixEnvAuthReadiness(params.accountId, process.env);
139
- return envReadiness.ready ? null : envReadiness.missingMessage;
140
- }
141
- if (!input.homeserver?.trim()) return "Matrix requires --homeserver";
142
- const accessToken = input.accessToken?.trim();
143
- const password = normalizeSecretInputString(input.password);
144
- const userId = input.userId?.trim();
145
- if (!accessToken && !password) return "Matrix requires --access-token or --password";
146
- if (!accessToken && !userId) return "Matrix requires --user-id when using --password";
147
- return null;
148
- }
149
- function applyMatrixSetupAccountConfig(params) {
150
- const input = params.input;
151
- const normalizedAccountId = normalizeAccountId(params.accountId);
152
- const migratedCfg = normalizedAccountId !== DEFAULT_ACCOUNT_ID ? moveSingleMatrixAccountConfigToNamedAccount(params.cfg) : params.cfg;
153
- const next = applyAccountNameToChannelSection({
154
- cfg: migratedCfg,
155
- channelKey: channel$1,
156
- accountId: normalizedAccountId,
157
- name: input.name
158
- });
159
- const avatarUrl = normalizeOptionalString(input.avatarUrl);
160
- if (input.useEnv) return updateMatrixAccountConfig(next, normalizedAccountId, {
161
- enabled: true,
162
- homeserver: null,
163
- allowPrivateNetwork: null,
164
- proxy: null,
165
- userId: null,
166
- accessToken: null,
167
- password: null,
168
- deviceId: null,
169
- deviceName: null,
170
- avatarUrl
171
- });
172
- const accessToken = input.accessToken?.trim();
173
- const password = normalizeSecretInputString(input.password);
174
- const userId = input.userId?.trim();
175
- return updateMatrixAccountConfig(next, normalizedAccountId, {
176
- enabled: true,
177
- homeserver: input.homeserver?.trim(),
178
- allowPrivateNetwork: typeof input.dangerouslyAllowPrivateNetwork === "boolean" ? input.dangerouslyAllowPrivateNetwork : typeof input.allowPrivateNetwork === "boolean" ? input.allowPrivateNetwork : void 0,
179
- proxy: normalizeOptionalString(input.proxy),
180
- userId: password && !userId ? null : userId,
181
- accessToken: accessToken || (password ? null : void 0),
182
- password: password || (accessToken ? null : void 0),
183
- deviceName: input.deviceName?.trim(),
184
- avatarUrl,
185
- initialSyncLimit: input.initialSyncLimit
186
- });
187
- }
188
- //#endregion
189
- //#region extensions/matrix/src/setup-dm-policy.ts
190
- function resolveMatrixSetupDmAllowFrom(policy, allowFrom) {
191
- if (policy === "open") return addWildcardAllowFrom(allowFrom);
192
- return normalizeAllowFromEntries(allowFrom ?? []).filter((entry) => entry !== "*");
193
- }
194
- function createMatrixSetupDmPolicy(promptAllowFrom) {
195
- return createChannelDmPolicy({
196
- label: "Matrix",
197
- channel: "matrix",
198
- policyPath: "dm.policy",
199
- allowFromPath: "dm.allowFrom",
200
- resolveAccount: (cfg, accountId) => {
201
- const resolvedCfg = cfg;
202
- const resolvedAccountId = normalizeAccountId(accountId?.trim() || resolveDefaultMatrixAccountId(resolvedCfg) || DEFAULT_ACCOUNT_ID);
203
- const config = resolveMatrixAccountConfig({
204
- cfg: resolvedCfg,
205
- accountId: resolvedAccountId
206
- });
207
- return {
208
- accountId: resolvedAccountId,
209
- config: {
210
- dmPolicy: config.dm?.policy,
211
- allowFrom: config.dm?.allowFrom,
212
- dm: config.dm
213
- }
214
- };
215
- },
216
- resolveConfigKeys: ({ cfg, account }) => ({
217
- policyKey: resolveMatrixConfigFieldPath(cfg, account.accountId, "dm.policy"),
218
- allowFromKey: resolveMatrixConfigFieldPath(cfg, account.accountId, "dm.allowFrom")
219
- }),
220
- resolveAllowFrom: ({ policy, account }) => resolveMatrixSetupDmAllowFrom(policy, account.config.allowFrom),
221
- buildPatch: ({ account, policy, allowFrom }) => ({ dm: {
222
- ...account.config.dm,
223
- policy,
224
- allowFrom
225
- } }),
226
- applyPatch: ({ cfg, account, patch }) => updateMatrixAccountConfig(cfg, account.accountId, patch),
227
- promptAllowFrom
228
- });
229
- }
230
- //#endregion
231
- //#region extensions/matrix/src/setup-core.ts
232
- const channel = "matrix";
233
- function resolveMatrixSetupAccountId(params) {
234
- return normalizeAccountId(params.accountId?.trim() || params.name?.trim() || DEFAULT_ACCOUNT_ID);
235
- }
236
- function createMatrixSetupWizardProxy(loadWizardModule) {
237
- let wizardPromise = null;
238
- const loadWizard = () => {
239
- wizardPromise ??= loadWizardModule().then((module) => module.matrixSetupWizard);
240
- return wizardPromise;
241
- };
242
- return {
243
- channel,
244
- getStatus: async (ctx) => await (await loadWizard()).getStatus(ctx),
245
- configure: async (ctx) => await (await loadWizard()).configure(ctx),
246
- configureInteractive: async (ctx) => {
247
- const wizard = await loadWizard();
248
- return await (wizard.configureInteractive ?? wizard.configure)(ctx);
249
- },
250
- configureWhenConfigured: async (ctx) => {
251
- const wizard = await loadWizard();
252
- return await (wizard.configureWhenConfigured ?? wizard.configureInteractive ?? wizard.configure)(ctx);
253
- },
254
- afterConfigWritten: async (ctx) => await (await loadWizard()).afterConfigWritten?.(ctx),
255
- dmPolicy: createMatrixSetupDmPolicy(async (params) => {
256
- const promptAllowFrom = (await loadWizard()).dmPolicy?.promptAllowFrom;
257
- return promptAllowFrom ? await promptAllowFrom(params) : params.cfg;
258
- }),
259
- disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
260
- };
261
- }
262
- const matrixSetupAdapter = {
263
- singleAccountKeysToMove,
264
- namedAccountPromotionKeys,
265
- resolveSingleAccountPromotionTarget,
266
- resolveAccountId: ({ accountId, input }) => resolveMatrixSetupAccountId({
267
- accountId,
268
- name: input?.name
269
- }),
270
- resolveBindingAccountId: ({ accountId, agentId }) => resolveMatrixSetupAccountId({
271
- accountId,
272
- name: agentId
273
- }),
274
- applyAccountName: ({ cfg, accountId, name }) => prepareScopedSetupConfig({
275
- cfg,
276
- channelKey: channel,
277
- accountId,
278
- name
279
- }),
280
- validateInput: ({ accountId, input }) => validateMatrixSetupInput({
281
- accountId,
282
- input
283
- }),
284
- applyAccountConfig: ({ cfg, accountId, input }) => applyMatrixSetupAccountConfig({
285
- cfg,
286
- accountId,
287
- input
288
- }),
289
- afterAccountConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
290
- const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-UNIGyKnk.mjs");
291
- await runMatrixSetupBootstrapAfterConfigWrite({
292
- previousCfg,
293
- cfg,
294
- accountId,
295
- runtime
296
- });
297
- }
298
- };
299
- const matrixSetupContract = defineChannelSetupContract({
300
- fields: {
301
- homeserver: {
302
- kind: "string",
303
- cli: {
304
- flags: "--homeserver <url>",
305
- description: "Matrix homeserver URL"
306
- }
307
- },
308
- userId: {
309
- kind: "string",
310
- cli: {
311
- flags: "--user-id <id>",
312
- description: "Matrix user id"
313
- }
314
- },
315
- accessToken: {
316
- kind: "string",
317
- sensitive: true,
318
- cli: {
319
- flags: "--access-token <token>",
320
- description: "Matrix access token"
321
- }
322
- },
323
- password: {
324
- kind: "string",
325
- sensitive: true,
326
- cli: {
327
- flags: "--password <password>",
328
- description: "Matrix password"
329
- }
330
- },
331
- deviceName: {
332
- kind: "string",
333
- cli: {
334
- flags: "--device-name <name>",
335
- description: "Matrix device name"
336
- }
337
- },
338
- avatarUrl: {
339
- kind: "string",
340
- cli: {
341
- flags: "--avatar-url <url>",
342
- description: "Matrix avatar URL"
343
- }
344
- },
345
- initialSyncLimit: {
346
- kind: "integer",
347
- cli: {
348
- flags: "--initial-sync-limit <n>",
349
- description: "Matrix initial sync room limit"
350
- }
351
- },
352
- proxy: {
353
- kind: "string",
354
- cli: {
355
- flags: "--proxy <url>",
356
- description: "Matrix proxy URL"
357
- }
358
- },
359
- dangerouslyAllowPrivateNetwork: {
360
- kind: "boolean",
361
- cli: {
362
- flags: "--dangerously-allow-private-network",
363
- description: "Allow private-network Matrix homeservers"
364
- }
365
- },
366
- useEnv: {
367
- kind: "boolean",
368
- cli: {
369
- flags: "--use-env",
370
- description: "Use Matrix environment credentials"
371
- }
372
- }
373
- },
374
- legacyAdapter: matrixSetupAdapter
375
- });
376
- //#endregion
377
- export { moveSingleMatrixAccountConfigToNamedAccount as a, singleAccountKeysToMove as c, createMatrixSetupDmPolicy as i, matrixSetupAdapter as n, namedAccountPromotionKeys as o, matrixSetupContract as r, resolveSingleAccountPromotionTarget as s, createMatrixSetupWizardProxy as t };
@@ -1,17 +0,0 @@
1
- import { FsSafeError } from "./errors.js";
2
- import type { FileLockSyncHandle } from "./file-lock-sync.js";
3
- import { type FileLockSyncRootAuthority, type FileLockSyncRootPath } from "./file-lock-sync-root.js";
4
- import type { FileLockSyncRootFileReceipt } from "./file-lock-sync-root-io.js";
5
- import { type RootSyncHeldLock } from "./file-lock-sync-root-held.js";
6
- export declare class FileLockSyncRootArbitrationCollision extends FsSafeError {
7
- constructor();
8
- }
9
- export type FileLockSyncRootArbitration = Readonly<{
10
- authority: FileLockSyncRootAuthority;
11
- heldLocks: Map<string, RootSyncHeldLock>;
12
- lockRootPath: FileLockSyncRootPath;
13
- normalizedTargetPath: string;
14
- reentrantOwner?: string;
15
- }>;
16
- export declare function tryReuseCurrentRootSyncHeldLock(arbitration: FileLockSyncRootArbitration): FileLockSyncHandle | undefined;
17
- export declare function cleanupCreatedRootSyncLock(lockRootPath: FileLockSyncRootPath, fd: number, receipt: FileLockSyncRootFileReceipt, timer?: NodeJS.Timeout): void;
@@ -1,66 +0,0 @@
1
- import fs from "node:fs";
2
- import { foreignSyncHeldLock } from "./file-lock-sync-admission.js";
3
- import path from "node:path";
4
- import { FsSafeError } from "./errors.js";
5
- import {} from "./file-lock-sync-root.js";
6
- import { removeFileLockSyncRootFile } from "./file-lock-sync-root-mutation.js";
7
- import { createSuppressedError } from "./suppressed-error.js";
8
- import { createRootSyncHeldLockHandle, verifyRootSyncHeldLock, } from "./file-lock-sync-root-held.js";
9
- export class FileLockSyncRootArbitrationCollision extends FsSafeError {
10
- constructor() {
11
- super("path-mismatch", "file lock arbitration changed during local creation");
12
- }
13
- }
14
- function sameRootLockPath(left, right) {
15
- return left.relativePath === right.relativePath && path.relative(left.path, right.path) === "";
16
- }
17
- export function tryReuseCurrentRootSyncHeldLock(arbitration) {
18
- const held = arbitration.heldLocks.get(arbitration.normalizedTargetPath);
19
- const reusable = held && !foreignSyncHeldLock("root", arbitration.normalizedTargetPath) &&
20
- arbitration.reentrantOwner !== undefined &&
21
- held.reentrantOwner !== undefined &&
22
- arbitration.reentrantOwner === held.reentrantOwner &&
23
- arbitration.authority.adapter === held.rootAuthority.adapter &&
24
- sameRootLockPath(arbitration.lockRootPath, held.rootPath) &&
25
- held.releaseState !== "released";
26
- if (!reusable)
27
- return undefined;
28
- if (!verifyRootSyncHeldLock(held)) {
29
- throw new FsSafeError("path-mismatch", "held sidecar lock changed before reentrant reuse");
30
- }
31
- // Verification can invoke a custom parser. Re-fetch the exact entry before
32
- // granting a reference, while retaining supported releasing/exit states.
33
- if (arbitration.heldLocks.get(arbitration.normalizedTargetPath) !== held ||
34
- held.releaseState === "released" || foreignSyncHeldLock("root", arbitration.normalizedTargetPath)) {
35
- throw new FsSafeError("path-mismatch", "held sidecar lock changed during reentrant reuse");
36
- }
37
- held.refCount += 1;
38
- held.revision += 1;
39
- return createRootSyncHeldLockHandle(held);
40
- }
41
- export function cleanupCreatedRootSyncLock(lockRootPath, fd, receipt, timer) {
42
- let timerCleanupFailed = false;
43
- let timerCleanupError;
44
- try {
45
- if (timer)
46
- clearInterval(timer);
47
- }
48
- catch (error) {
49
- timerCleanupFailed = true;
50
- timerCleanupError = error;
51
- }
52
- try {
53
- fs.closeSync(fd);
54
- if (!removeFileLockSyncRootFile(lockRootPath, receipt)) {
55
- throw new FsSafeError("path-mismatch", "created sidecar lock changed before cleanup");
56
- }
57
- }
58
- catch (fileCleanupError) {
59
- if (timerCleanupFailed) {
60
- throw createSuppressedError(timerCleanupError, fileCleanupError, "unpublished lock timer and file cleanup both failed");
61
- }
62
- throw fileCleanupError;
63
- }
64
- if (timerCleanupFailed)
65
- throw timerCleanupError;
66
- }
@@ -1,4 +0,0 @@
1
- import type { BigIntStats } from "node:fs";
2
- import type { NativeBinding } from "./native-binding.js";
3
- import { type PublishFailureState } from "./publish-file-failure.js";
4
- export declare function publishFileNoReplaceNative(binding: NativeBinding, paths: Parameters<NativeBinding["renameNoReplace"]>, expected: BigIntStats, failure: PublishFailureState): "link-unlink" | undefined;
@@ -1,35 +0,0 @@
1
- import { FsSafeError } from "./errors.js";
2
- import { getFsSafeNativeConfig } from "./native-config.js";
3
- import { nativeMoveNoReplace } from "./native-move-fallback.js";
4
- import { rememberCreatedTarget } from "./publish-file-failure.js";
5
- export function publishFileNoReplaceNative(binding, paths, expected, failure) {
6
- try {
7
- const fallback = nativeMoveNoReplace(binding, paths, expected, getFsSafeNativeConfig().mode === "auto", "file publication");
8
- if (fallback) {
9
- failure.fallback = fallback;
10
- failure.sourceRemoval = "removed";
11
- }
12
- return fallback;
13
- }
14
- catch (error) {
15
- if (error instanceof FsSafeError && error.details?.publication === "published") {
16
- failure.targetCreated = true;
17
- failure.preserveTarget = true;
18
- failure.phase = "rename-verify";
19
- failure.fallback = "link-unlink";
20
- failure.sourceRemoval = error.details.sourceRemoval;
21
- // Changed/unverified pairs cannot establish which inode was published.
22
- if (failure.sourceRemoval === "still-linked")
23
- rememberCreatedTarget(failure, expected, "rename-verify");
24
- }
25
- if (error instanceof FsSafeError)
26
- throw error;
27
- const code = error?.code;
28
- if (code === "path-mismatch" || code === "hardlink") {
29
- throw new FsSafeError(code, "publication source changed before fallback", { cause: error });
30
- }
31
- if (code === "ELOOP")
32
- throw new FsSafeError("symlink", "publication source became a symlink", { cause: error });
33
- throw error;
34
- }
35
- }
@@ -1,7 +0,0 @@
1
- import { type DenyMutationPolicy } from "./deny-mutations.js";
2
- import { type RootContext } from "./root-context.js";
3
- export declare function assertMoveMutationAllowed(root: RootContext, params: {
4
- fromRelative: string;
5
- toRelative: string;
6
- denyMutations?: DenyMutationPolicy;
7
- }): Promise<void>;
@@ -1,16 +0,0 @@
1
- import { assertMutationNotDenied, } from "./deny-mutations.js";
2
- import { resolvePathInRoot } from "./root-context.js";
3
- export async function assertMoveMutationAllowed(root, params) {
4
- // Keep this preflight separate from the pinned resolutions in movePathFallback:
5
- // mutation denials must take precedence over source alias or identity failures.
6
- const source = await resolvePathInRoot(root, params.fromRelative, {
7
- aliasErrorCode: "path-alias",
8
- allowFinalSymlink: true,
9
- });
10
- await assertMutationNotDenied(source.resolved, params.denyMutations, { protectAncestors: true });
11
- const target = await resolvePathInRoot(root, params.toRelative, {
12
- aliasErrorCode: "path-alias",
13
- allowFinalSymlink: true,
14
- });
15
- await assertMutationNotDenied(target.resolved, params.denyMutations, { protectAncestors: true });
16
- }
@@ -1,5 +1,5 @@
1
- import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
2
1
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
2
+ import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  //#region extensions/matrix/src/matrix/errors.ts
4
4
  function formatMatrixErrorReason(err) {
5
5
  return normalizeLowercaseStringOrEmpty(formatErrorMessage(err));