@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,29 +1,29 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
2
|
import { a as resolveMatrixAccountConfig, i as resolveMatrixAccountAllowlistConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
3
|
-
import { n as resolveConfiguredMatrixBotUserIds } from "./accounts-
|
|
4
|
-
import { _ as toLocationContext, a as resolveMatrixRoomConfig, c as canonicalizeAllowlistWithResolvedIds, d as formatLocationText, f as getAgentScopedMediaLocalRoots, g as summarizeMapping, h as patchAllowlistUsersInConfigEntries, i as resolveMatrixThreadRouting, l as createReplyPrefixOptions, m as logTypingFailure, n as resolveMatrixStoredSessionMeta, o as addAllowlistUserEntriesFromConfigEntry, p as logInboundDrop, r as resolveMatrixInboundRoute, s as buildAllowlistResolutionSummary, u as createTypingCallbacks } from "./channel-
|
|
5
|
-
import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./channel.setup-
|
|
3
|
+
import { n as resolveConfiguredMatrixBotUserIds } from "./accounts-iThMol10.mjs";
|
|
4
|
+
import { _ as toLocationContext, a as resolveMatrixRoomConfig, c as canonicalizeAllowlistWithResolvedIds, d as formatLocationText, f as getAgentScopedMediaLocalRoots, g as summarizeMapping, h as patchAllowlistUsersInConfigEntries, i as resolveMatrixThreadRouting, l as createReplyPrefixOptions, m as logTypingFailure, n as resolveMatrixStoredSessionMeta, o as addAllowlistUserEntriesFromConfigEntry, p as logInboundDrop, r as resolveMatrixInboundRoute, s as buildAllowlistResolutionSummary, u as createTypingCallbacks } from "./channel-ConuJfxT.mjs";
|
|
5
|
+
import { a as normalizeMatrixUserId, i as normalizeMatrixAllowList, o as resolveMatrixAllowListMatch } from "./channel.setup-C6KvBV8l.mjs";
|
|
6
6
|
import { n as isMatrixRoomId, t as isMatrixQualifiedUserId } from "./target-ids-Nwx7cMVE.mjs";
|
|
7
7
|
import { a as MATRIX_REACTION_EVENT_TYPE } from "./send-currentness-BrGXL7b8.mjs";
|
|
8
8
|
import { c as isStrictDirectMembership, f as resolveMatrixReplyToEventId, h as MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY, i as promoteMatrixDirectRoomCandidate, p as resolveMatrixThreadRootId, s as hasDirectMatrixMemberFlag, u as readJoinedMatrixMembers } from "./direct-management-B2Bno2xL.mjs";
|
|
9
|
-
import { S as parsePollStartContent, _ as formatPollAsText, b as isPollStartType, c as formatMatrixMediaTooLargeText, d as isLikelyBareFilename, l as formatMatrixMediaUnavailableText, p as resolveMatrixReplacementContent, r as sendMessageMatrix, u as formatMatrixMessageText, y as isPollEventType } from "./send-
|
|
10
|
-
import { t as createMatrixThreadBindingManager } from "./thread-bindings-
|
|
11
|
-
import {
|
|
12
|
-
import { c as createMatrixMonitorTaskRunner, d as resolveMatrixAuthContext, l as
|
|
13
|
-
import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-
|
|
14
|
-
import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-
|
|
15
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-
|
|
16
|
-
import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-
|
|
9
|
+
import { S as parsePollStartContent, _ as formatPollAsText, b as isPollStartType, c as formatMatrixMediaTooLargeText, d as isLikelyBareFilename, l as formatMatrixMediaUnavailableText, p as resolveMatrixReplacementContent, r as sendMessageMatrix, u as formatMatrixMessageText, y as isPollEventType } from "./send-aVdC5NJO.mjs";
|
|
10
|
+
import { t as createMatrixThreadBindingManager } from "./thread-bindings-JlnLDfPM.mjs";
|
|
11
|
+
import { i as readMatrixMessages, u as fetchMatrixPollSnapshot } from "./messages-COuAcrz-.mjs";
|
|
12
|
+
import { c as createMatrixMonitorTaskRunner, d as resolveMatrixAuth, f as resolveMatrixAuthContext, l as getMatrixMonitorTaskSignal, o as isMatrixStartupAbortError, r as acquireSharedMatrixClient, s as throwIfMatrixStartupAborted, u as backfillMatrixAuthDeviceIdAfterStartup } from "./client-ChrXpxos.mjs";
|
|
13
|
+
import { i as isMatrixMediaSizeLimitError, r as MatrixMediaSizeLimitError } from "./http-client-Bi6uKmzh.mjs";
|
|
14
|
+
import { n as prepareMatrixReplyPayload, r as resolveMatrixExtraContent } from "./outbound-B508VPBM.mjs";
|
|
15
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-BLz748lX.mjs";
|
|
16
|
+
import { t as formatMatrixEncryptedEventDisabledWarning } from "./encryption-guidance-CMWXiBzJ.mjs";
|
|
17
17
|
import { createMatrixInboundEventDeduper } from "./inbound-dedupe-BSlv35xl.mjs";
|
|
18
18
|
import { a as isMatrixAccessTokenInvalidatedError, d as isMatrixDisconnectedSyncState, f as isMatrixReadySyncState, p as isMatrixTerminalSyncState } from "./client-support-Bn9Bk0-H.mjs";
|
|
19
|
-
import { i as setBoundedMap, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-
|
|
19
|
+
import { i as setBoundedMap, r as getMatrixRoomInfo, t as createMatrixRoomInfoResolver } from "./room-info-DTyP1k5g.mjs";
|
|
20
20
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
21
|
-
import { createChannelProgressDraftCompositor,
|
|
21
|
+
import { createChannelProgressDraftCompositor, createLivePreviewLifecycle, createPreviewMessageReceipt, resolveChannelStreamingBlockEnabled, waitUntilAbort } from "openclaw/plugin-sdk/channel-outbound";
|
|
22
22
|
import { normalizeLowercaseStringOrEmpty, normalizeNullableString, normalizeOptionalString, normalizeStringifiedEntries, readStringValue, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
23
23
|
import { stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
|
|
24
24
|
import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
25
25
|
import { extractErrorCode, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
26
|
-
import { isFutureDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
26
|
+
import { isFutureDateTimestampMs, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, resolveOptionalIntegerOption, resolvePromptHistoryLimit } from "openclaw/plugin-sdk/number-runtime";
|
|
27
27
|
import { resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
28
28
|
import { createAcceptedChannelDeliveryResult, createChannelInboundEnvelopeBuilder, createChannelPartialDeliveryError, hasFinalInboundReplyDispatch, isChannelPartialDeliveryError, resolveInboundMentionDecision, resolveInboundReplyDispatchCounts, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
|
|
29
29
|
import { getSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
@@ -37,7 +37,7 @@ import { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy,
|
|
|
37
37
|
import { resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAgeMsForChannel } from "openclaw/plugin-sdk/thread-bindings-runtime";
|
|
38
38
|
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
39
39
|
import { reportChannelRoomJoin } from "openclaw/plugin-sdk/channel-join-intro-runtime";
|
|
40
|
-
import {
|
|
40
|
+
import { defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
41
41
|
import { resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
|
|
42
42
|
import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
|
|
43
43
|
import { evaluateSupplementalContextVisibility, resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
|
|
@@ -738,7 +738,7 @@ async function resolveMatrixMonitorAccessState(params) {
|
|
|
738
738
|
});
|
|
739
739
|
const accountId = params.accountId ?? "default";
|
|
740
740
|
const eventKind = params.eventKind ?? "message";
|
|
741
|
-
const ingress =
|
|
741
|
+
const ingress = getMatrixRuntime().channel.inbound.ingress.createResolver({
|
|
742
742
|
channelId: "matrix",
|
|
743
743
|
accountId,
|
|
744
744
|
identity: matrixIngressIdentity,
|
|
@@ -775,7 +775,7 @@ async function resolveMatrixMonitorAccessState(params) {
|
|
|
775
775
|
async function resolveMatrixMonitorCommandAccess(state, params) {
|
|
776
776
|
const commandAllowFrom = state.isRoom ? [] : state.messageIngress.senderAccess.effectiveAllowFrom;
|
|
777
777
|
const commandGroupAllowFrom = state.effectiveRoomUsers.length > 0 ? state.effectiveRoomUsers : state.effectiveGroupAllowFrom;
|
|
778
|
-
return (await
|
|
778
|
+
return (await getMatrixRuntime().channel.inbound.ingress.createResolver({
|
|
779
779
|
channelId: "matrix",
|
|
780
780
|
accountId: state.accountId,
|
|
781
781
|
identity: matrixIngressIdentity
|
|
@@ -1648,17 +1648,14 @@ function formatMatrixToolProgressMarkdownCode(text) {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
//#endregion
|
|
1650
1650
|
//#region extensions/matrix/src/matrix/monitor/handler-runtime.ts
|
|
1651
|
-
async function redactMatrixDraftEvent(client, roomId, draftEventId) {
|
|
1652
|
-
return await client.redactEvent(roomId, draftEventId).then(() => true, () => false);
|
|
1653
|
-
}
|
|
1654
1651
|
function buildMatrixFinalizedPreviewContent() {
|
|
1655
1652
|
return { [MATRIX_OPENCLAW_FINALIZED_PREVIEW_KEY]: true };
|
|
1656
1653
|
}
|
|
1657
|
-
const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-
|
|
1654
|
+
const loadMatrixSendModule = createLazyRuntimeModule(() => import("./send-aVdC5NJO.mjs").then((n) => n.s));
|
|
1658
1655
|
const loadAcpBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/acp-binding-runtime"));
|
|
1659
1656
|
const loadSessionBindingRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/session-binding-runtime"));
|
|
1660
|
-
const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-
|
|
1661
|
-
const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-
|
|
1657
|
+
const loadMatrixReactionEvents = createLazyRuntimeModule(() => import("./reaction-events-BvZmhjLC.mjs"));
|
|
1658
|
+
const loadMatrixDraftStream = createLazyRuntimeModule(() => import("./draft-stream-y0Vq5f38.mjs"));
|
|
1662
1659
|
async function matrixTextWouldActivateMentions(client, text) {
|
|
1663
1660
|
const { resolveMatrixMentionsForBody } = await loadMatrixSendModule();
|
|
1664
1661
|
const mentions = await resolveMatrixMentionsForBody({
|
|
@@ -1863,6 +1860,7 @@ async function resolveMatrixInboundContext(config) {
|
|
|
1863
1860
|
const channelIngress = await resolveMessageIngress({
|
|
1864
1861
|
agentId: _route.agentId,
|
|
1865
1862
|
sessionKey: _route.sessionKey,
|
|
1863
|
+
nativeChannelId: roomId,
|
|
1866
1864
|
messageId,
|
|
1867
1865
|
inboundEventKind: "user_request"
|
|
1868
1866
|
}, {
|
|
@@ -1910,9 +1908,7 @@ async function resolveMatrixInboundContext(config) {
|
|
|
1910
1908
|
threadId: threadTarget
|
|
1911
1909
|
},
|
|
1912
1910
|
route: {
|
|
1913
|
-
|
|
1914
|
-
dmScope: _route.dmScope,
|
|
1915
|
-
accountId: _route.accountId,
|
|
1911
|
+
..._route,
|
|
1916
1912
|
routeSessionKey: _route.sessionKey,
|
|
1917
1913
|
parentSessionKey: threadTarget && _route.matchedBy !== "binding.channel" ? _route.mainSessionKey : void 0
|
|
1918
1914
|
},
|
|
@@ -1986,7 +1982,6 @@ async function resolveMatrixInboundContext(config) {
|
|
|
1986
1982
|
//#region extensions/matrix/src/matrix/monitor/handler-draft-controller.ts
|
|
1987
1983
|
async function createMatrixDraftController(params) {
|
|
1988
1984
|
const { streaming, previewToolProgressEnabled, replyToMode, messageId, threadTarget, accountConfig, cfg, accountId, roomId, client, logVerboseMessage } = params;
|
|
1989
|
-
let draftDisposition = "active";
|
|
1990
1985
|
const draftStreamingEnabled = streaming !== "off";
|
|
1991
1986
|
const quietDraftStreaming = streaming === "quiet" || streaming === "progress";
|
|
1992
1987
|
const progressDraftStreaming = streaming === "progress";
|
|
@@ -2012,6 +2007,7 @@ async function createMatrixDraftController(params) {
|
|
|
2012
2007
|
const progressConfigEntry = accountConfig ?? cfg.channels?.matrix;
|
|
2013
2008
|
const progressSeed = `${accountId}:${roomId}`;
|
|
2014
2009
|
const progressDraft = createChannelProgressDraftCompositor({
|
|
2010
|
+
preparedItems: true,
|
|
2015
2011
|
entry: progressConfigEntry,
|
|
2016
2012
|
mode: streaming === "quiet" ? "partial" : streaming,
|
|
2017
2013
|
active: Boolean(draftStream),
|
|
@@ -2026,10 +2022,25 @@ async function createMatrixDraftController(params) {
|
|
|
2026
2022
|
},
|
|
2027
2023
|
deleteCurrent: () => draftStream?.deleteCurrentMessage()
|
|
2028
2024
|
});
|
|
2025
|
+
const previewLifecycle = createLivePreviewLifecycle({
|
|
2026
|
+
draft: draftStream ? {
|
|
2027
|
+
flush: draftStream.flush,
|
|
2028
|
+
id: draftStream.eventId,
|
|
2029
|
+
seal: draftStream.seal,
|
|
2030
|
+
discardPending: draftStream.discardPending,
|
|
2031
|
+
clear: draftStream.clear
|
|
2032
|
+
} : void 0,
|
|
2033
|
+
cleanupUndelivered: true,
|
|
2034
|
+
onFinalStarted: () => progressDraft.markFinalReplyStarted(),
|
|
2035
|
+
onFinalDelivered: () => progressDraft.markFinalReplyDelivered(),
|
|
2036
|
+
onCleanupFailure: (err) => logVerboseMessage(`matrix draft preview cleanup failed: ${String(err)}`)
|
|
2037
|
+
});
|
|
2029
2038
|
const buildPreviewToolProgressReplyOptions = () => {
|
|
2030
2039
|
if (!shouldSuppressDefaultToolProgressMessages) return {};
|
|
2031
2040
|
return {
|
|
2032
2041
|
suppressDefaultToolProgressMessages: true,
|
|
2042
|
+
progressPreambleEnabled: true,
|
|
2043
|
+
commentaryProgressEnabled: progressDraft.commentaryProgressEnabled,
|
|
2033
2044
|
onToolStart: async (payload) => {
|
|
2034
2045
|
return await progressDraft.pushToolEvent(payload);
|
|
2035
2046
|
},
|
|
@@ -2045,12 +2056,6 @@ async function createMatrixDraftController(params) {
|
|
|
2045
2056
|
},
|
|
2046
2057
|
onApprovalEvent: async (payload) => {
|
|
2047
2058
|
return await progressDraft.pushApprovalEvent(payload);
|
|
2048
|
-
},
|
|
2049
|
-
onCommandOutput: async (payload) => {
|
|
2050
|
-
return await progressDraft.pushCommandOutputEvent(payload);
|
|
2051
|
-
},
|
|
2052
|
-
onPatchSummary: async (payload) => {
|
|
2053
|
-
return await progressDraft.pushPatchEvent(payload);
|
|
2054
2059
|
}
|
|
2055
2060
|
};
|
|
2056
2061
|
};
|
|
@@ -2090,7 +2095,7 @@ async function createMatrixDraftController(params) {
|
|
|
2090
2095
|
const resetDraftDeliveryState = async () => {
|
|
2091
2096
|
await draftStream?.discardPending();
|
|
2092
2097
|
draftStream?.reset();
|
|
2093
|
-
|
|
2098
|
+
previewLifecycle.reset();
|
|
2094
2099
|
currentDraftMessageGeneration = 0;
|
|
2095
2100
|
currentDraftBlockOffset = 0;
|
|
2096
2101
|
latestDraftFullText = "";
|
|
@@ -2101,6 +2106,7 @@ async function createMatrixDraftController(params) {
|
|
|
2101
2106
|
};
|
|
2102
2107
|
return {
|
|
2103
2108
|
draftStream,
|
|
2109
|
+
previewLifecycle,
|
|
2104
2110
|
cancelProgressDraft: () => progressDraft.cancel(),
|
|
2105
2111
|
buildPreviewToolProgressReplyOptions,
|
|
2106
2112
|
queueDraftBlockBoundary,
|
|
@@ -2109,16 +2115,9 @@ async function createMatrixDraftController(params) {
|
|
|
2109
2115
|
beginAssistantMessage: () => progressDraft.beginAssistantMessage(),
|
|
2110
2116
|
resetDraftDeliveryState,
|
|
2111
2117
|
updateDraftFromLatestFullText,
|
|
2112
|
-
draftDisposition: () => draftDisposition,
|
|
2113
2118
|
beginDraftGeneration: () => {
|
|
2114
|
-
|
|
2115
|
-
progressDraft.
|
|
2116
|
-
},
|
|
2117
|
-
markDraftConsumed: () => {
|
|
2118
|
-
draftDisposition = "consumed";
|
|
2119
|
-
},
|
|
2120
|
-
markDraftRetained: () => {
|
|
2121
|
-
draftDisposition = "retained";
|
|
2119
|
+
previewLifecycle.reset();
|
|
2120
|
+
progressDraft.beginNewTurn({ force: true });
|
|
2122
2121
|
},
|
|
2123
2122
|
currentReplyToId: () => currentDraftReplyToId,
|
|
2124
2123
|
setCurrentReplyToId: (replyToId) => {
|
|
@@ -3146,6 +3145,8 @@ function joinMatrixVisibleContent(contents) {
|
|
|
3146
3145
|
return contents.filter((content) => Boolean(content)).join("\n");
|
|
3147
3146
|
}
|
|
3148
3147
|
function mergeMatrixReplyDeliveryResults(results) {
|
|
3148
|
+
const single = results.length === 1 ? results[0] : void 0;
|
|
3149
|
+
if (single?.visibleReplySent) return single;
|
|
3149
3150
|
const visibleResults = results.filter((result) => result.visibleReplySent);
|
|
3150
3151
|
if (visibleResults.length === 0) return {
|
|
3151
3152
|
visibleReplySent: false,
|
|
@@ -3275,7 +3276,7 @@ function createMatrixReplyDispatcher(config) {
|
|
|
3275
3276
|
accountId,
|
|
3276
3277
|
mediaLocalRoots
|
|
3277
3278
|
});
|
|
3278
|
-
|
|
3279
|
+
const { previewLifecycle } = draftController;
|
|
3279
3280
|
let nonFinalReplyDeliveryFailed = false;
|
|
3280
3281
|
const beginNextBlockDraft = () => {
|
|
3281
3282
|
draftController.beginDraftGeneration();
|
|
@@ -3309,187 +3310,75 @@ function createMatrixReplyDispatcher(config) {
|
|
|
3309
3310
|
content
|
|
3310
3311
|
};
|
|
3311
3312
|
};
|
|
3312
|
-
const
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
if (Boolean(payload.text?.trim()) && !payload.isError && !payloadReplyMismatch && !mustDeliverFinalNormally) {
|
|
3347
|
-
await draftStream.stop();
|
|
3348
|
-
mustDeliverFinalNormally = draftStream.mustDeliverFinalNormally();
|
|
3349
|
-
} else await draftStream.discardPending();
|
|
3350
|
-
const draftEventId = draftStream.eventId();
|
|
3351
|
-
const draftFinalTextNeedsNormalMentionDelivery = Boolean(draftEventId) && typeof payload.text === "string" && Boolean(payload.text.trim()) && !payload.isError && !payloadReplyMismatch && !mustDeliverFinalNormally && await matrixTextWouldActivateMentions(client, payload.text);
|
|
3352
|
-
if (draftEventId && payload.text && !payload.isError && !hasMedia && !payloadReplyMismatch && !mustDeliverFinalNormally && !draftFinalTextNeedsNormalMentionDelivery) {
|
|
3353
|
-
const finalPreviewText = payload.text;
|
|
3354
|
-
const { prepareMatrixSingleText } = await loadMatrixSendModule();
|
|
3355
|
-
const preparedFinalPreviewContent = prepareMatrixSingleText(finalPreviewText, {
|
|
3356
|
-
cfg,
|
|
3357
|
-
accountId,
|
|
3358
|
-
preserveWhitespace: true
|
|
3359
|
-
}).convertedText;
|
|
3360
|
-
let finalizedDraftContent = draftStream.content() ?? preparedFinalPreviewContent;
|
|
3361
|
-
let fallbackResult;
|
|
3362
|
-
const previewResult = await deliverWithFinalizableLivePreviewAdapter({
|
|
3363
|
-
kind: "final",
|
|
3364
|
-
payload,
|
|
3365
|
-
adapter: defineFinalizableLivePreviewAdapter({
|
|
3366
|
-
draft: {
|
|
3367
|
-
flush: async () => {},
|
|
3368
|
-
clear: async () => {},
|
|
3369
|
-
discardPending: async () => {},
|
|
3370
|
-
id: () => draftEventId
|
|
3371
|
-
},
|
|
3372
|
-
buildFinalEdit: () => {
|
|
3373
|
-
const presentationContent = resolveMatrixExtraContent(payload);
|
|
3374
|
-
const extraContent = {
|
|
3375
|
-
...quietDraftStreaming ? buildMatrixFinalizedPreviewContent() : {},
|
|
3376
|
-
...presentationContent
|
|
3377
|
-
};
|
|
3378
|
-
return {
|
|
3379
|
-
text: finalPreviewText,
|
|
3380
|
-
finalizeLive: !(quietDraftStreaming || Boolean(presentationContent) || !draftStream.matchesPreparedText(finalPreviewText)),
|
|
3381
|
-
...Object.keys(extraContent).length > 0 ? { extraContent } : {}
|
|
3382
|
-
};
|
|
3383
|
-
},
|
|
3384
|
-
editFinal: async (_draftEventId, edit) => {
|
|
3385
|
-
if (edit.finalizeLive) {
|
|
3386
|
-
if (!await draftStream.finalizeLive()) throw new Error("Matrix draft live finalize failed");
|
|
3387
|
-
finalizedDraftContent = draftStream.content() ?? preparedFinalPreviewContent;
|
|
3388
|
-
return;
|
|
3389
|
-
}
|
|
3390
|
-
const { editMessageMatrix } = await loadMatrixSendModule();
|
|
3391
|
-
await editMessageMatrix(roomId, _draftEventId, edit.text, {
|
|
3392
|
-
client,
|
|
3393
|
-
cfg,
|
|
3394
|
-
threadId: threadTarget,
|
|
3395
|
-
accountId,
|
|
3396
|
-
extraContent: edit.extraContent
|
|
3397
|
-
});
|
|
3398
|
-
finalizedDraftContent = prepareMatrixSingleText(edit.text, {
|
|
3399
|
-
cfg,
|
|
3400
|
-
accountId,
|
|
3401
|
-
preserveWhitespace: true
|
|
3402
|
-
}).convertedText;
|
|
3403
|
-
},
|
|
3404
|
-
createPreviewReceipt: createDraftReceipt,
|
|
3405
|
-
logPreviewEditFailure: (err) => {
|
|
3406
|
-
logVerboseMessage(`matrix: preview final edit failed: ${String(err)}`);
|
|
3407
|
-
}
|
|
3408
|
-
}),
|
|
3409
|
-
deliverNormally: async () => {
|
|
3410
|
-
fallbackResult = await settleDraftReplacement({
|
|
3411
|
-
draftEventId,
|
|
3412
|
-
draftContent: draftStream.content() ?? preparedFinalPreviewContent,
|
|
3413
|
-
deliver: deliverFallback
|
|
3313
|
+
const settlesPreview = Boolean(draftStream) && info.kind !== "tool" && !payload.isCompactionNotice;
|
|
3314
|
+
const ttsSupplement = getReplyPayloadTtsSupplement(payload);
|
|
3315
|
+
const fallbackPayload = settlesPreview && ttsSupplement && ttsSupplement.visibleTextAlreadyDelivered !== true && !payload.text?.trim() ? {
|
|
3316
|
+
...payload,
|
|
3317
|
+
text: ttsSupplement.spokenText
|
|
3318
|
+
} : payload;
|
|
3319
|
+
const { hasMedia } = resolveSendableOutboundReplyParts(payload);
|
|
3320
|
+
const payloadText = payload.text ?? ttsSupplement?.spokenText;
|
|
3321
|
+
const payloadReplyMismatch = (!threadTarget && replyToMode !== "off" || payload.replyToTag || payload.replyToCurrent) && normalizeOptionalString(payload.replyToId) !== draftController.currentReplyToId();
|
|
3322
|
+
let retainedDraftDelivery;
|
|
3323
|
+
let deliveryResult;
|
|
3324
|
+
try {
|
|
3325
|
+
deliveryResult = (await previewLifecycle.deliver({
|
|
3326
|
+
kind: payload.isCompactionNotice ? "tool" : info.kind === "block" ? "final" : info.kind,
|
|
3327
|
+
payload,
|
|
3328
|
+
isError: payload.isError,
|
|
3329
|
+
adapter: draftStream ? {
|
|
3330
|
+
buildFinalEdit: () => payloadText?.trim() && !payload.isError && !payloadReplyMismatch && !draftStream.mustDeliverFinalNormally() ? { text: payloadText } : void 0,
|
|
3331
|
+
editFinal: async (draftEventId, edit) => {
|
|
3332
|
+
if (draftStream.mustDeliverFinalNormally() || await matrixTextWouldActivateMentions(client, edit.text)) return { visibleReplySent: false };
|
|
3333
|
+
const { editMessageMatrix, prepareMatrixSingleText } = await loadMatrixSendModule();
|
|
3334
|
+
const presentationContent = hasMedia ? void 0 : resolveMatrixExtraContent(payload);
|
|
3335
|
+
const extraContent = {
|
|
3336
|
+
...quietDraftStreaming ? buildMatrixFinalizedPreviewContent() : {},
|
|
3337
|
+
...presentationContent
|
|
3338
|
+
};
|
|
3339
|
+
if (!quietDraftStreaming && !presentationContent && draftStream.matchesPreparedText(edit.text)) {
|
|
3340
|
+
if (!await draftStream.finalizeLive()) return { visibleReplySent: false };
|
|
3341
|
+
} else await editMessageMatrix(roomId, draftEventId, edit.text, {
|
|
3342
|
+
client,
|
|
3343
|
+
cfg,
|
|
3344
|
+
threadId: threadTarget,
|
|
3345
|
+
accountId,
|
|
3346
|
+
...Object.keys(extraContent).length > 0 ? { extraContent } : {}
|
|
3414
3347
|
});
|
|
3415
|
-
return
|
|
3416
|
-
}
|
|
3417
|
-
});
|
|
3418
|
-
if (previewResult.kind === "preview-finalized") draftController.markDraftConsumed();
|
|
3419
|
-
return await completeDelivery(previewResult.kind === "preview-finalized" && previewResult.liveState?.receipt ? createDraftDeliveryResult(draftEventId, finalizedDraftContent ?? preparedFinalPreviewContent) : fallbackResult ?? mergeMatrixReplyDeliveryResults([]));
|
|
3420
|
-
} else if (draftEventId && hasMedia && !payloadReplyMismatch) {
|
|
3421
|
-
let textEditOk = !mustDeliverFinalNormally;
|
|
3422
|
-
const payloadText = payload.text ?? ttsSupplement?.spokenText;
|
|
3423
|
-
const preparedPayloadContent = typeof payloadText === "string" ? (await loadMatrixSendModule()).prepareMatrixSingleText(payloadText, {
|
|
3424
|
-
cfg,
|
|
3425
|
-
accountId,
|
|
3426
|
-
preserveWhitespace: true
|
|
3427
|
-
}).convertedText : void 0;
|
|
3428
|
-
let finalizedDraftContent = draftStream.content() ?? preparedPayloadContent;
|
|
3429
|
-
const payloadTextMatchesDraft = typeof payloadText === "string" && draftStream.matchesPreparedText(payloadText);
|
|
3430
|
-
const reusesDraftTextUnchanged = typeof payloadText === "string" && Boolean(payloadText.trim()) && payloadTextMatchesDraft;
|
|
3431
|
-
const mediaTextNeedsNormalMentionDelivery = typeof payloadText === "string" && Boolean(payloadText.trim()) && await matrixTextWouldActivateMentions(client, payloadText);
|
|
3432
|
-
const requiresFinalTextEdit = quietDraftStreaming || typeof payloadText === "string" && !payloadTextMatchesDraft;
|
|
3433
|
-
if (textEditOk && mediaTextNeedsNormalMentionDelivery) textEditOk = false;
|
|
3434
|
-
else if (textEditOk && payloadText && requiresFinalTextEdit) {
|
|
3435
|
-
const { editMessageMatrix, prepareMatrixSingleText } = await loadMatrixSendModule();
|
|
3436
|
-
textEditOk = await editMessageMatrix(roomId, draftEventId, payloadText, {
|
|
3437
|
-
client,
|
|
3438
|
-
cfg,
|
|
3439
|
-
threadId: threadTarget,
|
|
3440
|
-
accountId,
|
|
3441
|
-
extraContent: quietDraftStreaming ? buildMatrixFinalizedPreviewContent() : void 0
|
|
3442
|
-
}).then(() => {
|
|
3443
|
-
finalizedDraftContent = prepareMatrixSingleText(payloadText, {
|
|
3348
|
+
return createDraftDeliveryResult(draftEventId, prepareMatrixSingleText(edit.text, {
|
|
3444
3349
|
cfg,
|
|
3445
3350
|
accountId,
|
|
3446
3351
|
preserveWhitespace: true
|
|
3447
|
-
}).convertedText;
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
...payload,
|
|
3458
|
-
text: reusesDraftAsFinalText ? void 0 : payload.text ?? (ttsSupplement?.visibleTextAlreadyDelivered === true ? void 0 : ttsSupplement?.spokenText)
|
|
3459
|
-
};
|
|
3460
|
-
const providerDraftContent = finalizedDraftContent ?? preparedPayloadContent;
|
|
3461
|
-
const previewDelivery = reusesDraftAsFinalText && providerDraftContent ? createDraftDeliveryResult(draftEventId, providerDraftContent) : draftContent ? createDraftDeliveryResult(draftEventId, draftContent) : mergeMatrixReplyDeliveryResults([]);
|
|
3462
|
-
const deliverMedia = async () => await deliverPayload(mediaPayload);
|
|
3463
|
-
if (reusesDraftAsFinalText) {
|
|
3464
|
-
draftController.markDraftConsumed();
|
|
3465
|
-
let mediaDelivery;
|
|
3466
|
-
try {
|
|
3467
|
-
mediaDelivery = await deliverMedia();
|
|
3468
|
-
} catch (error) {
|
|
3469
|
-
throw toMatrixPartialDeliveryError(error, [previewDelivery]);
|
|
3352
|
+
}).convertedText);
|
|
3353
|
+
},
|
|
3354
|
+
createPreviewReceipt: createDraftReceipt,
|
|
3355
|
+
buildSupplementalPayload: () => hasMedia ? ttsSupplement ? buildTtsSupplementMediaPayload(payload) : {
|
|
3356
|
+
...payload,
|
|
3357
|
+
text: void 0
|
|
3358
|
+
} : void 0,
|
|
3359
|
+
deliverSupplemental: deliverPayload,
|
|
3360
|
+
logPreviewEditFailure: (err) => {
|
|
3361
|
+
logVerboseMessage(`matrix: preview final edit failed: ${String(err)}`);
|
|
3470
3362
|
}
|
|
3471
|
-
|
|
3363
|
+
} : void 0,
|
|
3364
|
+
deliverNormally: async (normalPayload) => {
|
|
3365
|
+
if (settlesPreview && !previewLifecycle.previewFinalized && (hasMedia || payloadText?.trim() || payload.isError || payloadReplyMismatch || draftStream?.mustDeliverFinalNormally())) {
|
|
3366
|
+
const id = draftStream?.eventId();
|
|
3367
|
+
const content = draftStream?.content();
|
|
3368
|
+
if (id && content) retainedDraftDelivery = createDraftDeliveryResult(id, content);
|
|
3369
|
+
}
|
|
3370
|
+
return await deliverPayload(normalPayload === payload ? fallbackPayload : normalPayload);
|
|
3472
3371
|
}
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
}));
|
|
3478
|
-
return await completeDelivery(await deliverMedia());
|
|
3479
|
-
}
|
|
3480
|
-
const shouldRedactDraft = Boolean(draftEventId) && (payload.isError || payloadReplyMismatch || mustDeliverFinalNormally || draftFinalTextNeedsNormalMentionDelivery);
|
|
3481
|
-
const draftContent = draftStream.content();
|
|
3482
|
-
if (shouldRedactDraft && draftEventId && draftContent) return await completeDelivery(await settleDraftReplacement({
|
|
3483
|
-
draftEventId,
|
|
3484
|
-
draftContent,
|
|
3485
|
-
deliver: deliverFallback
|
|
3486
|
-
}));
|
|
3487
|
-
return await completeDelivery(await deliverFallback());
|
|
3372
|
+
})).deliveryResult;
|
|
3373
|
+
} catch (error) {
|
|
3374
|
+
if (retainedDraftDelivery) previewLifecycle.retainPreview();
|
|
3375
|
+
throw toMatrixPartialDeliveryError(error, retainedDraftDelivery ? [retainedDraftDelivery] : []);
|
|
3488
3376
|
}
|
|
3489
|
-
|
|
3377
|
+
if (retainedDraftDelivery && !deliveryResult?.visibleReplySent) previewLifecycle.retainPreview();
|
|
3378
|
+
return await completeDelivery(mergeMatrixReplyDeliveryResults([retainedDraftDelivery?.messageIds?.includes(draftStream?.eventId() ?? "") ? retainedDraftDelivery : void 0, deliveryResult].filter((result) => result !== void 0)));
|
|
3490
3379
|
},
|
|
3491
3380
|
onError: (err, info) => {
|
|
3492
|
-
if (info.kind === "final")
|
|
3381
|
+
if (info.kind === "final") previewLifecycle.observeFailure();
|
|
3493
3382
|
else nonFinalReplyDeliveryFailed = true;
|
|
3494
3383
|
if (info.kind === "block") beginNextBlockDraft();
|
|
3495
3384
|
runtime.error?.(`matrix ${info.kind} reply failed: ${String(err)}`);
|
|
@@ -3501,7 +3390,6 @@ function createMatrixReplyDispatcher(config) {
|
|
|
3501
3390
|
deliverReply,
|
|
3502
3391
|
onReplyError,
|
|
3503
3392
|
turnDispatcherOptions,
|
|
3504
|
-
finalReplyDeliveryFailed: () => finalReplyDeliveryFailed,
|
|
3505
3393
|
nonFinalReplyDeliveryFailed: () => nonFinalReplyDeliveryFailed
|
|
3506
3394
|
};
|
|
3507
3395
|
}
|
|
@@ -3932,6 +3820,7 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3932
3820
|
} : void 0,
|
|
3933
3821
|
onQueuedFollowupAdmitted: draftStream ? draftController.resetDraftDeliveryState : void 0,
|
|
3934
3822
|
...draftController.buildPreviewToolProgressReplyOptions(),
|
|
3823
|
+
onObservedReplyDelivery: draftStream ? () => draftController.previewLifecycle.observeDelivery({ visibleReplySent: true }) : void 0,
|
|
3935
3824
|
onModelSelected
|
|
3936
3825
|
}
|
|
3937
3826
|
})
|
|
@@ -3968,7 +3857,7 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3968
3857
|
}
|
|
3969
3858
|
const { dispatchResult } = turnResult;
|
|
3970
3859
|
const { queuedFinal } = dispatchResult;
|
|
3971
|
-
if (
|
|
3860
|
+
if (draftController.previewLifecycle.finalFailed) {
|
|
3972
3861
|
logVerboseMessage(`matrix: final reply delivery failed room=${roomId} id=${messageId}; keeping replay committed`);
|
|
3973
3862
|
await commitInboundEventIfClaimed();
|
|
3974
3863
|
return;
|
|
@@ -3988,13 +3877,14 @@ function createMatrixRoomMessageHandler(params) {
|
|
|
3988
3877
|
await commitInboundEventIfClaimed();
|
|
3989
3878
|
} catch (err) {
|
|
3990
3879
|
const draftController = draftControllerRef;
|
|
3991
|
-
if (draftController?.draftStream?.eventId()
|
|
3880
|
+
if (draftController?.draftStream?.eventId()) draftController.previewLifecycle.retainPreview();
|
|
3992
3881
|
runtime.error?.(`matrix handler failed: ${String(err)}`);
|
|
3993
3882
|
} finally {
|
|
3994
3883
|
const draftStream = draftControllerRef?.draftStream;
|
|
3995
3884
|
if (draftStream) {
|
|
3996
|
-
|
|
3997
|
-
|
|
3885
|
+
await draftStream.stop().catch(() => void 0);
|
|
3886
|
+
await draftControllerRef?.previewLifecycle.cleanup();
|
|
3887
|
+
await draftStream.cleanupPending();
|
|
3998
3888
|
}
|
|
3999
3889
|
inboundReplayClaim?.release();
|
|
4000
3890
|
}
|
|
@@ -4018,7 +3908,7 @@ const loadMatrixStartupMaintenanceDeps = createLazyRuntimeModule(() => Promise.a
|
|
|
4018
3908
|
import("./config-update-B_4qZ5bV.mjs").then((n) => n.t),
|
|
4019
3909
|
import("./device-health-CWOuIirq.mjs").then((n) => n.t),
|
|
4020
3910
|
import("./profile-ClrB3IgR.mjs").then((n) => n.n),
|
|
4021
|
-
import("./startup-verification-
|
|
3911
|
+
import("./startup-verification-Cp1Gf7pM.mjs")
|
|
4022
3912
|
]).then(([configUpdateModule, deviceHealthModule, profileModule, startupVerificationModule]) => ({
|
|
4023
3913
|
updateMatrixAccountConfig: configUpdateModule.updateMatrixAccountConfig,
|
|
4024
3914
|
summarizeMatrixDeviceHealth: deviceHealthModule.summarizeMatrixDeviceHealth,
|
|
@@ -4291,10 +4181,6 @@ async function monitorMatrixProvider(opts = {}) {
|
|
|
4291
4181
|
let needsRoomAliasesForConfig = false;
|
|
4292
4182
|
const initialAllowFrom = (accountConfig.dm?.allowFrom ?? []).map(String);
|
|
4293
4183
|
const initialGroupAllowFrom = (accountConfig.groupAllowFrom ?? []).map(String);
|
|
4294
|
-
const configuredBotUserIds = resolveConfiguredMatrixBotUserIds({
|
|
4295
|
-
cfg,
|
|
4296
|
-
accountId: effectiveAccountId
|
|
4297
|
-
});
|
|
4298
4184
|
const { allowFrom, allowFromResolvedEntries, groupAllowFrom, groupAllowFromResolvedEntries, roomsConfig: resolvedRoomsConfig } = await resolveMatrixMonitorConfig({
|
|
4299
4185
|
cfg,
|
|
4300
4186
|
accountId: effectiveAccountId,
|
|
@@ -4324,6 +4210,13 @@ async function monitorMatrixProvider(opts = {}) {
|
|
|
4324
4210
|
cfg,
|
|
4325
4211
|
accountId: effectiveAccountId
|
|
4326
4212
|
});
|
|
4213
|
+
if (opts.abortSignal?.aborted) return;
|
|
4214
|
+
const configuredBotUserIds = await resolveConfiguredMatrixBotUserIds({
|
|
4215
|
+
cfg,
|
|
4216
|
+
accountId: effectiveAccountId,
|
|
4217
|
+
abortSignal: opts.abortSignal
|
|
4218
|
+
});
|
|
4219
|
+
if (opts.abortSignal?.aborted) return;
|
|
4327
4220
|
const resolvedInitialSyncLimit = resolveOptionalIntegerOption(opts.initialSyncLimit, { min: 0 }) ?? auth.initialSyncLimit;
|
|
4328
4221
|
const authWithLimit = resolvedInitialSyncLimit === auth.initialSyncLimit ? auth : {
|
|
4329
4222
|
...auth,
|
|
@@ -4393,7 +4286,7 @@ async function monitorMatrixProvider(opts = {}) {
|
|
|
4393
4286
|
const dmPolicy = allowlistOnly && dmPolicyRaw !== "disabled" ? "allowlist" : dmPolicyRaw;
|
|
4394
4287
|
const dmSessionScope = dmConfig?.sessionScope ?? "per-user";
|
|
4395
4288
|
const globalGroupChatHistoryLimit = cfg.messages?.groupChat?.historyLimit;
|
|
4396
|
-
const historyLimit =
|
|
4289
|
+
const historyLimit = resolvePromptHistoryLimit(accountConfig.historyLimit ?? globalGroupChatHistoryLimit, 0);
|
|
4397
4290
|
const mediaMaxMb = opts.mediaMaxMb ?? accountConfig.mediaMaxMb ?? DEFAULT_MEDIA_MAX_MB;
|
|
4398
4291
|
const mediaMaxBytes = Math.max(1, mediaMaxMb) * 1024 * 1024;
|
|
4399
4292
|
const streaming = resolveMatrixStreamingMode(accountConfig.streaming);
|
|
@@ -4585,12 +4478,13 @@ async function monitorMatrixProvider(opts = {}) {
|
|
|
4585
4478
|
}
|
|
4586
4479
|
logVerboseMessage("matrix: client started");
|
|
4587
4480
|
logger.info(`matrix: logged in as ${auth.userId}`);
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4481
|
+
monitorTaskRunner.runDetachedTask("deviceId backfill", async () => {
|
|
4482
|
+
const taskSignal = getMatrixMonitorTaskSignal();
|
|
4483
|
+
await backfillMatrixAuthDeviceIdAfterStartup({
|
|
4484
|
+
auth,
|
|
4485
|
+
env: process.env,
|
|
4486
|
+
abortSignal: taskSignal && monitorLifecycleSignal ? AbortSignal.any([taskSignal, monitorLifecycleSignal]) : taskSignal ?? monitorLifecycleSignal
|
|
4487
|
+
});
|
|
4594
4488
|
});
|
|
4595
4489
|
registerChannelRuntimeContext({
|
|
4596
4490
|
channelRuntime: opts.channelRuntime,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-
|
|
1
|
+
import { i as sendPollMatrix, r as sendMessageMatrix } from "./send-aVdC5NJO.mjs";
|
|
2
2
|
import { createMessageReceiptFromOutboundResults, createReplyToFanout, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
3
3
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as getMatrixRuntime } from "./runtime-1kn1P6io.mjs";
|
|
2
2
|
import { n as resolveMatrixConfigPath, r as updateMatrixAccountConfig } from "./config-update-B_4qZ5bV.mjs";
|
|
3
3
|
import { r as syncMatrixOwnProfile } from "./profile-ClrB3IgR.mjs";
|
|
4
|
-
import { n as withResolvedActionClient } from "./client-
|
|
4
|
+
import { n as withResolvedActionClient } from "./client-C2yVkVdw.mjs";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
6
6
|
//#region extensions/matrix/src/matrix/actions/profile.ts
|
|
7
7
|
async function updateMatrixOwnProfile(opts = {}) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as resolveMatrixAccountConfig } from "./account-config-CRsKoMqJ.mjs";
|
|
2
|
-
import { i as resolveMatrixThreadRouting, r as resolveMatrixInboundRoute } from "./channel-
|
|
2
|
+
import { i as resolveMatrixThreadRouting, r as resolveMatrixInboundRoute } from "./channel-ConuJfxT.mjs";
|
|
3
3
|
import { c as extractMatrixReactionAnnotation } from "./send-currentness-BrGXL7b8.mjs";
|
|
4
4
|
import { p as resolveMatrixThreadRootId } from "./direct-management-B2Bno2xL.mjs";
|
|
5
5
|
import { i as resolveMatrixApprovalReactionTargetWithPersistence, o as unregisterMatrixApprovalReactionTargetsForApproval } from "./approval-reactions-B0hfA6qz.mjs";
|
|
@@ -8,9 +8,9 @@ import { isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
|
|
|
8
8
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
9
9
|
import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
|
|
10
10
|
//#region extensions/matrix/src/matrix/monitor/reaction-events.ts
|
|
11
|
-
const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-
|
|
11
|
+
const loadApprovalReactionAuth = createLazyRuntimeModule(() => import("./approval-reaction-auth-DMVE7VSp.mjs"));
|
|
12
12
|
const loadExecApprovalResolver = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/approval-gateway-runtime"));
|
|
13
|
-
const loadMatrixSend = createLazyRuntimeModule(() => import("./send-
|
|
13
|
+
const loadMatrixSend = createLazyRuntimeModule(() => import("./send-aVdC5NJO.mjs").then((n) => n.s));
|
|
14
14
|
function buildMatrixApprovalTerminalText(result) {
|
|
15
15
|
const approval = result.approval;
|
|
16
16
|
const terminalLabel = approval.status === "allowed" ? approval.decision === "allow-always" ? "Allowed always" : "Allowed once" : approval.status === "denied" ? "Denied" : approval.status === "expired" ? "Expired" : "Cancelled";
|
|
@@ -159,6 +159,7 @@ async function handleInboundMatrixReaction(params) {
|
|
|
159
159
|
const text = `Matrix reaction added: ${reaction.key} by ${params.senderLabel} on msg ${reaction.eventId}`;
|
|
160
160
|
params.core.system.enqueueSystemEvent(text, {
|
|
161
161
|
sessionKey: route.sessionKey,
|
|
162
|
+
agentId: route.agentId,
|
|
162
163
|
contextKey: `matrix:reaction:add:${params.roomId}:${reaction.eventId}:${params.senderId}:${reaction.key}`
|
|
163
164
|
});
|
|
164
165
|
params.logVerboseMessage(`matrix: reaction event enqueued room=${params.roomId} target=${reaction.eventId} sender=${params.senderId} emoji=${reaction.key}`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
|
|
2
2
|
import { r as normalizeMatrixMessagingTarget, t as isMatrixQualifiedUserId } from "./target-ids-Nwx7cMVE.mjs";
|
|
3
|
-
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-
|
|
3
|
+
import { n as listMatrixDirectoryGroupsLive, r as listMatrixDirectoryPeersLive } from "./directory-live-CxqkcYbT.mjs";
|
|
4
4
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/matrix/src/resolve-targets.ts
|
|
6
6
|
var resolve_targets_exports = /* @__PURE__ */ __exportAll({ resolveMatrixTargets: () => resolveMatrixTargets });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as resolveMatrixTargets } from "./resolve-targets-
|
|
1
|
+
import { t as resolveMatrixTargets } from "./resolve-targets-BLz748lX.mjs";
|
|
2
2
|
//#region extensions/matrix/src/resolver.runtime.ts
|
|
3
3
|
const matrixResolverRuntime = { resolveMatrixTargets };
|
|
4
4
|
//#endregion
|