@openclaw/matrix 2026.7.2-beta.7 → 2026.7.34
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/README.md +1 -1
- package/dist/{account-selection-kqquRzCf.js → .setup/account-selection-BOQeTqax.mjs} +18 -17
- package/dist/{approval-handler.runtime-DSeaIsGa.js → .setup/approval-handler.runtime-CEXm9_-p.mjs} +18 -28
- package/dist/{approval-ids-BdJGPAJT.js → .setup/approval-ids-DdFnDB3h.mjs} +1 -1
- package/dist/{approval-reaction-auth-BjOpELxu.js → .setup/approval-reaction-auth-CREvd7S7.mjs} +2 -2
- package/dist/.setup/approval-reactions-Cltyp8nL.mjs +113 -0
- package/dist/.setup/async-lock-BcLS4KOc.mjs +19 -0
- package/dist/{channel-vj788dNZ.js → .setup/channel-an4umty1.mjs} +186 -144
- package/dist/{channel.runtime-CLoF2S9T.js → .setup/channel.runtime-GHcIBJ7H.mjs} +51 -45
- package/dist/{cli-DMqfDE-q.js → .setup/cli-B3WYmv5U.mjs} +882 -901
- package/dist/{cli-metadata-C7D53SND.js → .setup/cli-metadata-RUKCn0wJ.mjs} +1 -1
- package/dist/{client-6eRENr7k.js → .setup/client-Ct0bUHCo.mjs} +5 -5
- package/dist/{shared-CUMWxcMz.js → .setup/client-DFBQtzCe.mjs} +422 -179
- package/dist/.setup/client-bootstrap-Be8jvNle.mjs +74 -0
- package/dist/{config-schema-Djxw3C6b.js → .setup/config-schema-D9J_vUF6.mjs} +89 -70
- package/dist/.setup/credentials-BhZlA0kL.mjs +56 -0
- package/dist/.setup/credentials-read-CRHg6XPm.mjs +114 -0
- package/dist/{credentials-write.runtime-Be9zNSUw.js → .setup/credentials-write.runtime-dWuLafsk.mjs} +1 -1
- package/dist/{crypto-runtime-D9_6J5tZ.js → .setup/crypto-runtime-D-cZa8P0.mjs} +81 -35
- package/dist/.setup/crypto-state-store-B43k3z3W.mjs +352 -0
- package/dist/{deps-CcVJfvRM.js → .setup/deps-Dy6yreL4.mjs} +92 -25
- package/dist/{device-health-B4-YXtJR.js → .setup/device-health-D4LBxuPq.mjs} +1 -6
- package/dist/{directory-live-C8dVBiCc.js → .setup/directory-live-BTEYxMwy.mjs} +10 -9
- package/dist/.setup/doctor-BGnvMzOR.mjs +169 -0
- package/dist/.setup/doctor-contract-DNJw0fdq.mjs +246 -0
- package/dist/{draft-stream-CtvOXq0Z.js → .setup/draft-stream-C-_OhpE8.mjs} +1 -6
- package/dist/{encryption-guidance-CbEFe38F.js → .setup/encryption-guidance-CpuuwmjL.mjs} +4 -3
- package/dist/{env-auth-CQsYbz-p.js → .setup/env-auth-CYJL1jNl.mjs} +2 -2
- package/dist/{env-vars-B0NxQnPk.js → .setup/env-vars-KzaYveuy.mjs} +1 -3
- package/dist/{exec-approval-resolver-BCgqRtZS.js → .setup/exec-approval-resolver-f9j6staN.mjs} +1 -2
- package/dist/{file-sync-store-DiiFsayX.js → .setup/file-sync-store-DU0cnYAz.mjs} +30 -25
- package/dist/{http-client-CycYxU9-.js → .setup/http-client-C954In2D.mjs} +45 -25
- package/dist/{idb-persistence-B6x7dMsF.js → .setup/idb-persistence-_HKTXkVC.mjs} +76 -78
- package/dist/{idb-persistence-lock-DAJ49nZX.js → .setup/idb-persistence-lock-B3fZXyF_.mjs} +1 -1
- package/dist/.setup/legacy-crypto-inspector-Byp8LCys.mjs +42 -0
- package/dist/.setup/legacy-crypto-restore-YQVoK1B2.mjs +93 -0
- package/dist/{logger-D0GCSDQq.js → .setup/logger-DpoogOgz.mjs} +1 -1
- package/dist/{logging-DV-p52N0.js → .setup/logging-CgxQOJJP.mjs} +2 -9
- package/dist/.setup/matrix-migration.runtime-BDH5c3fN.mjs +530 -0
- package/dist/{media-text-BTwzADS_.js → .setup/media-text-Cib-dxkn.mjs} +1 -1
- package/dist/{messages-DxQJkhxs.js → .setup/messages-D4DYGHYX.mjs} +15 -67
- package/dist/.setup/migration-snapshot-backup-CpgYhiUp.mjs +70 -0
- package/dist/.setup/migration-snapshot.runtime-O8qkMVaC.mjs +2 -0
- package/dist/{monitor-VyWlSLwo.js → .setup/monitor-DNcW_oAN.mjs} +2525 -2361
- package/dist/.setup/probe.runtime-CMPh0mFk.mjs +2 -0
- package/dist/{profile-update-CffmyW_4.js → .setup/profile-update-DzOL3Wiw.mjs} +5 -4
- package/dist/{reaction-events-B00WSi98.js → .setup/reaction-events-BcvgXxHb.mjs} +14 -64
- package/dist/{resolve-targets-nm2L48sh.js → .setup/resolve-targets-Bq80X9Sn.mjs} +3 -3
- package/dist/{resolver.runtime-DS6uPaEe.js → .setup/resolver.runtime-CeBHR9-T.mjs} +1 -1
- package/dist/{runtime-api-D1xI_cvh.js → .setup/runtime-api-CEsWNdil.mjs} +4 -4
- package/dist/.setup/runtime-setter-api-DGMubGUq.mjs +3 -0
- package/dist/{sdk-bUytQHx7.js → .setup/sdk-He1quVAq.mjs} +592 -261
- package/dist/.setup/secret-contract-api-CiTJ7pd5.mjs +3 -0
- package/dist/{secret-contract-M3hRmGO-.js → .setup/secret-contract-phPvlNfV.mjs} +53 -28
- package/dist/{send-BldGYG8g.js → .setup/send-CGgl0uTn.mjs} +133 -660
- package/dist/{setup-bootstrap-Deleiibz.js → .setup/setup-bootstrap-DUXBC8X2.mjs} +4 -4
- package/dist/{setup-core-BVfBv2ai.js → .setup/setup-core-bhdcEo7v.mjs} +239 -189
- package/dist/.setup/setup-plugin-api-CAwZ_Bi7.mjs +43 -0
- package/dist/.setup/setup-plugin-api-DIFVsOs3.mjs +2 -0
- package/dist/{setup-surface-BBq3WeqX.js → .setup/setup-surface-05_G-MnT.mjs} +149 -92
- package/dist/{startup-verification-wm3_i88s.js → .setup/startup-verification-BTwIGu1J.mjs} +7 -6
- package/dist/.setup/storage-NGZq5zet.mjs +432 -0
- package/dist/{storage-paths-gUmSydsW.js → .setup/storage-paths-BWo_ZEMC.mjs} +13 -2
- package/dist/{subagent-hooks-dkPAF6Et.js → .setup/subagent-hooks-BSWPJEmo.mjs} +2 -2
- package/dist/{thread-binding-api-DRbBZlhS.js → .setup/thread-binding-api-B7UaOoKv.mjs} +1 -1
- package/dist/{thread-bindings-DGbl3vDW.js → .setup/thread-bindings-DqmjG2on.mjs} +8 -8
- package/dist/{tool-actions.runtime-uu9blSqO.js → .setup/tool-actions.runtime-CXDLk2jg.mjs} +196 -332
- package/dist/{verification-DYMQ1QpI.js → .setup/verification-DeWOtZJr.mjs} +4 -3
- package/dist/api.js +9 -9
- package/dist/auth-presence.js +21 -13
- 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 +99 -524
- package/dist/helper-api.js +4 -4
- package/dist/index.js +1 -1
- package/dist/plugin-entry.handlers.runtime.js +2 -2
- package/dist/runtime-api.js +8 -8
- package/dist/runtime-heavy-api.js +3 -0
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +3 -3
- package/dist/setup-entry.js +4 -3
- package/dist/setup-plugin-api.js +1 -44
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/thread-binding-api.js +1 -1
- package/dist/thread-bindings-runtime.js +1 -1
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/package.json +1 -1
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm.d.ts +2 -14
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.cjs +384 -409
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.js +224 -246
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm +0 -0
- package/node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.wasm.d.ts +58 -59
- package/node_modules/markdown-it/README.md +18 -294
- package/node_modules/markdown-it/bin/markdown-it.mjs +2 -2
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs +3013 -0
- package/node_modules/markdown-it/dist/browser/markdown-it.esm.min.mjs.map +1 -0
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js +14 -0
- package/node_modules/markdown-it/dist/browser/markdown-it.umd.min.js.map +1 -0
- package/node_modules/markdown-it/dist/markdown-it.cjs.js +4420 -0
- package/node_modules/markdown-it/dist/markdown-it.cjs.js.map +1 -0
- package/node_modules/markdown-it/dist/markdown-it.d.cts +19 -0
- package/node_modules/markdown-it/dist/markdown-it.d.mts +950 -0
- package/node_modules/markdown-it/dist/{index.cjs.js → markdown-it.mjs} +1504 -1525
- package/node_modules/markdown-it/dist/markdown-it.mjs.map +1 -0
- package/node_modules/markdown-it/node_modules/argparse/LICENSE +1 -208
- package/node_modules/markdown-it/node_modules/argparse/README.md +46 -41
- package/node_modules/markdown-it/node_modules/argparse/lib/_colorize.js +72 -0
- package/node_modules/markdown-it/node_modules/argparse/lib/argparse.d.ts +292 -0
- package/node_modules/markdown-it/node_modules/argparse/{argparse.js → lib/argparse.js} +1142 -1029
- package/node_modules/markdown-it/node_modules/argparse/lib/difflib.js +190 -0
- package/node_modules/markdown-it/node_modules/argparse/lib/sub.js +4 -4
- package/node_modules/markdown-it/node_modules/argparse/lib/textwrap.js +28 -28
- package/node_modules/markdown-it/node_modules/argparse/package.json +18 -11
- package/node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.d.ts +8 -0
- package/node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.js +46 -0
- package/node_modules/markdown-it/node_modules/entities/dist/decode-codepoint.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/{lib → dist}/decode.d.ts +28 -45
- package/node_modules/markdown-it/node_modules/entities/dist/decode.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/{lib/esm → dist}/decode.js +189 -141
- package/node_modules/markdown-it/node_modules/entities/dist/decode.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/{lib/esm → dist}/encode.d.ts +4 -2
- package/node_modules/markdown-it/node_modules/entities/dist/encode.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/encode.js +90 -0
- package/node_modules/markdown-it/node_modules/entities/dist/encode.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/{lib → dist}/escape.d.ts +15 -10
- package/node_modules/markdown-it/node_modules/entities/dist/escape.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/escape.js +132 -0
- package/node_modules/markdown-it/node_modules/entities/dist/escape.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-html.d.ts +3 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-html.js +5 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-html.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-xml.js +5 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/decode-data-xml.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.d.ts +5 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.js +12 -0
- package/node_modules/markdown-it/node_modules/entities/dist/generated/encode-html.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/{lib/esm → dist}/index.d.ts +14 -21
- package/node_modules/markdown-it/node_modules/entities/dist/index.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/index.js +91 -0
- package/node_modules/markdown-it/node_modules/entities/dist/index.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.d.ts +17 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.js +18 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/bin-trie-flags.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.d.ts +7 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.js +17 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/decode-shared.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/encode-shared.d.ts +33 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/encode-shared.d.ts.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/encode-shared.js +93 -0
- package/node_modules/markdown-it/node_modules/entities/dist/internal/encode-shared.js.map +1 -0
- package/node_modules/markdown-it/node_modules/entities/package.json +63 -70
- package/node_modules/markdown-it/node_modules/entities/readme.md +54 -45
- package/node_modules/markdown-it/node_modules/entities/src/decode-codepoint.ts +50 -0
- package/node_modules/markdown-it/node_modules/entities/src/decode.ts +671 -0
- package/node_modules/markdown-it/node_modules/entities/src/encode.ts +95 -0
- package/node_modules/markdown-it/node_modules/entities/src/escape.ts +160 -0
- package/node_modules/markdown-it/node_modules/entities/src/generated/decode-data-html.ts +7 -0
- package/node_modules/markdown-it/node_modules/entities/src/generated/decode-data-xml.ts +7 -0
- package/node_modules/markdown-it/node_modules/entities/src/generated/encode-html.ts +18 -0
- package/node_modules/markdown-it/node_modules/entities/src/index.ts +162 -0
- package/node_modules/markdown-it/node_modules/entities/src/internal/bin-trie-flags.ts +16 -0
- package/node_modules/markdown-it/node_modules/entities/src/internal/decode-shared.ts +18 -0
- package/node_modules/markdown-it/node_modules/entities/src/internal/encode-shared.ts +123 -0
- package/node_modules/markdown-it/node_modules/linkify-it/README.md +49 -86
- package/node_modules/markdown-it/node_modules/linkify-it/build/index.cjs.js +636 -825
- package/node_modules/markdown-it/node_modules/linkify-it/build/index.cjs.js.map +1 -0
- package/node_modules/markdown-it/node_modules/linkify-it/build/index.d.ts +236 -0
- package/node_modules/markdown-it/node_modules/linkify-it/build/index.mjs +538 -0
- package/node_modules/markdown-it/node_modules/linkify-it/build/index.mjs.map +1 -0
- package/node_modules/markdown-it/node_modules/linkify-it/package.json +23 -20
- package/node_modules/markdown-it/node_modules/uc.micro/README.md +18 -1
- package/node_modules/markdown-it/node_modules/uc.micro/build/index.cjs.js +13 -18
- package/node_modules/markdown-it/node_modules/uc.micro/build/index.d.ts +6 -0
- package/node_modules/markdown-it/node_modules/uc.micro/build/index.mjs +8 -0
- package/node_modules/markdown-it/node_modules/uc.micro/package.json +12 -17
- package/node_modules/markdown-it/package.json +47 -30
- package/node_modules/matrix-js-sdk/CHANGELOG.md +0 -11
- package/node_modules/matrix-js-sdk/package.json +1 -1
- package/node_modules/music-metadata/lib/common/Util.d.ts +1 -1
- package/node_modules/music-metadata/lib/common/Util.js +1 -7
- package/node_modules/music-metadata/lib/id3v2/FrameHeader.js +3 -23
- package/node_modules/music-metadata/lib/id3v2/FrameParser.js +2 -2
- package/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +1 -1
- package/node_modules/music-metadata/lib/mp4/AtomToken.js +13 -38
- package/node_modules/music-metadata/lib/mpeg/MpegParser.js +1 -1
- package/node_modules/music-metadata/package.json +6 -6
- package/node_modules/typebox/build/compile/validator.d.mts +4 -1
- package/node_modules/typebox/build/guard/guard.d.mts +1 -1
- package/node_modules/typebox/build/guard/guard.mjs +2 -5
- package/node_modules/typebox/build/guard/string.mjs +4 -16
- package/node_modules/typebox/build/schema/engine/_functions.mjs +15 -34
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -8
- package/node_modules/typebox/build/typebox.d.mts +1 -1
- package/node_modules/typebox/build/typebox.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +32 -29
- package/openclaw.plugin.json +146 -152
- package/package.json +31 -114
- package/dist/accounts-DfngqebB.js +0 -130
- package/dist/active-client-DXvz2gCo.js +0 -20
- package/dist/approval-reactions-D-BxBK_L.js +0 -202
- package/dist/client-Dbso3-0V.js +0 -30
- package/dist/client-bootstrap-XsIkHNt0.js +0 -110
- package/dist/create-client-BmSU-q-D.js +0 -61
- package/dist/credentials-W2EmwRhu.js +0 -65
- package/dist/credentials-read-DVmFCm7X.js +0 -77
- package/dist/doctor-CM8ijNpW.js +0 -64
- package/dist/doctor-contract-BMSJkkAE.js +0 -167
- package/dist/inbound-dedupe-CaBLblef.js +0 -48
- package/dist/probe.runtime-BuieqmS3.js +0 -3
- package/dist/record-shared-CWWx6fvI.js +0 -2
- package/dist/recovery-key-store-BNnHvXdk.js +0 -275
- package/dist/room-info-CAFZ3Z9J.js +0 -87
- package/dist/route-DY6at4qJ.js +0 -161
- package/dist/storage-BvAkgzvT.js +0 -685
- package/node_modules/markdown-it/dist/index.cjs.js.map +0 -1
- package/node_modules/markdown-it/dist/markdown-it.js +0 -3975
- package/node_modules/markdown-it/dist/markdown-it.js.map +0 -1
- package/node_modules/markdown-it/dist/markdown-it.min.js +0 -3
- package/node_modules/markdown-it/dist/markdown-it.min.js.map +0 -1
- package/node_modules/markdown-it/index.mjs +0 -1
- package/node_modules/markdown-it/lib/common/html_blocks.mjs +0 -67
- package/node_modules/markdown-it/lib/common/html_re.mjs +0 -25
- package/node_modules/markdown-it/lib/common/utils.mjs +0 -324
- package/node_modules/markdown-it/lib/helpers/index.mjs +0 -11
- package/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +0 -77
- package/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +0 -49
- package/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +0 -66
- package/node_modules/markdown-it/lib/index.mjs +0 -565
- package/node_modules/markdown-it/lib/parser_block.mjs +0 -134
- package/node_modules/markdown-it/lib/parser_core.mjs +0 -62
- package/node_modules/markdown-it/lib/parser_inline.mjs +0 -197
- package/node_modules/markdown-it/lib/presets/commonmark.mjs +0 -88
- package/node_modules/markdown-it/lib/presets/default.mjs +0 -47
- package/node_modules/markdown-it/lib/presets/zero.mjs +0 -70
- package/node_modules/markdown-it/lib/renderer.mjs +0 -322
- package/node_modules/markdown-it/lib/ruler.mjs +0 -340
- package/node_modules/markdown-it/lib/rules_block/blockquote.mjs +0 -209
- package/node_modules/markdown-it/lib/rules_block/code.mjs +0 -30
- package/node_modules/markdown-it/lib/rules_block/fence.mjs +0 -94
- package/node_modules/markdown-it/lib/rules_block/heading.mjs +0 -51
- package/node_modules/markdown-it/lib/rules_block/hr.mjs +0 -40
- package/node_modules/markdown-it/lib/rules_block/html_block.mjs +0 -80
- package/node_modules/markdown-it/lib/rules_block/lheading.mjs +0 -85
- package/node_modules/markdown-it/lib/rules_block/list.mjs +0 -331
- package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +0 -48
- package/node_modules/markdown-it/lib/rules_block/reference.mjs +0 -212
- package/node_modules/markdown-it/lib/rules_block/state_block.mjs +0 -220
- package/node_modules/markdown-it/lib/rules_block/table.mjs +0 -228
- package/node_modules/markdown-it/lib/rules_core/block.mjs +0 -13
- package/node_modules/markdown-it/lib/rules_core/inline.mjs +0 -11
- package/node_modules/markdown-it/lib/rules_core/linkify.mjs +0 -134
- package/node_modules/markdown-it/lib/rules_core/normalize.mjs +0 -17
- package/node_modules/markdown-it/lib/rules_core/replacements.mjs +0 -101
- package/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +0 -209
- package/node_modules/markdown-it/lib/rules_core/state_core.mjs +0 -17
- package/node_modules/markdown-it/lib/rules_core/text_join.mjs +0 -43
- package/node_modules/markdown-it/lib/rules_inline/autolink.mjs +0 -72
- package/node_modules/markdown-it/lib/rules_inline/backticks.mjs +0 -60
- package/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +0 -124
- package/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +0 -123
- package/node_modules/markdown-it/lib/rules_inline/entity.mjs +0 -51
- package/node_modules/markdown-it/lib/rules_inline/escape.mjs +0 -83
- package/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs +0 -38
- package/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +0 -50
- package/node_modules/markdown-it/lib/rules_inline/image.mjs +0 -138
- package/node_modules/markdown-it/lib/rules_inline/link.mjs +0 -139
- package/node_modules/markdown-it/lib/rules_inline/linkify.mjs +0 -63
- package/node_modules/markdown-it/lib/rules_inline/newline.mjs +0 -42
- package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +0 -154
- package/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +0 -127
- package/node_modules/markdown-it/lib/rules_inline/text.mjs +0 -86
- package/node_modules/markdown-it/lib/token.mjs +0 -191
- package/node_modules/markdown-it/node_modules/argparse/CHANGELOG.md +0 -216
- package/node_modules/markdown-it/node_modules/entities/lib/decode.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/decode.js +0 -536
- package/node_modules/markdown-it/node_modules/entities/lib/decode.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/decode_codepoint.d.ts +0 -19
- package/node_modules/markdown-it/node_modules/entities/lib/decode_codepoint.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/decode_codepoint.js +0 -76
- package/node_modules/markdown-it/node_modules/entities/lib/decode_codepoint.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/encode.d.ts +0 -22
- package/node_modules/markdown-it/node_modules/entities/lib/encode.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/encode.js +0 -77
- package/node_modules/markdown-it/node_modules/entities/lib/encode.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/escape.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/escape.js +0 -122
- package/node_modules/markdown-it/node_modules/entities/lib/escape.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode.d.ts +0 -211
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode_codepoint.d.ts +0 -19
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode_codepoint.js +0 -71
- package/node_modules/markdown-it/node_modules/entities/lib/esm/decode_codepoint.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/encode.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/encode.js +0 -69
- package/node_modules/markdown-it/node_modules/entities/lib/esm/encode.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/escape.d.ts +0 -43
- package/node_modules/markdown-it/node_modules/entities/lib/esm/escape.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/escape.js +0 -116
- package/node_modules/markdown-it/node_modules/entities/lib/esm/escape.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +0 -3
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -7
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-html.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +0 -3
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -7
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/encode-html.d.ts +0 -8
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/encode-html.js +0 -10
- package/node_modules/markdown-it/node_modules/entities/lib/esm/generated/encode-html.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/index.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/index.js +0 -99
- package/node_modules/markdown-it/node_modules/entities/lib/esm/index.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/esm/package.json +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-html.d.ts +0 -3
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-html.js +0 -9
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-html.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-xml.d.ts +0 -3
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-xml.js +0 -9
- package/node_modules/markdown-it/node_modules/entities/lib/generated/decode-data-xml.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/generated/encode-html.d.ts +0 -8
- package/node_modules/markdown-it/node_modules/entities/lib/generated/encode-html.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/generated/encode-html.js +0 -12
- package/node_modules/markdown-it/node_modules/entities/lib/generated/encode-html.js.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/index.d.ts +0 -96
- package/node_modules/markdown-it/node_modules/entities/lib/index.d.ts.map +0 -1
- package/node_modules/markdown-it/node_modules/entities/lib/index.js +0 -126
- package/node_modules/markdown-it/node_modules/entities/lib/index.js.map +0 -1
- package/node_modules/markdown-it/node_modules/linkify-it/index.mjs +0 -646
- package/node_modules/markdown-it/node_modules/linkify-it/lib/re.mjs +0 -193
- package/node_modules/markdown-it/node_modules/uc.micro/categories/Cc/regex.mjs +0 -1
- package/node_modules/markdown-it/node_modules/uc.micro/categories/Cf/regex.mjs +0 -1
- package/node_modules/markdown-it/node_modules/uc.micro/categories/P/regex.mjs +0 -1
- package/node_modules/markdown-it/node_modules/uc.micro/categories/S/regex.mjs +0 -1
- package/node_modules/markdown-it/node_modules/uc.micro/categories/Z/regex.mjs +0 -1
- package/node_modules/markdown-it/node_modules/uc.micro/index.mjs +0 -8
- package/node_modules/markdown-it/node_modules/uc.micro/properties/Any/regex.mjs +0 -1
- /package/dist/{account-config-BZWN9tGS.js → .setup/account-config-BZWN9tGS.mjs} +0 -0
- /package/dist/{backup-health-Dm_YMVFT.js → .setup/backup-health-Dm_YMVFT.mjs} +0 -0
- /package/dist/{config-paths-CnREYb1Y.js → .setup/config-paths-CnREYb1Y.mjs} +0 -0
- /package/dist/{config-secret-input.runtime-CwsP3--c.js → .setup/config-secret-input.runtime-CwsP3--c.mjs} +0 -0
- /package/dist/{crypto-node.runtime-6Aj_ltHQ.js → .setup/crypto-node.runtime-6Aj_ltHQ.mjs} +0 -0
- /package/dist/{errors-C47hvAF8.js → .setup/errors-C47hvAF8.mjs} +0 -0
- /package/dist/{preflight-audio.runtime-BZxxQsxY.js → .setup/preflight-audio.runtime-BZxxQsxY.mjs} +0 -0
- /package/dist/{reaction-common-DkrQdBSZ.js → .setup/reaction-common-DkrQdBSZ.mjs} +0 -0
- /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
- /package/dist/{runtime-6S3DNFNv.js → .setup/runtime-6S3DNFNv.mjs} +0 -0
- /package/dist/{runtime-BefyhPWv.js → .setup/runtime-BefyhPWv.mjs} +0 -0
- /package/dist/{sync-state-CWbp0QSY.js → .setup/sync-state-CWbp0QSY.mjs} +0 -0
- /package/dist/{target-ids-B-5aQxwn.js → .setup/target-ids-B-5aQxwn.mjs} +0 -0
- /package/dist/{thread-bindings-shared-CKnY4LSd.js → .setup/thread-bindings-shared-CKnY4LSd.mjs} +0 -0
- /package/dist/{timeout-abort-signal-DMrgRFIy.js → .setup/timeout-abort-signal-DMrgRFIy.mjs} +0 -0
- /package/dist/{url-validation-GRHde6lq.js → .setup/url-validation-GRHde6lq.mjs} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-BZWN9tGS.
|
|
2
|
-
import "./
|
|
3
|
-
import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.
|
|
4
|
-
import { n as bootstrapMatrixVerification } from "./verification-
|
|
1
|
+
import { a as resolveMatrixAccountConfig, n as hasExplicitMatrixAccountConfig } from "./account-config-BZWN9tGS.mjs";
|
|
2
|
+
import "./setup-core-bhdcEo7v.mjs";
|
|
3
|
+
import { t as formatMatrixErrorMessage } from "./errors-C47hvAF8.mjs";
|
|
4
|
+
import { n as bootstrapMatrixVerification } from "./verification-DeWOtZJr.mjs";
|
|
5
5
|
//#region extensions/matrix/src/setup-bootstrap.ts
|
|
6
6
|
async function maybeBootstrapNewEncryptedMatrixAccount(params) {
|
|
7
7
|
const accountConfig = resolveMatrixAccountConfig({
|
|
@@ -1,34 +1,152 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { r as
|
|
5
|
-
import {
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
|
|
2
|
+
import { a as resolveMatrixDefaultOrOnlyAccountId, r as resolveConfiguredMatrixAccountIds, s as resolveMatrixAccountStringValues } from "./account-selection-BOQeTqax.mjs";
|
|
3
|
+
import { a as resolveMatrixAccountConfig, o as resolveMatrixBaseConfig, t as findMatrixAccountConfig } from "./account-config-BZWN9tGS.mjs";
|
|
4
|
+
import { n as resolveMatrixEnvAuthReadiness, r as resolveScopedMatrixEnvConfig, t as resolveGlobalMatrixEnvConfig } from "./env-auth-CYJL1jNl.mjs";
|
|
5
|
+
import { i as loadMatrixCredentials, n as credentialsMatchConfig } from "./credentials-read-CRHg6XPm.mjs";
|
|
6
|
+
import { n as resolveMatrixConfigPath$1, r as shouldStoreMatrixAccountAtTopLevel, t as resolveMatrixConfigFieldPath } from "./config-paths-CnREYb1Y.mjs";
|
|
6
7
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
8
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
9
|
+
import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input-runtime";
|
|
8
10
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/routing";
|
|
9
|
-
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
10
11
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2, addWildcardAllowFrom, applyAccountNameToChannelSection, normalizeAccountId as normalizeAccountId$2, normalizeAllowFromEntries, normalizeSecretInputString, prepareScopedSetupConfig } from "openclaw/plugin-sdk/setup";
|
|
11
12
|
import { resolveOptionalIntegerOption } from "openclaw/plugin-sdk/number-runtime";
|
|
12
|
-
import { coerceSecretRef } from "openclaw/plugin-sdk/secret-ref-runtime";
|
|
13
|
-
|
|
13
|
+
import { coerceSecretRef as coerceSecretRef$1 } from "openclaw/plugin-sdk/secret-ref-runtime";
|
|
14
|
+
//#region extensions/matrix/src/matrix/accounts.ts
|
|
15
|
+
function clean(value) {
|
|
16
|
+
return normalizeOptionalString(value) ?? "";
|
|
17
|
+
}
|
|
18
|
+
function resolveMatrixAccountAuthView(params) {
|
|
19
|
+
const normalizedAccountId = normalizeAccountId(params.accountId);
|
|
20
|
+
const matrix = resolveMatrixBaseConfig(params.cfg);
|
|
21
|
+
const account = findMatrixAccountConfig(params.cfg, normalizedAccountId) ?? {};
|
|
22
|
+
const resolvedStrings = resolveMatrixAccountStringValues({
|
|
23
|
+
accountId: normalizedAccountId,
|
|
24
|
+
account: {
|
|
25
|
+
homeserver: clean(account.homeserver),
|
|
26
|
+
userId: clean(account.userId),
|
|
27
|
+
accessToken: typeof account.accessToken === "string" ? clean(account.accessToken) : "",
|
|
28
|
+
password: typeof account.password === "string" ? clean(account.password) : "",
|
|
29
|
+
deviceId: clean(account.deviceId),
|
|
30
|
+
deviceName: clean(account.deviceName)
|
|
31
|
+
},
|
|
32
|
+
scopedEnv: resolveScopedMatrixEnvConfig(normalizedAccountId, params.env),
|
|
33
|
+
channel: {
|
|
34
|
+
homeserver: clean(matrix.homeserver),
|
|
35
|
+
userId: clean(matrix.userId),
|
|
36
|
+
accessToken: typeof matrix.accessToken === "string" ? clean(matrix.accessToken) : "",
|
|
37
|
+
password: typeof matrix.password === "string" ? clean(matrix.password) : "",
|
|
38
|
+
deviceId: clean(matrix.deviceId),
|
|
39
|
+
deviceName: clean(matrix.deviceName)
|
|
40
|
+
},
|
|
41
|
+
globalEnv: resolveGlobalMatrixEnvConfig(params.env)
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
homeserver: resolvedStrings.homeserver,
|
|
45
|
+
userId: resolvedStrings.userId,
|
|
46
|
+
accessToken: resolvedStrings.accessToken || void 0,
|
|
47
|
+
password: resolvedStrings.password || void 0
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function resolveMatrixAccountUserId(params) {
|
|
51
|
+
const env = params.env ?? process.env;
|
|
52
|
+
const authView = resolveMatrixAccountAuthView({
|
|
53
|
+
cfg: params.cfg,
|
|
54
|
+
accountId: params.accountId,
|
|
55
|
+
env
|
|
56
|
+
});
|
|
57
|
+
const configuredUserId = authView.userId.trim();
|
|
58
|
+
if (configuredUserId) return configuredUserId;
|
|
59
|
+
const stored = loadMatrixCredentials(env, params.accountId);
|
|
60
|
+
if (!stored) return null;
|
|
61
|
+
if (authView.homeserver && stored.homeserver !== authView.homeserver) return null;
|
|
62
|
+
if (authView.accessToken && stored.accessToken !== authView.accessToken) return null;
|
|
63
|
+
return stored.userId.trim() || null;
|
|
64
|
+
}
|
|
65
|
+
function listMatrixAccountIds(cfg) {
|
|
66
|
+
const ids = resolveConfiguredMatrixAccountIds(cfg, process.env);
|
|
67
|
+
return ids.length > 0 ? ids : [DEFAULT_ACCOUNT_ID];
|
|
68
|
+
}
|
|
69
|
+
function resolveDefaultMatrixAccountId(cfg) {
|
|
70
|
+
return normalizeAccountId(resolveMatrixDefaultOrOnlyAccountId(cfg));
|
|
71
|
+
}
|
|
72
|
+
function resolveConfiguredMatrixBotUserIds(params) {
|
|
73
|
+
const env = params.env ?? process.env;
|
|
74
|
+
const currentAccountId = normalizeAccountId(params.accountId);
|
|
75
|
+
const accountIds = new Set(resolveConfiguredMatrixAccountIds(params.cfg, env));
|
|
76
|
+
if (resolveMatrixAccount({
|
|
77
|
+
cfg: params.cfg,
|
|
78
|
+
accountId: DEFAULT_ACCOUNT_ID,
|
|
79
|
+
env
|
|
80
|
+
}).configured) accountIds.add(DEFAULT_ACCOUNT_ID);
|
|
81
|
+
const ids = /* @__PURE__ */ new Set();
|
|
82
|
+
for (const accountId of accountIds) {
|
|
83
|
+
if (normalizeAccountId(accountId) === currentAccountId) continue;
|
|
84
|
+
if (!resolveMatrixAccount({
|
|
85
|
+
cfg: params.cfg,
|
|
86
|
+
accountId,
|
|
87
|
+
env
|
|
88
|
+
}).configured) continue;
|
|
89
|
+
const userId = resolveMatrixAccountUserId({
|
|
90
|
+
cfg: params.cfg,
|
|
91
|
+
accountId,
|
|
92
|
+
env
|
|
93
|
+
});
|
|
94
|
+
if (userId) ids.add(userId);
|
|
95
|
+
}
|
|
96
|
+
return ids;
|
|
97
|
+
}
|
|
98
|
+
function resolveMatrixAccount(params) {
|
|
99
|
+
const env = params.env ?? process.env;
|
|
100
|
+
const accountId = normalizeAccountId(params.accountId ?? resolveDefaultMatrixAccountId(params.cfg));
|
|
101
|
+
const matrixBase = resolveMatrixBaseConfig(params.cfg);
|
|
102
|
+
const base = resolveMatrixAccountConfig({
|
|
103
|
+
cfg: params.cfg,
|
|
104
|
+
accountId,
|
|
105
|
+
env
|
|
106
|
+
});
|
|
107
|
+
const explicitAuthConfig = accountId === DEFAULT_ACCOUNT_ID ? base : findMatrixAccountConfig(params.cfg, accountId) ?? {};
|
|
108
|
+
const enabled = base.enabled !== false && matrixBase.enabled !== false;
|
|
109
|
+
const authView = resolveMatrixAccountAuthView({
|
|
110
|
+
cfg: params.cfg,
|
|
111
|
+
accountId,
|
|
112
|
+
env
|
|
113
|
+
});
|
|
114
|
+
const hasHomeserver = Boolean(authView.homeserver);
|
|
115
|
+
const hasUserId = Boolean(authView.userId);
|
|
116
|
+
const hasAccessToken = Boolean(authView.accessToken) || hasConfiguredSecretInput(explicitAuthConfig.accessToken);
|
|
117
|
+
const hasPassword = Boolean(authView.password);
|
|
118
|
+
const hasPasswordAuth = hasUserId && (hasPassword || hasConfiguredSecretInput(explicitAuthConfig.password));
|
|
119
|
+
const stored = loadMatrixCredentials(env, accountId);
|
|
120
|
+
const hasStored = stored && authView.homeserver ? credentialsMatchConfig(stored, {
|
|
121
|
+
homeserver: authView.homeserver,
|
|
122
|
+
userId: authView.userId || ""
|
|
123
|
+
}) : false;
|
|
124
|
+
const configured = hasHomeserver && (hasAccessToken || hasPasswordAuth || hasStored);
|
|
125
|
+
return {
|
|
126
|
+
accountId,
|
|
127
|
+
enabled,
|
|
128
|
+
name: normalizeOptionalString(base.name),
|
|
129
|
+
configured,
|
|
130
|
+
homeserver: authView.homeserver || void 0,
|
|
131
|
+
userId: authView.userId || void 0,
|
|
132
|
+
config: base
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
14
136
|
//#region extensions/matrix/src/setup-contract.ts
|
|
15
137
|
const matrixSingleAccountKeysToMove = [
|
|
16
|
-
"homeserver",
|
|
17
|
-
"userId",
|
|
18
|
-
"accessToken",
|
|
19
|
-
"password",
|
|
20
138
|
"deviceId",
|
|
21
|
-
"deviceName",
|
|
22
139
|
"avatarUrl",
|
|
23
140
|
"initialSyncLimit",
|
|
24
141
|
"encryption",
|
|
25
142
|
"allowlistOnly",
|
|
26
143
|
"dangerouslyAllowNameMatching",
|
|
27
144
|
"allowBots",
|
|
28
|
-
"
|
|
145
|
+
"blockStreaming",
|
|
29
146
|
"replyToMode",
|
|
30
147
|
"threadReplies",
|
|
31
148
|
"textChunkLimit",
|
|
149
|
+
"chunkMode",
|
|
32
150
|
"responsePrefix",
|
|
33
151
|
"ackReaction",
|
|
34
152
|
"ackReactionScope",
|
|
@@ -65,10 +183,7 @@ function resolveSingleAccountPromotionTarget(params) {
|
|
|
65
183
|
if (matchedAccountId) return matchedAccountId;
|
|
66
184
|
if (normalizedDefaultAccount) return DEFAULT_ACCOUNT_ID$1;
|
|
67
185
|
const namedAccounts = Object.entries(accounts).filter(([accountId, value]) => accountId && typeof value === "object" && value);
|
|
68
|
-
if (namedAccounts.length === 1)
|
|
69
|
-
const onlyAccount = namedAccounts[0];
|
|
70
|
-
if (onlyAccount) return onlyAccount[0];
|
|
71
|
-
}
|
|
186
|
+
if (namedAccounts.length === 1) return namedAccounts[0][0];
|
|
72
187
|
if (namedAccounts.length > 1 && accounts[DEFAULT_ACCOUNT_ID$1] && typeof accounts[DEFAULT_ACCOUNT_ID$1] === "object") return DEFAULT_ACCOUNT_ID$1;
|
|
73
188
|
return DEFAULT_ACCOUNT_ID$1;
|
|
74
189
|
}
|
|
@@ -106,7 +221,7 @@ function applyNullableSecretInputField(target, key, value, defaults) {
|
|
|
106
221
|
else delete target[key];
|
|
107
222
|
return;
|
|
108
223
|
}
|
|
109
|
-
const ref = coerceSecretRef(value, defaults);
|
|
224
|
+
const ref = coerceSecretRef$1(value, defaults);
|
|
110
225
|
if (!ref) throw new Error(`Invalid Matrix ${key} SecretInput.`);
|
|
111
226
|
target[key] = ref;
|
|
112
227
|
}
|
|
@@ -135,11 +250,13 @@ function updateMatrixAccountConfig(cfg, accountId, patch) {
|
|
|
135
250
|
const matrix = cfg.channels?.matrix ?? {};
|
|
136
251
|
const normalizedAccountId = normalizeAccountId(accountId);
|
|
137
252
|
const nextAccount = { ...findMatrixAccountConfig(cfg, normalizedAccountId) ?? (normalizedAccountId === DEFAULT_ACCOUNT_ID ? matrix : {}) };
|
|
138
|
-
if (patch.name !== void 0)
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
253
|
+
if (patch.name !== void 0) {
|
|
254
|
+
if (patch.name === null) delete nextAccount.name;
|
|
255
|
+
else {
|
|
256
|
+
const trimmed = patch.name.trim();
|
|
257
|
+
if (trimmed) nextAccount.name = trimmed;
|
|
258
|
+
else delete nextAccount.name;
|
|
259
|
+
}
|
|
143
260
|
}
|
|
144
261
|
if (typeof patch.enabled === "boolean") nextAccount.enabled = patch.enabled;
|
|
145
262
|
else if (typeof nextAccount.enabled !== "boolean") nextAccount.enabled = true;
|
|
@@ -158,31 +275,47 @@ function updateMatrixAccountConfig(cfg, accountId, patch) {
|
|
|
158
275
|
if (Object.keys(nextNetwork).length > 0) nextAccount.network = nextNetwork;
|
|
159
276
|
else delete nextAccount.network;
|
|
160
277
|
}
|
|
161
|
-
if (patch.initialSyncLimit !== void 0)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
278
|
+
if (patch.initialSyncLimit !== void 0) {
|
|
279
|
+
if (patch.initialSyncLimit === null) delete nextAccount.initialSyncLimit;
|
|
280
|
+
else {
|
|
281
|
+
const initialSyncLimit = resolveOptionalIntegerOption(patch.initialSyncLimit, { min: 0 });
|
|
282
|
+
if (initialSyncLimit === void 0) delete nextAccount.initialSyncLimit;
|
|
283
|
+
else nextAccount.initialSyncLimit = initialSyncLimit;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
if (patch.encryption !== void 0) {
|
|
287
|
+
if (patch.encryption === null) delete nextAccount.encryption;
|
|
288
|
+
else nextAccount.encryption = patch.encryption;
|
|
289
|
+
}
|
|
290
|
+
if (patch.allowBots !== void 0) {
|
|
291
|
+
if (patch.allowBots === null) delete nextAccount.allowBots;
|
|
292
|
+
else nextAccount.allowBots = patch.allowBots;
|
|
293
|
+
}
|
|
294
|
+
if (patch.autoJoin !== void 0) {
|
|
295
|
+
if (patch.autoJoin === null) delete nextAccount.autoJoin;
|
|
296
|
+
else nextAccount.autoJoin = patch.autoJoin;
|
|
166
297
|
}
|
|
167
|
-
if (patch.encryption !== void 0) if (patch.encryption === null) delete nextAccount.encryption;
|
|
168
|
-
else nextAccount.encryption = patch.encryption;
|
|
169
|
-
if (patch.allowBots !== void 0) if (patch.allowBots === null) delete nextAccount.allowBots;
|
|
170
|
-
else nextAccount.allowBots = patch.allowBots;
|
|
171
|
-
if (patch.autoJoin !== void 0) if (patch.autoJoin === null) delete nextAccount.autoJoin;
|
|
172
|
-
else nextAccount.autoJoin = patch.autoJoin;
|
|
173
298
|
applyNullableArrayField(nextAccount, "autoJoinAllowlist", patch.autoJoinAllowlist);
|
|
174
|
-
if (patch.dm !== void 0)
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
299
|
+
if (patch.dm !== void 0) {
|
|
300
|
+
if (patch.dm === null) delete nextAccount.dm;
|
|
301
|
+
else nextAccount.dm = cloneMatrixDmConfig({
|
|
302
|
+
...nextAccount.dm,
|
|
303
|
+
...patch.dm
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
if (patch.groupPolicy !== void 0) {
|
|
307
|
+
if (patch.groupPolicy === null) delete nextAccount.groupPolicy;
|
|
308
|
+
else nextAccount.groupPolicy = patch.groupPolicy;
|
|
309
|
+
}
|
|
181
310
|
applyNullableArrayField(nextAccount, "groupAllowFrom", patch.groupAllowFrom);
|
|
182
|
-
if (patch.groups !== void 0)
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
311
|
+
if (patch.groups !== void 0) {
|
|
312
|
+
if (patch.groups === null) delete nextAccount.groups;
|
|
313
|
+
else nextAccount.groups = cloneMatrixRoomMap(patch.groups);
|
|
314
|
+
}
|
|
315
|
+
if (patch.rooms !== void 0) {
|
|
316
|
+
if (patch.rooms === null) delete nextAccount.rooms;
|
|
317
|
+
else nextAccount.rooms = cloneMatrixRoomMap(patch.rooms);
|
|
318
|
+
}
|
|
186
319
|
const nextAccounts = Object.fromEntries(Object.entries(matrix.accounts ?? {}).filter(([rawAccountId]) => rawAccountId === normalizedAccountId || normalizeAccountId(rawAccountId) !== normalizedAccountId));
|
|
187
320
|
if (shouldStoreMatrixAccountAtTopLevel(cfg, normalizedAccountId)) {
|
|
188
321
|
const { accounts: _ignoredAccounts, defaultAccount } = matrix;
|
|
@@ -220,7 +353,7 @@ var profile_exports = /* @__PURE__ */ __exportAll({
|
|
|
220
353
|
isSupportedMatrixAvatarSource: () => isSupportedMatrixAvatarSource,
|
|
221
354
|
syncMatrixOwnProfile: () => syncMatrixOwnProfile
|
|
222
355
|
});
|
|
223
|
-
const MATRIX_PROFILE_AVATAR_MAX_BYTES =
|
|
356
|
+
const MATRIX_PROFILE_AVATAR_MAX_BYTES = 10485760;
|
|
224
357
|
function isMatrixMxcUri(value) {
|
|
225
358
|
return normalizeLowercaseStringOrEmpty(normalizeOptionalString(value)).startsWith("mxc://");
|
|
226
359
|
}
|
|
@@ -392,17 +525,16 @@ function moveSingleMatrixAccountConfigToNamedAccount(cfg) {
|
|
|
392
525
|
};
|
|
393
526
|
}
|
|
394
527
|
function validateMatrixSetupInput(params) {
|
|
395
|
-
const
|
|
396
|
-
const avatarUrl = resolveSetupAvatarUrl(input);
|
|
528
|
+
const avatarUrl = resolveSetupAvatarUrl(params.input);
|
|
397
529
|
if (avatarUrl && !isSupportedMatrixAvatarSource(avatarUrl)) return "Matrix avatar URL must be an mxc:// URI or an http(s) URL.";
|
|
398
|
-
if (input.useEnv) {
|
|
530
|
+
if (params.input.useEnv) {
|
|
399
531
|
const envReadiness = resolveMatrixEnvAuthReadiness(params.accountId, process.env);
|
|
400
532
|
return envReadiness.ready ? null : envReadiness.missingMessage;
|
|
401
533
|
}
|
|
402
|
-
if (!input.homeserver?.trim()) return "Matrix requires --homeserver";
|
|
403
|
-
const accessToken = input.accessToken?.trim();
|
|
404
|
-
const password = normalizeSecretInputString(input.password);
|
|
405
|
-
const userId = input.userId?.trim();
|
|
534
|
+
if (!params.input.homeserver?.trim()) return "Matrix requires --homeserver";
|
|
535
|
+
const accessToken = params.input.accessToken?.trim();
|
|
536
|
+
const password = normalizeSecretInputString(params.input.password);
|
|
537
|
+
const userId = params.input.userId?.trim();
|
|
406
538
|
if (!accessToken && !password) return "Matrix requires --access-token or --password";
|
|
407
539
|
if (!accessToken) {
|
|
408
540
|
if (!userId) return "Matrix requires --user-id when using --password";
|
|
@@ -411,16 +543,16 @@ function validateMatrixSetupInput(params) {
|
|
|
411
543
|
return null;
|
|
412
544
|
}
|
|
413
545
|
function applyMatrixSetupAccountConfig(params) {
|
|
414
|
-
const input = params.input;
|
|
415
546
|
const normalizedAccountId = normalizeAccountId$2(params.accountId);
|
|
547
|
+
const migratedCfg = normalizedAccountId !== DEFAULT_ACCOUNT_ID$2 ? moveSingleMatrixAccountConfigToNamedAccount(params.cfg) : params.cfg;
|
|
416
548
|
const next = applyAccountNameToChannelSection({
|
|
417
|
-
cfg:
|
|
549
|
+
cfg: migratedCfg,
|
|
418
550
|
channelKey: channel$1,
|
|
419
551
|
accountId: normalizedAccountId,
|
|
420
|
-
name: input.name
|
|
552
|
+
name: params.input.name
|
|
421
553
|
});
|
|
422
|
-
const avatarUrl = resolveSetupAvatarUrl(input);
|
|
423
|
-
if (input.useEnv) return updateMatrixAccountConfig(next, normalizedAccountId, {
|
|
554
|
+
const avatarUrl = resolveSetupAvatarUrl(params.input);
|
|
555
|
+
if (params.input.useEnv) return updateMatrixAccountConfig(next, normalizedAccountId, {
|
|
424
556
|
enabled: true,
|
|
425
557
|
homeserver: null,
|
|
426
558
|
allowPrivateNetwork: null,
|
|
@@ -432,20 +564,20 @@ function applyMatrixSetupAccountConfig(params) {
|
|
|
432
564
|
deviceName: null,
|
|
433
565
|
avatarUrl
|
|
434
566
|
});
|
|
435
|
-
const accessToken = input.accessToken?.trim();
|
|
436
|
-
const password = normalizeSecretInputString(input.password);
|
|
437
|
-
const userId = input.userId?.trim();
|
|
567
|
+
const accessToken = params.input.accessToken?.trim();
|
|
568
|
+
const password = normalizeSecretInputString(params.input.password);
|
|
569
|
+
const userId = params.input.userId?.trim();
|
|
438
570
|
return updateMatrixAccountConfig(next, normalizedAccountId, {
|
|
439
571
|
enabled: true,
|
|
440
|
-
homeserver: input.homeserver?.trim(),
|
|
441
|
-
allowPrivateNetwork: typeof input.dangerouslyAllowPrivateNetwork === "boolean" ? input.dangerouslyAllowPrivateNetwork : typeof input.allowPrivateNetwork === "boolean" ? input.allowPrivateNetwork : void 0,
|
|
442
|
-
proxy: normalizeOptionalString(input.proxy),
|
|
572
|
+
homeserver: params.input.homeserver?.trim(),
|
|
573
|
+
allowPrivateNetwork: typeof params.input.dangerouslyAllowPrivateNetwork === "boolean" ? params.input.dangerouslyAllowPrivateNetwork : typeof params.input.allowPrivateNetwork === "boolean" ? params.input.allowPrivateNetwork : void 0,
|
|
574
|
+
proxy: normalizeOptionalString(params.input.proxy),
|
|
443
575
|
userId: password && !userId ? null : userId,
|
|
444
576
|
accessToken: accessToken || (password ? null : void 0),
|
|
445
577
|
password: password || (accessToken ? null : void 0),
|
|
446
|
-
deviceName: input.deviceName?.trim(),
|
|
578
|
+
deviceName: params.input.deviceName?.trim(),
|
|
447
579
|
avatarUrl,
|
|
448
|
-
initialSyncLimit: input.initialSyncLimit
|
|
580
|
+
initialSyncLimit: params.input.initialSyncLimit
|
|
449
581
|
});
|
|
450
582
|
}
|
|
451
583
|
//#endregion
|
|
@@ -454,48 +586,28 @@ function resolveMatrixSetupDmAllowFrom(policy, allowFrom) {
|
|
|
454
586
|
if (policy === "open") return addWildcardAllowFrom(allowFrom);
|
|
455
587
|
return normalizeAllowFromEntries(allowFrom ?? []).filter((entry) => entry !== "*");
|
|
456
588
|
}
|
|
457
|
-
function createMatrixSetupDmPolicy(promptAllowFrom) {
|
|
458
|
-
return createChannelDmPolicy({
|
|
459
|
-
label: "Matrix",
|
|
460
|
-
channel: "matrix",
|
|
461
|
-
policyPath: "dm.policy",
|
|
462
|
-
allowFromPath: "dm.allowFrom",
|
|
463
|
-
resolveAccount: (cfg, accountId) => {
|
|
464
|
-
const resolvedCfg = cfg;
|
|
465
|
-
const resolvedAccountId = normalizeAccountId$2(accountId?.trim() || resolveDefaultMatrixAccountId(resolvedCfg) || DEFAULT_ACCOUNT_ID$2);
|
|
466
|
-
const config = resolveMatrixAccountConfig({
|
|
467
|
-
cfg: resolvedCfg,
|
|
468
|
-
accountId: resolvedAccountId
|
|
469
|
-
});
|
|
470
|
-
return {
|
|
471
|
-
accountId: resolvedAccountId,
|
|
472
|
-
config: {
|
|
473
|
-
dmPolicy: config.dm?.policy,
|
|
474
|
-
allowFrom: config.dm?.allowFrom,
|
|
475
|
-
dm: config.dm
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
|
-
},
|
|
479
|
-
resolveConfigKeys: ({ cfg, account }) => ({
|
|
480
|
-
policyKey: resolveMatrixConfigFieldPath(cfg, account.accountId, "dm.policy"),
|
|
481
|
-
allowFromKey: resolveMatrixConfigFieldPath(cfg, account.accountId, "dm.allowFrom")
|
|
482
|
-
}),
|
|
483
|
-
resolveAllowFrom: ({ policy, account }) => resolveMatrixSetupDmAllowFrom(policy, account.config.allowFrom),
|
|
484
|
-
buildPatch: ({ account, policy, allowFrom }) => ({ dm: {
|
|
485
|
-
...account.config.dm,
|
|
486
|
-
policy,
|
|
487
|
-
allowFrom
|
|
488
|
-
} }),
|
|
489
|
-
applyPatch: ({ cfg, account, patch }) => updateMatrixAccountConfig(cfg, account.accountId, patch),
|
|
490
|
-
promptAllowFrom
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
589
|
//#endregion
|
|
494
590
|
//#region extensions/matrix/src/setup-core.ts
|
|
495
591
|
const channel = "matrix";
|
|
496
592
|
function resolveMatrixSetupAccountId(params) {
|
|
497
593
|
return normalizeAccountId$2(params.accountId?.trim() || params.name?.trim() || DEFAULT_ACCOUNT_ID$2);
|
|
498
594
|
}
|
|
595
|
+
function resolveMatrixSetupWizardAccountId(cfg, accountId) {
|
|
596
|
+
return normalizeAccountId$2(accountId?.trim() || resolveDefaultMatrixAccountId(cfg) || DEFAULT_ACCOUNT_ID$2);
|
|
597
|
+
}
|
|
598
|
+
function setMatrixDmPolicy(cfg, policy, accountId) {
|
|
599
|
+
const resolvedAccountId = resolveMatrixSetupWizardAccountId(cfg, accountId);
|
|
600
|
+
const existing = resolveMatrixAccountConfig({
|
|
601
|
+
cfg,
|
|
602
|
+
accountId: resolvedAccountId
|
|
603
|
+
});
|
|
604
|
+
const allowFrom = resolveMatrixSetupDmAllowFrom(policy, existing.dm?.allowFrom);
|
|
605
|
+
return updateMatrixAccountConfig(cfg, resolvedAccountId, { dm: {
|
|
606
|
+
...existing.dm,
|
|
607
|
+
policy,
|
|
608
|
+
allowFrom
|
|
609
|
+
} });
|
|
610
|
+
}
|
|
499
611
|
function createMatrixSetupWizardProxy(loadWizardModule) {
|
|
500
612
|
let wizardPromise = null;
|
|
501
613
|
const loadWizard = () => {
|
|
@@ -515,10 +627,28 @@ function createMatrixSetupWizardProxy(loadWizardModule) {
|
|
|
515
627
|
return await (wizard.configureWhenConfigured ?? wizard.configureInteractive ?? wizard.configure)(ctx);
|
|
516
628
|
},
|
|
517
629
|
afterConfigWritten: async (ctx) => await (await loadWizard()).afterConfigWritten?.(ctx),
|
|
518
|
-
dmPolicy:
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
630
|
+
dmPolicy: {
|
|
631
|
+
label: "Matrix",
|
|
632
|
+
channel,
|
|
633
|
+
policyKey: "channels.matrix.dm.policy",
|
|
634
|
+
allowFromKey: "channels.matrix.dm.allowFrom",
|
|
635
|
+
resolveConfigKeys: (cfg, accountId) => {
|
|
636
|
+
const resolvedAccountId = resolveMatrixSetupWizardAccountId(cfg, accountId);
|
|
637
|
+
return {
|
|
638
|
+
policyKey: resolveMatrixConfigFieldPath(cfg, resolvedAccountId, "dm.policy"),
|
|
639
|
+
allowFromKey: resolveMatrixConfigFieldPath(cfg, resolvedAccountId, "dm.allowFrom")
|
|
640
|
+
};
|
|
641
|
+
},
|
|
642
|
+
getCurrent: (cfg, accountId) => resolveMatrixAccountConfig({
|
|
643
|
+
cfg,
|
|
644
|
+
accountId: resolveMatrixSetupWizardAccountId(cfg, accountId)
|
|
645
|
+
}).dm?.policy ?? "pairing",
|
|
646
|
+
setPolicy: (cfg, policy, accountId) => setMatrixDmPolicy(cfg, policy, accountId),
|
|
647
|
+
promptAllowFrom: async (params) => {
|
|
648
|
+
const promptAllowFrom = (await loadWizard()).dmPolicy?.promptAllowFrom;
|
|
649
|
+
return promptAllowFrom ? await promptAllowFrom(params) : params.cfg;
|
|
650
|
+
}
|
|
651
|
+
},
|
|
522
652
|
disable: (cfg) => ({
|
|
523
653
|
...cfg,
|
|
524
654
|
channels: {
|
|
@@ -532,9 +662,6 @@ function createMatrixSetupWizardProxy(loadWizardModule) {
|
|
|
532
662
|
};
|
|
533
663
|
}
|
|
534
664
|
const matrixSetupAdapter = {
|
|
535
|
-
singleAccountKeysToMove,
|
|
536
|
-
namedAccountPromotionKeys,
|
|
537
|
-
resolveSingleAccountPromotionTarget,
|
|
538
665
|
resolveAccountId: ({ accountId, input }) => resolveMatrixSetupAccountId({
|
|
539
666
|
accountId,
|
|
540
667
|
name: input?.name
|
|
@@ -559,7 +686,7 @@ const matrixSetupAdapter = {
|
|
|
559
686
|
input
|
|
560
687
|
}),
|
|
561
688
|
afterAccountConfigWritten: async ({ previousCfg, cfg, accountId, runtime }) => {
|
|
562
|
-
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-
|
|
689
|
+
const { runMatrixSetupBootstrapAfterConfigWrite } = await import("./setup-bootstrap-DUXBC8X2.mjs");
|
|
563
690
|
await runMatrixSetupBootstrapAfterConfigWrite({
|
|
564
691
|
previousCfg,
|
|
565
692
|
cfg,
|
|
@@ -568,82 +695,5 @@ const matrixSetupAdapter = {
|
|
|
568
695
|
});
|
|
569
696
|
}
|
|
570
697
|
};
|
|
571
|
-
const matrixSetupContract = defineChannelSetupContract({
|
|
572
|
-
fields: {
|
|
573
|
-
homeserver: {
|
|
574
|
-
kind: "string",
|
|
575
|
-
cli: {
|
|
576
|
-
flags: "--homeserver <url>",
|
|
577
|
-
description: "Matrix homeserver URL"
|
|
578
|
-
}
|
|
579
|
-
},
|
|
580
|
-
userId: {
|
|
581
|
-
kind: "string",
|
|
582
|
-
cli: {
|
|
583
|
-
flags: "--user-id <id>",
|
|
584
|
-
description: "Matrix user id"
|
|
585
|
-
}
|
|
586
|
-
},
|
|
587
|
-
accessToken: {
|
|
588
|
-
kind: "string",
|
|
589
|
-
sensitive: true,
|
|
590
|
-
cli: {
|
|
591
|
-
flags: "--access-token <token>",
|
|
592
|
-
description: "Matrix access token"
|
|
593
|
-
}
|
|
594
|
-
},
|
|
595
|
-
password: {
|
|
596
|
-
kind: "string",
|
|
597
|
-
sensitive: true,
|
|
598
|
-
cli: {
|
|
599
|
-
flags: "--password <password>",
|
|
600
|
-
description: "Matrix password"
|
|
601
|
-
}
|
|
602
|
-
},
|
|
603
|
-
deviceName: {
|
|
604
|
-
kind: "string",
|
|
605
|
-
cli: {
|
|
606
|
-
flags: "--device-name <name>",
|
|
607
|
-
description: "Matrix device name"
|
|
608
|
-
}
|
|
609
|
-
},
|
|
610
|
-
avatarUrl: {
|
|
611
|
-
kind: "string",
|
|
612
|
-
cli: {
|
|
613
|
-
flags: "--avatar-url <url>",
|
|
614
|
-
description: "Matrix avatar URL"
|
|
615
|
-
}
|
|
616
|
-
},
|
|
617
|
-
initialSyncLimit: {
|
|
618
|
-
kind: "integer",
|
|
619
|
-
cli: {
|
|
620
|
-
flags: "--initial-sync-limit <n>",
|
|
621
|
-
description: "Matrix initial sync room limit"
|
|
622
|
-
}
|
|
623
|
-
},
|
|
624
|
-
proxy: {
|
|
625
|
-
kind: "string",
|
|
626
|
-
cli: {
|
|
627
|
-
flags: "--proxy <url>",
|
|
628
|
-
description: "Matrix proxy URL"
|
|
629
|
-
}
|
|
630
|
-
},
|
|
631
|
-
dangerouslyAllowPrivateNetwork: {
|
|
632
|
-
kind: "boolean",
|
|
633
|
-
cli: {
|
|
634
|
-
flags: "--dangerously-allow-private-network",
|
|
635
|
-
description: "Allow private-network Matrix homeservers"
|
|
636
|
-
}
|
|
637
|
-
},
|
|
638
|
-
useEnv: {
|
|
639
|
-
kind: "boolean",
|
|
640
|
-
cli: {
|
|
641
|
-
flags: "--use-env",
|
|
642
|
-
description: "Use Matrix environment credentials"
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
},
|
|
646
|
-
legacyAdapter: matrixSetupAdapter
|
|
647
|
-
});
|
|
648
698
|
//#endregion
|
|
649
|
-
export {
|
|
699
|
+
export { profile_exports as a, resolveMatrixConfigPath as c, resolveSingleAccountPromotionTarget as d, singleAccountKeysToMove as f, resolveMatrixAccount as g, resolveDefaultMatrixAccountId as h, moveSingleMatrixAccountConfigToNamedAccount as i, updateMatrixAccountConfig as l, resolveConfiguredMatrixBotUserIds as m, matrixSetupAdapter as n, syncMatrixOwnProfile as o, listMatrixAccountIds as p, resolveMatrixSetupDmAllowFrom as r, config_update_exports as s, createMatrixSetupWizardProxy as t, namedAccountPromotionKeys as u };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { g as resolveMatrixAccount, n as matrixSetupAdapter, t as createMatrixSetupWizardProxy } from "./setup-core-bhdcEo7v.mjs";
|
|
2
|
+
import { r as matrixConfigAdapter, t as MatrixChannelConfigSchema } from "./config-schema-D9J_vUF6.mjs";
|
|
3
|
+
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
4
|
+
const matrixSetupPlugin = {
|
|
5
|
+
id: "matrix",
|
|
6
|
+
meta: {
|
|
7
|
+
id: "matrix",
|
|
8
|
+
label: "Matrix",
|
|
9
|
+
selectionLabel: "Matrix (plugin)",
|
|
10
|
+
docsPath: "/channels/matrix",
|
|
11
|
+
docsLabel: "matrix",
|
|
12
|
+
blurb: "open protocol; configure a homeserver + access token.",
|
|
13
|
+
order: 70,
|
|
14
|
+
quickstartAllowFrom: true
|
|
15
|
+
},
|
|
16
|
+
setupWizard: createMatrixSetupWizardProxy(async () => ({ matrixSetupWizard: (await import("./setup-surface-05_G-MnT.mjs").then((n) => n.t)).matrixSetupWizard })),
|
|
17
|
+
setup: matrixSetupAdapter,
|
|
18
|
+
capabilities: {
|
|
19
|
+
chatTypes: [
|
|
20
|
+
"direct",
|
|
21
|
+
"group",
|
|
22
|
+
"thread"
|
|
23
|
+
],
|
|
24
|
+
polls: true,
|
|
25
|
+
reactions: true,
|
|
26
|
+
threads: true,
|
|
27
|
+
media: true
|
|
28
|
+
},
|
|
29
|
+
reload: { configPrefixes: ["channels.matrix"] },
|
|
30
|
+
configSchema: MatrixChannelConfigSchema,
|
|
31
|
+
config: {
|
|
32
|
+
...matrixConfigAdapter,
|
|
33
|
+
isConfigured: (account) => account.configured,
|
|
34
|
+
describeAccount: (account) => describeAccountSnapshot({
|
|
35
|
+
account,
|
|
36
|
+
configured: account.configured,
|
|
37
|
+
extra: { baseUrl: account.homeserver }
|
|
38
|
+
}),
|
|
39
|
+
hasConfiguredState: ({ cfg }) => resolveMatrixAccount({ cfg }).configured
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { matrixSetupPlugin as t };
|