@openclaw/matrix 2026.9.5 → 2026.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{account-selection-5koohRSQ.mjs → account-selection-BHkfU1eC.mjs} +10 -1
- package/dist/.setup/{accounts-BF5hyc-1.mjs → accounts-iThMol10.mjs} +38 -37
- package/dist/.setup/{approval-handler.runtime-CoZCYGUH.mjs → approval-handler.runtime-9W7R2ZMq.mjs} +6 -6
- package/dist/.setup/{approval-ids-CZOcdJ-5.mjs → approval-ids-j08q8LEG.mjs} +1 -1
- package/dist/.setup/{approval-reaction-auth-B51E4ZDa.mjs → approval-reaction-auth-DMVE7VSp.mjs} +7 -3
- package/dist/.setup/{channel-q6TBKEiG.mjs → channel-ConuJfxT.mjs} +43 -30
- package/dist/.setup/{channel.runtime-DcDBdxe6.mjs → channel.runtime-CnxR2JUK.mjs} +6 -6
- package/dist/.setup/{channel.setup-DZQ5rf9k.mjs → channel.setup-C6KvBV8l.mjs} +3 -3
- package/dist/.setup/{cli-Cx_cNaXN.mjs → cli-O196sg8g.mjs} +11 -11
- package/dist/.setup/{cli-metadata-DHU1H-Vr.mjs → cli-metadata-DFHQj5XR.mjs} +1 -1
- package/dist/.setup/{client-By2B3Wz4.mjs → client-C2yVkVdw.mjs} +2 -2
- package/dist/.setup/{client-DsJUnWlV.mjs → client-ChrXpxos.mjs} +84 -25
- package/dist/.setup/{client-bootstrap-DGX0f-4x.mjs → client-bootstrap-BSnUAoz1.mjs} +1 -1
- package/dist/.setup/{create-client-DQXAZjTw.mjs → create-client-CHxcron_.mjs} +13 -7
- package/dist/.setup/{credentials-CeRipapZ.mjs → credentials-BGKfiaJW.mjs} +1 -1
- package/dist/.setup/{credentials-read-Dp7BoEdm.mjs → credentials-read-Q5sHkkHv.mjs} +9 -1
- package/dist/.setup/{credentials-write.runtime-M_bUf3rL.mjs → credentials-write.runtime-DxbXh-pK.mjs} +1 -1
- package/dist/.setup/{crypto-runtime-9oxuU30y.mjs → crypto-runtime-D9qn_Pbj.mjs} +3 -3
- package/dist/.setup/{crypto-snapshot-doctor.runtime-DXpLbQ7y.mjs → crypto-snapshot-doctor.runtime-CMWa1d9Y.mjs} +2 -2
- package/dist/.setup/{directory-live-CatwztQc.mjs → directory-live-CxqkcYbT.mjs} +2 -2
- package/dist/.setup/{draft-stream-DIFZDNrb.mjs → draft-stream-y0Vq5f38.mjs} +21 -5
- package/dist/.setup/{encryption-guidance-DYEbeYj-.mjs → encryption-guidance-CMWXiBzJ.mjs} +1 -1
- package/dist/.setup/file-sync-store-CsalA4yI.mjs +213 -0
- package/dist/.setup/{http-client-BJjo-iw5.mjs → http-client-Bi6uKmzh.mjs} +17 -2
- package/dist/.setup/{idb-persistence-CIfFUjP3.mjs → idb-persistence-c8uxcofH.mjs} +1 -1
- package/dist/.setup/{messages-SW0NPYnR.mjs → messages-COuAcrz-.mjs} +10 -3
- package/dist/.setup/{monitor-DQfYX5rA.mjs → monitor-CzE3myC_.mjs} +127 -233
- package/dist/.setup/{outbound-DRWtSUe-.mjs → outbound-B508VPBM.mjs} +1 -1
- package/dist/.setup/probe.runtime-C-NMeYk2.mjs +2 -0
- package/dist/.setup/{profile-update-DPttQz3-.mjs → profile-update-DrblJttE.mjs} +1 -1
- package/dist/.setup/{reaction-events-CdAk_rh_.mjs → reaction-events-BvZmhjLC.mjs} +4 -3
- package/dist/.setup/{resolve-targets-drjgAdIe.mjs → resolve-targets-BLz748lX.mjs} +1 -1
- package/dist/.setup/{resolver.runtime-Ci6ddcPh.mjs → resolver.runtime-CuLQ2uHe.mjs} +1 -1
- package/dist/.setup/{room-info-DHd1j3qM.mjs → room-info-DTyP1k5g.mjs} +3 -3
- package/dist/.setup/{sdk-BkKE4ANj.mjs → sdk-rqFjgltR.mjs} +6 -225
- package/dist/.setup/{send-h0gZ_-qk.mjs → send-aVdC5NJO.mjs} +23 -26
- package/dist/.setup/{setup-bootstrap-BYgBD504.mjs → setup-bootstrap-A_WGFq1Y.mjs} +2 -2
- package/dist/.setup/{setup-core-BUcDAM7q.mjs → setup-core-D2hMbIi3.mjs} +3 -3
- package/dist/.setup/{setup-plugin-api-DoTm4v2q.mjs → setup-plugin-api-JiRgm8s6.mjs} +1 -1
- package/dist/.setup/{setup-surface-V_Q-enq-.mjs → setup-surface-BL3ha1l-.mjs} +6 -6
- package/dist/.setup/{startup-verification-Bq5qeEGn.mjs → startup-verification-Cp1Gf7pM.mjs} +7 -7
- package/dist/.setup/{storage-DJ-oUgmX.mjs → storage-BXaFc0S4.mjs} +75 -86
- package/dist/.setup/{storage-metadata-BQJjHC_i.mjs → storage-metadata-fHN6Df2m.mjs} +29 -45
- package/dist/.setup/{sync-cache-state-CFiZIPhA.mjs → sync-cache-state-BMtGMxU1.mjs} +30 -43
- package/dist/.setup/{thread-bindings-Hy96ujd3.mjs → thread-bindings-JlnLDfPM.mjs} +5 -5
- package/dist/.setup/{tool-actions.runtime-Dckttu43.mjs → tool-actions.runtime-REzYTNxm.mjs} +16 -8
- package/dist/.setup/{verification-CKqBZ9mI.mjs → verification-0o8MOW9T.mjs} +2 -2
- package/dist/api.js +5 -5
- package/dist/channel-plugin-api.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/contract-api.js +2 -2
- package/dist/doctor-contract-api.js +6 -6
- package/dist/helper-api.js +2 -2
- package/dist/index.js +1 -1
- package/dist/plugin-entry.handlers.runtime.js +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/markdown-it/node_modules/argparse/lib/argparse.js +18 -2
- package/node_modules/markdown-it/node_modules/argparse/package.json +1 -1
- package/node_modules/matrix-js-sdk/node_modules/@babel/runtime/package.json +1 -1
- package/node_modules/music-metadata/node_modules/file-type/package.json +3 -2
- package/node_modules/music-metadata/node_modules/file-type/readme.md +3 -0
- package/node_modules/music-metadata/node_modules/file-type/source/index.js +28 -1
- package/node_modules/music-metadata/node_modules/file-type/source/supported.js +2 -0
- package/node_modules/zod/README.md +2 -2
- package/node_modules/zod/compile.cjs +19 -0
- package/node_modules/zod/index.cjs +19 -0
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +8 -7
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v4/classic/external.ts +2 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +248 -25
- package/node_modules/zod/src/v4/classic/schemas.ts +243 -168
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +60 -9
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +6 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +265 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +130 -1
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +40 -2
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +56 -0
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +46 -1
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +95 -1
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +234 -38
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +569 -0
- package/node_modules/zod/src/v4/core/api.ts +44 -28
- package/node_modules/zod/src/v4/core/checks.ts +62 -102
- package/node_modules/zod/src/v4/core/compile.ts +218 -93
- package/node_modules/zod/src/v4/core/core.ts +1 -3
- package/node_modules/zod/src/v4/core/doc.ts +6 -2
- package/node_modules/zod/src/v4/core/errors.ts +3 -6
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +2 -2
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +185 -81
- package/node_modules/zod/src/v4/core/memoizer.ts +75 -28
- package/node_modules/zod/src/v4/core/parse.ts +37 -16
- package/node_modules/zod/src/v4/core/regexes.ts +14 -4
- package/node_modules/zod/src/v4/core/schemas.ts +296 -132
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +35 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +399 -2
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +118 -16
- package/node_modules/zod/src/v4/core/to-json-schema.ts +9 -7
- package/node_modules/zod/src/v4/core/util.ts +218 -147
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/locales/ar.ts +2 -0
- package/node_modules/zod/src/v4/locales/az.ts +2 -0
- package/node_modules/zod/src/v4/locales/be.ts +2 -0
- package/node_modules/zod/src/v4/locales/bg.ts +2 -0
- package/node_modules/zod/src/v4/locales/bn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ca.ts +2 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +2 -0
- package/node_modules/zod/src/v4/locales/cs.ts +2 -0
- package/node_modules/zod/src/v4/locales/da.ts +2 -0
- package/node_modules/zod/src/v4/locales/de.ts +2 -0
- package/node_modules/zod/src/v4/locales/el.ts +2 -0
- package/node_modules/zod/src/v4/locales/en.ts +2 -0
- package/node_modules/zod/src/v4/locales/eo.ts +2 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +2 -0
- package/node_modules/zod/src/v4/locales/fi.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +2 -0
- package/node_modules/zod/src/v4/locales/fr.ts +2 -0
- package/node_modules/zod/src/v4/locales/gu.ts +2 -0
- package/node_modules/zod/src/v4/locales/he.ts +2 -0
- package/node_modules/zod/src/v4/locales/hi.ts +2 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +2 -0
- package/node_modules/zod/src/v4/locales/hy.ts +2 -0
- package/node_modules/zod/src/v4/locales/id.ts +2 -0
- package/node_modules/zod/src/v4/locales/index.ts +1 -0
- package/node_modules/zod/src/v4/locales/is.ts +2 -0
- package/node_modules/zod/src/v4/locales/it.ts +2 -0
- package/node_modules/zod/src/v4/locales/ja.ts +2 -0
- package/node_modules/zod/src/v4/locales/ka.ts +2 -0
- package/node_modules/zod/src/v4/locales/km.ts +2 -0
- package/node_modules/zod/src/v4/locales/kn.ts +2 -0
- package/node_modules/zod/src/v4/locales/ko.ts +2 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ms.ts +2 -0
- package/node_modules/zod/src/v4/locales/ne.ts +2 -0
- package/node_modules/zod/src/v4/locales/nl.ts +2 -0
- package/node_modules/zod/src/v4/locales/nn.ts +2 -0
- package/node_modules/zod/src/v4/locales/no.ts +2 -0
- package/node_modules/zod/src/v4/locales/ota.ts +2 -0
- package/node_modules/zod/src/v4/locales/pl.ts +2 -0
- package/node_modules/zod/src/v4/locales/ps.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +2 -0
- package/node_modules/zod/src/v4/locales/pt.ts +2 -0
- package/node_modules/zod/src/v4/locales/ro.ts +2 -0
- package/node_modules/zod/src/v4/locales/ru.ts +2 -0
- package/node_modules/zod/src/v4/locales/sk.ts +2 -0
- package/node_modules/zod/src/v4/locales/sl.ts +2 -0
- package/node_modules/zod/src/v4/locales/sv.ts +2 -0
- package/node_modules/zod/src/v4/locales/ta.ts +2 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +2 -0
- package/node_modules/zod/src/v4/locales/tk.ts +2 -0
- package/node_modules/zod/src/v4/locales/tr.ts +2 -0
- package/node_modules/zod/src/v4/locales/uk.ts +2 -0
- package/node_modules/zod/src/v4/locales/ur.ts +2 -0
- package/node_modules/zod/src/v4/locales/uz.ts +2 -0
- package/node_modules/zod/src/v4/locales/vi.ts +2 -0
- package/node_modules/zod/src/v4/locales/yo.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +2 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +2 -0
- package/node_modules/zod/src/v4/mini/external.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +32 -7
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +86 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +23 -0
- package/node_modules/zod/v3/ZodError.cjs +19 -0
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +19 -0
- package/node_modules/zod/v4/classic/checks.cjs +19 -0
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/classic/errors.cjs +19 -0
- package/node_modules/zod/v4/classic/external.cjs +22 -1
- package/node_modules/zod/v4/classic/external.d.cts +1 -1
- package/node_modules/zod/v4/classic/external.d.ts +1 -1
- package/node_modules/zod/v4/classic/external.js +1 -1
- package/node_modules/zod/v4/classic/from-json-schema.cjs +264 -24
- package/node_modules/zod/v4/classic/from-json-schema.js +245 -24
- package/node_modules/zod/v4/classic/in-out.cjs +19 -0
- package/node_modules/zod/v4/classic/index.cjs +19 -0
- package/node_modules/zod/v4/classic/iso.cjs +19 -0
- package/node_modules/zod/v4/classic/parse.cjs +19 -0
- package/node_modules/zod/v4/classic/schemas.cjs +100 -35
- package/node_modules/zod/v4/classic/schemas.d.cts +15 -1
- package/node_modules/zod/v4/classic/schemas.d.ts +15 -1
- package/node_modules/zod/v4/classic/schemas.js +77 -33
- package/node_modules/zod/v4/core/api.cjs +45 -22
- package/node_modules/zod/v4/core/api.d.cts +12 -6
- package/node_modules/zod/v4/core/api.d.ts +12 -6
- package/node_modules/zod/v4/core/api.js +25 -22
- package/node_modules/zod/v4/core/checks.cjs +51 -97
- package/node_modules/zod/v4/core/checks.d.cts +17 -1
- package/node_modules/zod/v4/core/checks.d.ts +17 -1
- package/node_modules/zod/v4/core/checks.js +31 -96
- package/node_modules/zod/v4/core/compile.cjs +173 -78
- package/node_modules/zod/v4/core/compile.d.cts +18 -4
- package/node_modules/zod/v4/core/compile.d.ts +18 -4
- package/node_modules/zod/v4/core/compile.js +154 -79
- package/node_modules/zod/v4/core/core.cjs +20 -1
- package/node_modules/zod/v4/core/core.js +1 -1
- package/node_modules/zod/v4/core/doc.cjs +26 -2
- package/node_modules/zod/v4/core/doc.js +7 -2
- package/node_modules/zod/v4/core/errors.cjs +21 -5
- package/node_modules/zod/v4/core/errors.js +2 -5
- package/node_modules/zod/v4/core/index.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +20 -1
- package/node_modules/zod/v4/core/json-schema-generator.js +2 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +188 -72
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +170 -74
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/memoizer.cjs +111 -23
- package/node_modules/zod/v4/core/memoizer.js +69 -23
- package/node_modules/zod/v4/core/parse.cjs +56 -16
- package/node_modules/zod/v4/core/parse.js +37 -16
- package/node_modules/zod/v4/core/regexes.cjs +31 -6
- package/node_modules/zod/v4/core/regexes.d.cts +3 -0
- package/node_modules/zod/v4/core/regexes.d.ts +3 -0
- package/node_modules/zod/v4/core/regexes.js +10 -4
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/schemas.cjs +302 -114
- package/node_modules/zod/v4/core/schemas.d.cts +28 -8
- package/node_modules/zod/v4/core/schemas.d.ts +28 -8
- package/node_modules/zod/v4/core/schemas.js +279 -113
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +28 -7
- package/node_modules/zod/v4/core/to-json-schema.d.cts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +4 -3
- package/node_modules/zod/v4/core/to-json-schema.js +7 -6
- package/node_modules/zod/v4/core/util.cjs +177 -143
- package/node_modules/zod/v4/core/util.d.cts +25 -4
- package/node_modules/zod/v4/core/util.d.ts +25 -4
- package/node_modules/zod/v4/core/util.js +156 -143
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +19 -0
- package/node_modules/zod/v4/index.cjs +19 -0
- package/node_modules/zod/v4/locales/ar.cjs +2 -0
- package/node_modules/zod/v4/locales/ar.js +2 -0
- package/node_modules/zod/v4/locales/az.cjs +2 -0
- package/node_modules/zod/v4/locales/az.js +2 -0
- package/node_modules/zod/v4/locales/be.cjs +2 -0
- package/node_modules/zod/v4/locales/be.js +2 -0
- package/node_modules/zod/v4/locales/bg.cjs +2 -0
- package/node_modules/zod/v4/locales/bg.js +2 -0
- package/node_modules/zod/v4/locales/bn.cjs +2 -0
- package/node_modules/zod/v4/locales/bn.js +2 -0
- package/node_modules/zod/v4/locales/ca.cjs +2 -0
- package/node_modules/zod/v4/locales/ca.js +2 -0
- package/node_modules/zod/v4/locales/ckb.cjs +2 -0
- package/node_modules/zod/v4/locales/ckb.js +2 -0
- package/node_modules/zod/v4/locales/cs.cjs +2 -0
- package/node_modules/zod/v4/locales/cs.js +2 -0
- package/node_modules/zod/v4/locales/da.cjs +2 -0
- package/node_modules/zod/v4/locales/da.js +2 -0
- package/node_modules/zod/v4/locales/de.cjs +2 -0
- package/node_modules/zod/v4/locales/de.js +2 -0
- package/node_modules/zod/v4/locales/el.cjs +2 -0
- package/node_modules/zod/v4/locales/el.js +2 -0
- package/node_modules/zod/v4/locales/en.cjs +2 -0
- package/node_modules/zod/v4/locales/en.js +2 -0
- package/node_modules/zod/v4/locales/eo.cjs +2 -0
- package/node_modules/zod/v4/locales/eo.js +2 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +2 -0
- package/node_modules/zod/v4/locales/fa.js +2 -0
- package/node_modules/zod/v4/locales/fi.cjs +2 -0
- package/node_modules/zod/v4/locales/fi.js +2 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
- package/node_modules/zod/v4/locales/fr-CA.js +2 -0
- package/node_modules/zod/v4/locales/fr.cjs +2 -0
- package/node_modules/zod/v4/locales/fr.js +2 -0
- package/node_modules/zod/v4/locales/gu.cjs +2 -0
- package/node_modules/zod/v4/locales/gu.js +2 -0
- package/node_modules/zod/v4/locales/he.cjs +2 -0
- package/node_modules/zod/v4/locales/he.js +2 -0
- package/node_modules/zod/v4/locales/hi.cjs +2 -0
- package/node_modules/zod/v4/locales/hi.js +2 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +2 -0
- package/node_modules/zod/v4/locales/hu.js +2 -0
- package/node_modules/zod/v4/locales/hy.cjs +2 -0
- package/node_modules/zod/v4/locales/hy.js +2 -0
- package/node_modules/zod/v4/locales/id.cjs +2 -0
- package/node_modules/zod/v4/locales/id.js +2 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -1
- package/node_modules/zod/v4/locales/index.d.cts +1 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.js +1 -0
- package/node_modules/zod/v4/locales/is.cjs +2 -0
- package/node_modules/zod/v4/locales/is.js +2 -0
- package/node_modules/zod/v4/locales/it.cjs +2 -0
- package/node_modules/zod/v4/locales/it.js +2 -0
- package/node_modules/zod/v4/locales/ja.cjs +2 -0
- package/node_modules/zod/v4/locales/ja.js +2 -0
- package/node_modules/zod/v4/locales/ka.cjs +2 -0
- package/node_modules/zod/v4/locales/ka.js +2 -0
- package/node_modules/zod/v4/locales/km.cjs +2 -0
- package/node_modules/zod/v4/locales/km.js +2 -0
- package/node_modules/zod/v4/locales/kn.cjs +2 -0
- package/node_modules/zod/v4/locales/kn.js +2 -0
- package/node_modules/zod/v4/locales/ko.cjs +2 -0
- package/node_modules/zod/v4/locales/ko.js +2 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +2 -0
- package/node_modules/zod/v4/locales/mk.js +2 -0
- package/node_modules/zod/v4/locales/ms.cjs +2 -0
- package/node_modules/zod/v4/locales/ms.js +2 -0
- package/node_modules/zod/v4/locales/ne.cjs +2 -0
- package/node_modules/zod/v4/locales/ne.js +2 -0
- package/node_modules/zod/v4/locales/nl.cjs +2 -0
- package/node_modules/zod/v4/locales/nl.js +2 -0
- package/node_modules/zod/v4/locales/nn.cjs +2 -0
- package/node_modules/zod/v4/locales/nn.js +2 -0
- package/node_modules/zod/v4/locales/no.cjs +2 -0
- package/node_modules/zod/v4/locales/no.js +2 -0
- package/node_modules/zod/v4/locales/ota.cjs +2 -0
- package/node_modules/zod/v4/locales/ota.js +2 -0
- package/node_modules/zod/v4/locales/pl.cjs +2 -0
- package/node_modules/zod/v4/locales/pl.js +2 -0
- package/node_modules/zod/v4/locales/ps.cjs +2 -0
- package/node_modules/zod/v4/locales/ps.js +2 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +2 -0
- package/node_modules/zod/v4/locales/pt-BR.js +2 -0
- package/node_modules/zod/v4/locales/pt.cjs +2 -0
- package/node_modules/zod/v4/locales/pt.js +2 -0
- package/node_modules/zod/v4/locales/ro.cjs +2 -0
- package/node_modules/zod/v4/locales/ro.js +2 -0
- package/node_modules/zod/v4/locales/ru.cjs +2 -0
- package/node_modules/zod/v4/locales/ru.js +2 -0
- package/node_modules/zod/v4/locales/sk.cjs +2 -0
- package/node_modules/zod/v4/locales/sk.js +2 -0
- package/node_modules/zod/v4/locales/sl.cjs +2 -0
- package/node_modules/zod/v4/locales/sl.js +2 -0
- package/node_modules/zod/v4/locales/sv.cjs +2 -0
- package/node_modules/zod/v4/locales/sv.js +2 -0
- package/node_modules/zod/v4/locales/ta.cjs +2 -0
- package/node_modules/zod/v4/locales/ta.js +2 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +2 -0
- package/node_modules/zod/v4/locales/th.js +2 -0
- package/node_modules/zod/v4/locales/tk.cjs +2 -0
- package/node_modules/zod/v4/locales/tk.js +2 -0
- package/node_modules/zod/v4/locales/tr.cjs +2 -0
- package/node_modules/zod/v4/locales/tr.js +2 -0
- package/node_modules/zod/v4/locales/uk.cjs +2 -0
- package/node_modules/zod/v4/locales/uk.js +2 -0
- package/node_modules/zod/v4/locales/ur.cjs +2 -0
- package/node_modules/zod/v4/locales/ur.js +2 -0
- package/node_modules/zod/v4/locales/uz.cjs +2 -0
- package/node_modules/zod/v4/locales/uz.js +2 -0
- package/node_modules/zod/v4/locales/vi.cjs +2 -0
- package/node_modules/zod/v4/locales/vi.js +2 -0
- package/node_modules/zod/v4/locales/yo.cjs +2 -0
- package/node_modules/zod/v4/locales/yo.js +2 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-CN.js +2 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
- package/node_modules/zod/v4/locales/zh-TW.js +2 -0
- package/node_modules/zod/v4/mini/checks.cjs +19 -0
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +19 -0
- package/node_modules/zod/v4/mini/external.cjs +22 -1
- package/node_modules/zod/v4/mini/external.d.cts +1 -1
- package/node_modules/zod/v4/mini/external.d.ts +1 -1
- package/node_modules/zod/v4/mini/external.js +1 -1
- package/node_modules/zod/v4/mini/in-out.cjs +19 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +19 -0
- package/node_modules/zod/v4/mini/schemas.cjs +44 -8
- package/node_modules/zod/v4/mini/schemas.d.cts +6 -1
- package/node_modules/zod/v4/mini/schemas.d.ts +6 -1
- package/node_modules/zod/v4/mini/schemas.js +21 -6
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/package.json +7 -6
- package/dist/.setup/probe.runtime-qPRZE3Yf.mjs +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as resolveMatrixRoomId } from "./send-
|
|
2
|
-
import {
|
|
3
|
-
import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-
|
|
1
|
+
import { E as resolveMatrixRoomId } from "./send-aVdC5NJO.mjs";
|
|
2
|
+
import { c as EventType } from "./messages-COuAcrz-.mjs";
|
|
3
|
+
import { n as withResolvedActionClient, r as withResolvedRoomAction } from "./client-C2yVkVdw.mjs";
|
|
4
4
|
import { n as isMatrixNotFoundError } from "./errors-DKVS3_DO.mjs";
|
|
5
5
|
import { filterStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
//#region extensions/matrix/src/matrix/monitor/bounded-cache.ts
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
|
|
2
2
|
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { t as claimCurrentTokenStorageState } from "./storage-DJ-oUgmX.mjs";
|
|
3
|
+
import { E as writeMatrixRecoveryKeyStateForPathAsync, _ as readLegacyMatrixRecoveryKeyFile, f as migrateLegacyMatrixRecoveryKeyFilePathToStoreAsync, x as readMatrixRecoveryKeyStateForPathAsync } from "./storage-metadata-fHN6Df2m.mjs";
|
|
5
4
|
import { r as withoutMatrixSendCurrentness, t as captureMatrixSendCurrentness } from "./send-currentness-BrGXL7b8.mjs";
|
|
6
5
|
import { i as parseMxc, r as matrixEventToRaw } from "./event-helpers-CspuhE9k.mjs";
|
|
7
|
-
import { i as openMatrixSyncCacheStoreOptions, l as writeMatrixSyncCacheStateToSyncStore, n as deleteMatrixSyncCacheStateFromSyncStore, o as readPersistedStoreFromSyncStore } from "./sync-cache-state-CFiZIPhA.mjs";
|
|
8
6
|
import { n as isMatrixNotFoundError, t as formatMatrixErrorReason } from "./errors-DKVS3_DO.mjs";
|
|
9
|
-
import { a as createMatrixStartupAbortError, i as awaitMatrixStartupWithAbort, s as throwIfMatrixStartupAborted } from "./client-
|
|
10
|
-
import { n as createMatrixGuardedFetch, t as MatrixAuthedHttpClient } from "./http-client-
|
|
7
|
+
import { a as createMatrixStartupAbortError, i as awaitMatrixStartupWithAbort, s as throwIfMatrixStartupAborted } from "./client-ChrXpxos.mjs";
|
|
8
|
+
import { n as createMatrixGuardedFetch, t as MatrixAuthedHttpClient } from "./http-client-Bi6uKmzh.mjs";
|
|
11
9
|
import { n as resolveMatrixRoomKeyBackupReadinessError } from "./backup-health-Dm_YMVFT.mjs";
|
|
12
10
|
import { n as LogService, r as noop, t as ConsoleLogger } from "./logger-xBjiRIp1.mjs";
|
|
13
11
|
import { t as createMatrixJsSdkClientLogger } from "./logging-rgm8ep9H.mjs";
|
|
@@ -22,8 +20,8 @@ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
|
22
20
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
23
21
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
24
22
|
import { captureChannelReadAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
23
|
+
import { ClientEvent, EventType, Filter, MatrixError, MatrixEventEvent, MsgType, Preset, createClient } from "matrix-js-sdk/lib/matrix.js";
|
|
25
24
|
import { EventEmitter } from "node:events";
|
|
26
|
-
import { ClientEvent, EventType, Filter, MatrixError, MatrixEventEvent, MemoryStore, MsgType, Preset, SyncAccumulator, createClient } from "matrix-js-sdk/lib/matrix.js";
|
|
27
25
|
import { RoomEvent } from "matrix-js-sdk/lib/models/room.js";
|
|
28
26
|
import { VerificationMethod } from "matrix-js-sdk/lib/types.js";
|
|
29
27
|
import { SyncApi, SyncState } from "matrix-js-sdk/lib/sync.js";
|
|
@@ -143,223 +141,6 @@ function refreshMatrixDmRoomIds(direct, dmRoomIds) {
|
|
|
143
141
|
return true;
|
|
144
142
|
}
|
|
145
143
|
//#endregion
|
|
146
|
-
//#region extensions/matrix/src/matrix/async-lock.ts
|
|
147
|
-
function createAsyncLock() {
|
|
148
|
-
let lock = Promise.resolve();
|
|
149
|
-
return async function withLock(fn) {
|
|
150
|
-
const previous = lock;
|
|
151
|
-
let release;
|
|
152
|
-
lock = new Promise((resolve) => {
|
|
153
|
-
release = resolve;
|
|
154
|
-
});
|
|
155
|
-
await previous;
|
|
156
|
-
try {
|
|
157
|
-
return await fn();
|
|
158
|
-
} finally {
|
|
159
|
-
release?.();
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
//#endregion
|
|
164
|
-
//#region extensions/matrix/src/matrix/client/file-sync-store.ts
|
|
165
|
-
const PERSIST_DEBOUNCE_MS = 250;
|
|
166
|
-
function cloneJson(value) {
|
|
167
|
-
return structuredClone(value);
|
|
168
|
-
}
|
|
169
|
-
function syncDataToSyncResponse(syncData) {
|
|
170
|
-
return {
|
|
171
|
-
next_batch: syncData.nextBatch,
|
|
172
|
-
rooms: syncData.roomsData,
|
|
173
|
-
account_data: { events: syncData.accountData }
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
var SqliteBackedMatrixSyncStore = class extends MemoryStore {
|
|
177
|
-
constructor(storageRootDir) {
|
|
178
|
-
super();
|
|
179
|
-
this.storageRootDir = storageRootDir;
|
|
180
|
-
this.persistLock = createAsyncLock();
|
|
181
|
-
this.accumulator = new SyncAccumulator();
|
|
182
|
-
this.savedSync = null;
|
|
183
|
-
this.cleanShutdown = false;
|
|
184
|
-
this.dirty = false;
|
|
185
|
-
this.frozen = false;
|
|
186
|
-
this.persistTimer = null;
|
|
187
|
-
this.persistPromise = null;
|
|
188
|
-
let restoredSavedSync = null;
|
|
189
|
-
let restoredClientOptions;
|
|
190
|
-
let restoredCleanShutdown = false;
|
|
191
|
-
let syncCacheStore = createNoopMatrixSyncCacheStore();
|
|
192
|
-
let syncCacheStoreUnavailableError;
|
|
193
|
-
try {
|
|
194
|
-
syncCacheStore = openMatrixSyncCacheStore(storageRootDir);
|
|
195
|
-
const persisted = readPersistedStoreFromSyncStore(syncCacheStore);
|
|
196
|
-
if (persisted) {
|
|
197
|
-
restoredSavedSync = persisted.savedSync;
|
|
198
|
-
restoredClientOptions = persisted.clientOptions;
|
|
199
|
-
restoredCleanShutdown = persisted.cleanShutdown === true;
|
|
200
|
-
}
|
|
201
|
-
} catch (err) {
|
|
202
|
-
syncCacheStoreUnavailableError = err;
|
|
203
|
-
LogService.warn("MatrixSyncCacheStore", "Failed to load Matrix sync cache:", err);
|
|
204
|
-
}
|
|
205
|
-
this.store = syncCacheStore;
|
|
206
|
-
this.storeUnavailableError = syncCacheStoreUnavailableError;
|
|
207
|
-
this.savedSync = restoredSavedSync;
|
|
208
|
-
this.savedClientOptions = restoredClientOptions;
|
|
209
|
-
this.hadSavedSyncOnLoad = restoredSavedSync !== null;
|
|
210
|
-
this.hadCleanShutdownOnLoad = this.hadSavedSyncOnLoad && restoredCleanShutdown;
|
|
211
|
-
this.cleanShutdown = this.hadCleanShutdownOnLoad;
|
|
212
|
-
if (this.savedSync) {
|
|
213
|
-
this.accumulator.accumulate(syncDataToSyncResponse(this.savedSync), true);
|
|
214
|
-
super.setSyncToken(this.savedSync.nextBatch);
|
|
215
|
-
}
|
|
216
|
-
if (this.savedClientOptions) super.storeClientOptions(this.savedClientOptions);
|
|
217
|
-
}
|
|
218
|
-
hasSavedSync() {
|
|
219
|
-
return this.hadSavedSyncOnLoad;
|
|
220
|
-
}
|
|
221
|
-
hasSavedSyncFromCleanShutdown() {
|
|
222
|
-
return this.hadCleanShutdownOnLoad;
|
|
223
|
-
}
|
|
224
|
-
getSavedSync() {
|
|
225
|
-
return Promise.resolve(this.savedSync ? cloneJson(this.savedSync) : null);
|
|
226
|
-
}
|
|
227
|
-
getSavedSyncToken() {
|
|
228
|
-
return Promise.resolve(this.savedSync?.nextBatch ?? null);
|
|
229
|
-
}
|
|
230
|
-
setSyncData(syncData) {
|
|
231
|
-
if (this.frozen) return Promise.resolve();
|
|
232
|
-
this.accumulator.accumulate(syncData);
|
|
233
|
-
this.savedSync = this.accumulator.getJSON();
|
|
234
|
-
this.markDirtyAndSchedulePersist();
|
|
235
|
-
return Promise.resolve();
|
|
236
|
-
}
|
|
237
|
-
getClientOptions() {
|
|
238
|
-
return Promise.resolve(this.savedClientOptions ? cloneJson(this.savedClientOptions) : void 0);
|
|
239
|
-
}
|
|
240
|
-
storeClientOptions(options) {
|
|
241
|
-
if (this.frozen) return Promise.resolve();
|
|
242
|
-
this.savedClientOptions = cloneJson(options);
|
|
243
|
-
super.storeClientOptions(options);
|
|
244
|
-
this.markDirtyAndSchedulePersist();
|
|
245
|
-
return Promise.resolve();
|
|
246
|
-
}
|
|
247
|
-
save(force = false) {
|
|
248
|
-
if (force) return this.flush();
|
|
249
|
-
return Promise.resolve();
|
|
250
|
-
}
|
|
251
|
-
wantsSave() {
|
|
252
|
-
return false;
|
|
253
|
-
}
|
|
254
|
-
async deleteAllData() {
|
|
255
|
-
this.assertStoreAvailable();
|
|
256
|
-
if (this.persistTimer) {
|
|
257
|
-
clearTimeout(this.persistTimer);
|
|
258
|
-
this.persistTimer = null;
|
|
259
|
-
}
|
|
260
|
-
this.dirty = false;
|
|
261
|
-
await this.persistPromise?.catch(() => void 0);
|
|
262
|
-
await super.deleteAllData();
|
|
263
|
-
this.savedSync = null;
|
|
264
|
-
this.savedClientOptions = void 0;
|
|
265
|
-
this.cleanShutdown = false;
|
|
266
|
-
await deleteMatrixSyncCacheStateFromSyncStore({
|
|
267
|
-
storageRootDir: this.storageRootDir,
|
|
268
|
-
store: this.store
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
markCleanShutdown() {
|
|
272
|
-
this.cleanShutdown = true;
|
|
273
|
-
this.dirty = true;
|
|
274
|
-
}
|
|
275
|
-
async freezeSyncCursorPersistence() {
|
|
276
|
-
this.frozen = true;
|
|
277
|
-
if (this.persistTimer) {
|
|
278
|
-
clearTimeout(this.persistTimer);
|
|
279
|
-
this.persistTimer = null;
|
|
280
|
-
}
|
|
281
|
-
await this.persistPromise;
|
|
282
|
-
}
|
|
283
|
-
discardPendingSyncCursorPersistence() {
|
|
284
|
-
this.frozen = true;
|
|
285
|
-
if (this.persistTimer) {
|
|
286
|
-
clearTimeout(this.persistTimer);
|
|
287
|
-
this.persistTimer = null;
|
|
288
|
-
}
|
|
289
|
-
this.cleanShutdown = false;
|
|
290
|
-
this.dirty = false;
|
|
291
|
-
}
|
|
292
|
-
async flush() {
|
|
293
|
-
if (this.persistTimer) {
|
|
294
|
-
clearTimeout(this.persistTimer);
|
|
295
|
-
this.persistTimer = null;
|
|
296
|
-
}
|
|
297
|
-
while (this.dirty || this.persistPromise) {
|
|
298
|
-
if (this.dirty && !this.persistPromise) this.persistPromise = this.persist().finally(() => {
|
|
299
|
-
this.persistPromise = null;
|
|
300
|
-
});
|
|
301
|
-
await this.persistPromise;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
markDirtyAndSchedulePersist() {
|
|
305
|
-
if (this.frozen) return;
|
|
306
|
-
this.cleanShutdown = false;
|
|
307
|
-
this.dirty = true;
|
|
308
|
-
if (this.persistTimer) return;
|
|
309
|
-
this.persistTimer = setTimeout(() => {
|
|
310
|
-
this.persistTimer = null;
|
|
311
|
-
this.flush().catch((err) => {
|
|
312
|
-
LogService.warn("MatrixSyncCacheStore", "Failed to persist Matrix sync store:", err);
|
|
313
|
-
});
|
|
314
|
-
}, PERSIST_DEBOUNCE_MS);
|
|
315
|
-
this.persistTimer.unref?.();
|
|
316
|
-
}
|
|
317
|
-
async persist() {
|
|
318
|
-
this.assertStoreAvailable();
|
|
319
|
-
this.dirty = false;
|
|
320
|
-
const payload = {
|
|
321
|
-
version: 1,
|
|
322
|
-
savedSync: this.savedSync ? cloneJson(this.savedSync) : null,
|
|
323
|
-
cleanShutdown: this.cleanShutdown,
|
|
324
|
-
...this.savedClientOptions ? { clientOptions: cloneJson(this.savedClientOptions) } : {}
|
|
325
|
-
};
|
|
326
|
-
try {
|
|
327
|
-
await this.persistLock(async () => {
|
|
328
|
-
writeMatrixSyncCacheStateToSyncStore({
|
|
329
|
-
payload,
|
|
330
|
-
store: this.store
|
|
331
|
-
});
|
|
332
|
-
await claimCurrentTokenStorageState({ rootDir: this.storageRootDir });
|
|
333
|
-
});
|
|
334
|
-
} catch (err) {
|
|
335
|
-
this.dirty = true;
|
|
336
|
-
throw err;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
assertStoreAvailable() {
|
|
340
|
-
if (this.storeUnavailableError == null) return;
|
|
341
|
-
throw new Error("Matrix sync cache SQLite store is unavailable; cannot persist sync state", { cause: this.storeUnavailableError });
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
function createNoopMatrixSyncCacheStore() {
|
|
345
|
-
return {
|
|
346
|
-
register: () => {},
|
|
347
|
-
registerIfAbsent: () => false,
|
|
348
|
-
lookup: () => void 0,
|
|
349
|
-
lookupMany: (keys) => keys.map(() => ({
|
|
350
|
-
ok: true,
|
|
351
|
-
value: void 0
|
|
352
|
-
})),
|
|
353
|
-
consume: () => void 0,
|
|
354
|
-
delete: () => false,
|
|
355
|
-
entries: () => [],
|
|
356
|
-
clear: () => {}
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
function openMatrixSyncCacheStore(storageRootDir) {
|
|
360
|
-
return getMatrixRuntime().state.openSyncKeyedStore(openMatrixSyncCacheStoreOptions(storageRootDir));
|
|
361
|
-
}
|
|
362
|
-
//#endregion
|
|
363
144
|
//#region extensions/matrix/src/matrix/sdk/client-sync-quiesce.ts
|
|
364
145
|
const MATRIX_SYNC_QUIESCE_TIMEOUT_MS = 5e3;
|
|
365
146
|
const MATRIX_JS_SDK_SYNC_VERSION = "42.3.0";
|
|
@@ -907,7 +688,7 @@ var MatrixSendScheduler = class extends MatrixScheduler {
|
|
|
907
688
|
//#region extensions/matrix/src/matrix/sdk/client-base.ts
|
|
908
689
|
const MATRIX_ENCRYPTED_STARTUP_TIMEOUT_MS = 6e4;
|
|
909
690
|
let loadedMatrixCryptoRuntime = null;
|
|
910
|
-
const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-
|
|
691
|
+
const loadMatrixCryptoRuntime = createLazyRuntimeModule(() => import("./crypto-runtime-D9qn_Pbj.mjs").then((runtime) => {
|
|
911
692
|
loadedMatrixCryptoRuntime = runtime;
|
|
912
693
|
return runtime;
|
|
913
694
|
}));
|
|
@@ -976,7 +757,7 @@ var MatrixClientBase = class {
|
|
|
976
757
|
this.encryptionEnabled = opts.encryption === true;
|
|
977
758
|
const { password: loginPassword } = opts;
|
|
978
759
|
this.password = loginPassword;
|
|
979
|
-
this.syncStore = opts.
|
|
760
|
+
this.syncStore = opts.syncStore;
|
|
980
761
|
this.idbSnapshotPath = opts.idbSnapshotPath;
|
|
981
762
|
this.cryptoDatabasePrefix = opts.cryptoDatabasePrefix;
|
|
982
763
|
this.stateRuntime = opts.stateRuntime;
|
|
@@ -7,7 +7,7 @@ import { _ as MsgType, d as buildMatrixMessageRelation, f as resolveMatrixReplyT
|
|
|
7
7
|
import { n as getMatrixEventProjection } from "./event-helpers-CspuhE9k.mjs";
|
|
8
8
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
9
9
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
10
|
-
import { asNullableObjectRecord, asNullableRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
|
+
import { asFiniteNumber, asNullableObjectRecord, asNullableRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
11
11
|
import { FormatCapabilityProfile, convertMarkdownTables, findCodeRegions, isInsideCode, markdownToIR, renderMarkdownWithMarkers, tokenizeHtmlTags } from "openclaw/plugin-sdk/text-chunking";
|
|
12
12
|
import { createHash } from "node:crypto";
|
|
13
13
|
import path from "node:path";
|
|
@@ -16,12 +16,14 @@ import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"
|
|
|
16
16
|
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
|
|
17
17
|
import { M_POLL_KIND_DISCLOSED } from "matrix-js-sdk/lib/@types/polls.js";
|
|
18
18
|
import { normalizePollInput } from "openclaw/plugin-sdk/poll-runtime";
|
|
19
|
+
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
20
|
+
import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
|
|
19
21
|
import MarkdownIt from "markdown-it";
|
|
20
22
|
import { isAutoLinkedFileRef } from "openclaw/plugin-sdk/text-autolink-runtime";
|
|
21
23
|
import { isVoiceMessageCompatibleAudio } from "openclaw/plugin-sdk/media-runtime";
|
|
22
24
|
import { parseBuffer } from "music-metadata";
|
|
23
25
|
//#region extensions/matrix/src/matrix/send/client.ts
|
|
24
|
-
const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-
|
|
26
|
+
const loadMatrixSendClientRuntime = createLazyRuntimeModule(() => import("./client-bootstrap-BSnUAoz1.mjs"));
|
|
25
27
|
function resolveMediaMaxBytes(accountId, cfg) {
|
|
26
28
|
if (!cfg) throw new Error("Matrix media limits requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
|
|
27
29
|
const resolvedCfg = requireRuntimeConfig(cfg, "Matrix media limits");
|
|
@@ -281,13 +283,15 @@ async function loadQueuePlans(queueId) {
|
|
|
281
283
|
const entries = await store.entries();
|
|
282
284
|
const prefix = entries.length > 0 ? queuePrefix(queueId) : "";
|
|
283
285
|
const keys = entries.filter((entry) => entry.key.startsWith(prefix)).map((entry) => entry.key);
|
|
284
|
-
|
|
286
|
+
const plans = [];
|
|
287
|
+
for (const key of keys) {
|
|
285
288
|
const entry = await store.lookup(key);
|
|
286
289
|
if (!entry) throw new MatrixDeliveryPlanInvariantError("Matrix durable delivery plan disappeared during reconciliation");
|
|
287
290
|
const plan = decodePlan(entry.bytes);
|
|
288
291
|
if (key !== planKey(plan)) throw new MatrixDeliveryPlanInvariantError("Matrix durable delivery plan key is invalid");
|
|
289
|
-
|
|
290
|
-
}
|
|
292
|
+
plans.push(plan);
|
|
293
|
+
}
|
|
294
|
+
return plans;
|
|
291
295
|
}
|
|
292
296
|
function assertCompletePartTopology(plans) {
|
|
293
297
|
const partCount = plans[0]?.partCount;
|
|
@@ -379,7 +383,7 @@ async function cleanupMatrixDeliveryPlans(ctx) {
|
|
|
379
383
|
const entries = await store.entries();
|
|
380
384
|
const prefix = entries.length > 0 ? queuePrefix(ctx.queueId) : "";
|
|
381
385
|
const keys = entries.filter((entry) => entry.key.startsWith(prefix)).map((entry) => entry.key);
|
|
382
|
-
|
|
386
|
+
for (const key of keys) await store.delete(key);
|
|
383
387
|
}
|
|
384
388
|
//#endregion
|
|
385
389
|
//#region extensions/matrix/src/matrix/poll-types.ts
|
|
@@ -488,14 +492,14 @@ function buildPollResultsSummary(params) {
|
|
|
488
492
|
if (event.unsigned?.redacted_because) continue;
|
|
489
493
|
if (!isPollEndType(typeof event.type === "string" ? event.type : "")) continue;
|
|
490
494
|
if (event.sender !== params.sender) continue;
|
|
491
|
-
const ts =
|
|
495
|
+
const ts = asFiniteNumber(event.origin_server_ts) ?? Number.POSITIVE_INFINITY;
|
|
492
496
|
if (ts < pollClosedAt) pollClosedAt = ts;
|
|
493
497
|
}
|
|
494
498
|
const answerIds = new Set(parsed.answers.map((answer) => answer.id));
|
|
495
499
|
const latestVoteBySender = /* @__PURE__ */ new Map();
|
|
496
500
|
const orderedRelationEvents = [...params.relationEvents].toSorted((left, right) => {
|
|
497
|
-
const leftTs =
|
|
498
|
-
const rightTs =
|
|
501
|
+
const leftTs = asFiniteNumber(left.origin_server_ts) ?? Number.POSITIVE_INFINITY;
|
|
502
|
+
const rightTs = asFiniteNumber(right.origin_server_ts) ?? Number.POSITIVE_INFINITY;
|
|
499
503
|
if (leftTs !== rightTs) return leftTs - rightTs;
|
|
500
504
|
return (left.event_id ?? "").localeCompare(right.event_id ?? "");
|
|
501
505
|
});
|
|
@@ -504,7 +508,7 @@ function buildPollResultsSummary(params) {
|
|
|
504
508
|
if (!isPollResponseType(typeof event.type === "string" ? event.type : "")) continue;
|
|
505
509
|
const senderId = normalizeOptionalString(event.sender) ?? "";
|
|
506
510
|
if (!senderId) continue;
|
|
507
|
-
const eventTs =
|
|
511
|
+
const eventTs = asFiniteNumber(event.origin_server_ts) ?? Number.POSITIVE_INFINITY;
|
|
508
512
|
if (eventTs > pollClosedAt) continue;
|
|
509
513
|
const rawAnswers = parsePollResponseAnswerIds(event.content) ?? [];
|
|
510
514
|
const normalizedAnswers = Array.from(new Set(rawAnswers.map((answerId) => normalizeOptionalString(answerId) ?? "").filter((answerId) => answerIds.has(answerId)).slice(0, parsed.maxSelections)));
|
|
@@ -1369,14 +1373,14 @@ function prepareMatrixSingleText(text, opts) {
|
|
|
1369
1373
|
const normalizedText = text.replace(/\r\n?/gu, "\n");
|
|
1370
1374
|
const trimmedText = opts.preserveWhitespace ? normalizedText : normalizedText.trim();
|
|
1371
1375
|
const cfg = requireRuntimeConfig(opts.cfg, "Matrix text preparation");
|
|
1372
|
-
const tableMode = opts.tableMode ??
|
|
1376
|
+
const tableMode = opts.tableMode ?? resolveMarkdownTableMode({
|
|
1373
1377
|
cfg,
|
|
1374
1378
|
channel: "matrix",
|
|
1375
1379
|
accountId: opts.accountId,
|
|
1376
1380
|
supportsBlockTables: MATRIX_FORMAT_PROFILE.constructs.table === "native"
|
|
1377
1381
|
});
|
|
1378
1382
|
const convertedText = renderMatrixMarkdownTables(trimmedText, tableMode);
|
|
1379
|
-
const singleEventLimit = normalizeMatrixEventLimit(Math.min(
|
|
1383
|
+
const singleEventLimit = normalizeMatrixEventLimit(Math.min(resolveTextChunkLimit(cfg, "matrix", opts.accountId), MATRIX_FORMAT_PROFILE.chunk.limit));
|
|
1380
1384
|
const preparedBody = markdownToMatrixBody(convertedText);
|
|
1381
1385
|
const eventTextLength = Math.max(convertedText.length, preparedBody.length);
|
|
1382
1386
|
return {
|
|
@@ -1671,23 +1675,16 @@ function buildMatrixMediaInfo(params) {
|
|
|
1671
1675
|
const base = {};
|
|
1672
1676
|
if (Number.isFinite(params.size)) base.size = params.size;
|
|
1673
1677
|
if (params.mimetype) base.mimetype = params.mimetype;
|
|
1674
|
-
|
|
1675
|
-
const dimensional = {
|
|
1676
|
-
...base,
|
|
1677
|
-
...params.imageInfo
|
|
1678
|
-
};
|
|
1679
|
-
if (typeof params.durationMs === "number") return {
|
|
1680
|
-
...dimensional,
|
|
1681
|
-
duration: params.durationMs
|
|
1682
|
-
};
|
|
1683
|
-
return dimensional;
|
|
1684
|
-
}
|
|
1685
|
-
if (typeof params.durationMs === "number") return {
|
|
1678
|
+
const info = params.imageInfo ? {
|
|
1686
1679
|
...base,
|
|
1680
|
+
...params.imageInfo
|
|
1681
|
+
} : base;
|
|
1682
|
+
if (typeof params.durationMs === "number") return {
|
|
1683
|
+
...info,
|
|
1687
1684
|
duration: params.durationMs
|
|
1688
1685
|
};
|
|
1689
|
-
if (Object.keys(
|
|
1690
|
-
return
|
|
1686
|
+
if (!params.imageInfo && Object.keys(info).length === 0) return;
|
|
1687
|
+
return info;
|
|
1691
1688
|
}
|
|
1692
1689
|
function buildMediaContent(params) {
|
|
1693
1690
|
const info = buildMatrixMediaInfo({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
2
|
-
import "./accounts-
|
|
3
|
-
import { n as bootstrapMatrixVerification } from "./verification-
|
|
2
|
+
import "./accounts-iThMol10.mjs";
|
|
3
|
+
import { n as bootstrapMatrixVerification } from "./verification-0o8MOW9T.mjs";
|
|
4
4
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
5
5
|
//#region extensions/matrix/src/setup-bootstrap.ts
|
|
6
6
|
async function maybeBootstrapNewEncryptedMatrixAccount(params) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as resolveMatrixEnvAuthReadiness } from "./account-selection-BHkfU1eC.mjs";
|
|
2
2
|
import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
3
|
-
import { r as resolveDefaultMatrixAccountId } from "./accounts-
|
|
3
|
+
import { r as resolveDefaultMatrixAccountId } from "./accounts-iThMol10.mjs";
|
|
4
4
|
import { t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.mjs";
|
|
5
5
|
import { r as updateMatrixAccountConfig } from "./config-update-B_4qZ5bV.mjs";
|
|
6
6
|
import { t as isSupportedMatrixAvatarSource } from "./profile-ClrB3IgR.mjs";
|
|
@@ -296,7 +296,7 @@ const matrixSetupAdapter = {
|
|
|
296
296
|
input
|
|
297
297
|
}),
|
|
298
298
|
afterAccountConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
|
|
299
|
-
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-
|
|
299
|
+
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-A_WGFq1Y.mjs");
|
|
300
300
|
await runMatrixSetupBootstrapAfterConfigWrite({
|
|
301
301
|
previousCfg,
|
|
302
302
|
cfg,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { i as requiresExplicitMatrixDefaultAccount, l as resolveMatrixEnvAuthReadiness } from "./account-selection-BHkfU1eC.mjs";
|
|
3
3
|
import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
4
|
-
import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-
|
|
4
|
+
import { i as resolveMatrixAccount, r as resolveDefaultMatrixAccountId, t as listMatrixAccountIds } from "./accounts-iThMol10.mjs";
|
|
5
5
|
import { n as isMatrixRoomId } from "./target-ids-Nwx7cMVE.mjs";
|
|
6
6
|
import { r as updateMatrixAccountConfig } from "./config-update-B_4qZ5bV.mjs";
|
|
7
|
-
import { a as moveSingleMatrixAccountConfigToNamedAccount, i as createMatrixSetupDmPolicy } from "./setup-core-
|
|
7
|
+
import { a as moveSingleMatrixAccountConfigToNamedAccount, i as createMatrixSetupDmPolicy } from "./setup-core-D2hMbIi3.mjs";
|
|
8
8
|
import { n as validateMatrixHomeserverUrl, r as isPrivateOrLoopbackHost, t as resolveValidatedMatrixHomeserverUrl } from "./url-validation-GRHde6lq.mjs";
|
|
9
9
|
import { n as ensureMatrixSdkInstalled, r as isMatrixSdkAvailable } from "./deps-mtxF2mHI.mjs";
|
|
10
10
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString, normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -91,7 +91,7 @@ async function promptMatrixAllowFrom(params) {
|
|
|
91
91
|
pending.push(part);
|
|
92
92
|
}
|
|
93
93
|
if (pending.length > 0) {
|
|
94
|
-
const { resolveMatrixTargets } = await import("./resolve-targets-
|
|
94
|
+
const { resolveMatrixTargets } = await import("./resolve-targets-BLz748lX.mjs").then((n) => n.n);
|
|
95
95
|
const results = await resolveMatrixTargets({
|
|
96
96
|
cfg,
|
|
97
97
|
accountId,
|
|
@@ -211,7 +211,7 @@ async function configureMatrixAccessPrompts(params) {
|
|
|
211
211
|
resolvedIds.push(cleaned);
|
|
212
212
|
continue;
|
|
213
213
|
}
|
|
214
|
-
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-
|
|
214
|
+
const { listMatrixDirectoryGroupsLive } = await import("./directory-live-CxqkcYbT.mjs").then((n) => n.t);
|
|
215
215
|
const matches = await listMatrixDirectoryGroupsLive({
|
|
216
216
|
cfg: next,
|
|
217
217
|
accountId: params.accountId,
|
|
@@ -464,7 +464,7 @@ const matrixOnboardingAdapter = {
|
|
|
464
464
|
});
|
|
465
465
|
},
|
|
466
466
|
afterConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
|
|
467
|
-
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-
|
|
467
|
+
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-A_WGFq1Y.mjs");
|
|
468
468
|
await runMatrixSetupBootstrapAfterConfigWrite({
|
|
469
469
|
previousCfg,
|
|
470
470
|
cfg,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { o as resolveMatrixStoragePaths, r as recordCurrentStorageMetaDeviceId } from "./storage-
|
|
2
|
+
import { O as resolveMatrixSqliteStateEnv } from "./storage-metadata-fHN6Df2m.mjs";
|
|
3
|
+
import { o as resolveMatrixStoragePaths, r as recordCurrentStorageMetaDeviceId } from "./storage-BXaFc0S4.mjs";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -19,8 +19,8 @@ function normalizeCooldownHours(value) {
|
|
|
19
19
|
if (typeof value !== "number" || !Number.isFinite(value)) return DEFAULT_STARTUP_VERIFICATION_COOLDOWN_HOURS;
|
|
20
20
|
return Math.max(0, value);
|
|
21
21
|
}
|
|
22
|
-
function resolveStartupVerificationStatePath(params) {
|
|
23
|
-
const storagePaths = resolveMatrixStoragePaths({
|
|
22
|
+
async function resolveStartupVerificationStatePath(params) {
|
|
23
|
+
const storagePaths = await resolveMatrixStoragePaths({
|
|
24
24
|
homeserver: params.auth.homeserver,
|
|
25
25
|
userId: params.auth.userId,
|
|
26
26
|
accessToken: params.auth.accessToken,
|
|
@@ -69,7 +69,7 @@ async function readStartupVerificationState(params) {
|
|
|
69
69
|
if (await migrationStore.lookup(legacyImportKey)) return null;
|
|
70
70
|
const legacy = await readLegacyStartupVerificationState(params.legacyFilePath);
|
|
71
71
|
if (legacy) await store.register(key, legacy).then(async () => {
|
|
72
|
-
if (typeof legacy.deviceId === "string" && legacy.deviceId.trim()) recordCurrentStorageMetaDeviceId({
|
|
72
|
+
if (typeof legacy.deviceId === "string" && legacy.deviceId.trim()) await recordCurrentStorageMetaDeviceId({
|
|
73
73
|
rootDir: path.dirname(params.legacyFilePath),
|
|
74
74
|
deviceId: legacy.deviceId
|
|
75
75
|
});
|
|
@@ -84,7 +84,7 @@ async function writeStartupVerificationState(params) {
|
|
|
84
84
|
auth: params.auth,
|
|
85
85
|
legacyFilePath: params.legacyFilePath
|
|
86
86
|
}), { importedAt: Date.now() }).catch(() => {});
|
|
87
|
-
if (typeof params.state.deviceId === "string" && params.state.deviceId.trim()) recordCurrentStorageMetaDeviceId({
|
|
87
|
+
if (typeof params.state.deviceId === "string" && params.state.deviceId.trim()) await recordCurrentStorageMetaDeviceId({
|
|
88
88
|
rootDir: path.dirname(params.legacyFilePath),
|
|
89
89
|
deviceId: params.state.deviceId
|
|
90
90
|
});
|
|
@@ -127,7 +127,7 @@ function hasPendingSelfVerification(verifications) {
|
|
|
127
127
|
async function ensureMatrixStartupVerification(params) {
|
|
128
128
|
if (params.auth.encryption !== true || !params.client.crypto) return { kind: "unsupported" };
|
|
129
129
|
const verification = await params.client.getOwnDeviceVerificationStatus();
|
|
130
|
-
const statePath = params.stateFilePath ?? resolveStartupVerificationStatePath({
|
|
130
|
+
const statePath = params.stateFilePath ?? await resolveStartupVerificationStatePath({
|
|
131
131
|
auth: params.auth,
|
|
132
132
|
env: params.env,
|
|
133
133
|
stateDir: params.stateDir
|